SqliteProvider class

Retrieves from a Sqlite database

Implemented types

Constructors

SqliteProvider(String dbName, {DatabaseFactory databaseFactory, SqliteModelDictionary modelDictionary})

Properties

databaseFactory DatabaseFactory
Access the SQLite, instance agnostically across platforms. If databaseFactory is null, the default Flutter SQFlite will be used.
@protected, final
dbName String
The file name for the database used. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
modelDictionary SqliteModelDictionary
The glue between app models and generated adapters
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

delete<_Model extends SqliteModel>(_Model instance, {Query query, ModelRepository<SqliteModel> repository}) Future<int>
Remove record from SQLite. query is ignored.
override
exists<_Model extends SqliteModel>({Query query, ModelRepository<SqliteModel> repository}) Future<bool>
Returns true if _Model exists in SQLite. [...]
get<_Model extends SqliteModel>({Query query, ModelRepository<SqliteModel> repository}) Future<List<_Model>>
Fetch one time from the SQLite database Available query providerArgs: [...]
override
lastMigrationVersion() Future<int>
migrate(List<Migration> migrations) Future<void>
Update database structure with latest migrations. Note that this will run the migrations in the order provided.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
rawExecute(String sql, [List arguments]) Future<void>
Execute a raw SQL statement. Advanced use only.
rawGet<_Model extends SqliteModel>(String sql, List arguments, {ModelRepository<SqliteModel> repository}) Future<List<_Model>>
Fetch results for model with a custom SQL statement. It is recommended to use get whenever possible. Advanced use only.
resetDb() Future<void>
Reset the DB by deleting and recreating it. [...]
toString() String
Returns a string representation of this object.
inherited
upsert<_Model extends SqliteModel>(_Model instance, {Query query, ModelRepository<SqliteModel> repository}) Future<int>
Insert record into SQLite. Returns the primary key of the record inserted
override

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

MIGRATION_VERSIONS_TABLE_NAME → const String
"MigrationVersions"