SqlDb class Null safety

A Sqlite database

Constructors

SqlDb()
Base constructor

Properties

changefeed Stream<DatabaseChangeEvent>
A stream of DatabaseChangeEvent with all the changes that occur in the database
read-only
database Database?
This Sqflite Database
read-only
file File?
This Sqlite file
read-only
hashCode int
The hash code for this object.
read-only, inherited
hasSchema bool
Check the existence of a schema
read-only
isReady bool
This database state
read-only
onReady Future<void>
The on ready callback: fired when the database is ready to operate
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
schema DbSchema
This database schema
read-only
sqfliteDatabase Database?
An Sqlite database:
read / write

Methods

batchInsert({required String table, required List<DbRow> rows, ConflictAlgorithm conflictAlgorithm = ConflictAlgorithm.rollback, bool verbose = false}) Future<List>
Insert rows in a table
count({required String table, String? where, String columns = "id", bool verbose = false}) Future<int?>
count rows in a table
delete({required String table, required String where, bool verbose = false}) Future<int>
Delete some datapoints from the database
dispose() → void
Dispose when finished using
exists({required String table, required String where, bool verbose = false}) Future<bool>
Check if a value exists in the table
init({required String path, required List<DbTable> schema, bool absolutePath = false, List<String> queries = const <String>[], bool verbose = false, String? fromAsset, bool debug = false}) Future<void>
Initialize the database
insert({required String table, required DbRow row, bool verbose = false}) Future<int?>
Insert a row in a table
insertManageConflict({required String table, required ConflictAlgorithm conflictAlgorithm, required DbRow row, bool verbose = false}) Future<int?>
Insert a row in a table with conflict algorithm
join({required String table, required String? joinTable, required String? joinOn, String columns = "*", int? offset, int? limit, String? orderBy, String? where, String? groupBy, bool verbose = false}) Future<List<DbRow>>
A select query with a join
mJoin({required String table, required List<String> joinsTables, required List<String> joinsOn, String columns = "*", int? offset, int? limit, String? orderBy, String? where, String? groupBy, bool verbose = false}) Future<List<DbRow>>
A select query with a join on multiple tables
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
query(String q, {bool verbose = false}) Future<List<Map<String, dynamic>>?>
Execute a query
select({required String table, String columns = "*", String? where, String? orderBy, int? limit, int? offset, String? groupBy, bool verbose = false}) Future<List<DbRow>>
A select query
toString() String
A string representation of this object.
inherited
update({required String table, required DbRow row, required String where, bool verbose = false}) Future<int>
Update some datapoints in the database
upsert({required String table, required DbRow row, List<String> preserveColumns = const [], String? indexColumn, bool verbose = false}) Future<void>
Insert a row if it does not exist or update it

Operators

operator ==(Object other) bool
The equality operator.
inherited