SqliteAdapter<TModel extends Model> class abstract

Constructors that convert app models to and from Sqlite

Constructors

SqliteAdapter()

Properties

fieldsToSqliteColumns Map<String, RuntimeSqliteColumnDefinition>
A dictionary that connects field names to SQLite column properties.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tableName String
Defaults to pluralized model name from the generator. If this property is changed after the table has been inserted, a RenameTable MigrationCommand must be included in the next Migration.
no setter

Methods

afterSave(TModel instance, {required SqliteProvider provider, ModelRepository<SqliteModel>? repository}) Future<void>
Hook invoked after the model is successfully entered in the SQLite database. Useful to update or save associations. This is invoked before SqliteModel#afterSave.
beforeSave(TModel instance, {required SqliteProvider provider, ModelRepository<SqliteModel>? repository}) Future<void>
Hook invoked before the model is successfully entered in the SQLite database. Useful to update or save associations. This is invoked before SqliteModel#beforeSave.
fromSqlite(Map<String, dynamic> input, {required SqliteProvider provider, ModelRepository<SqliteModel>? repository}) Future<TModel>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
primaryKeyByUniqueColumns(TModel instance, DatabaseExecutor executor) Future<int?>
Find a record based on the existence of all contained fields annotated with @Sqlite(unique: true). The Brick-defined primary key of the table is not included in the query. Returns the Brick-defined primary key of the discovered record.
toSqlite(TModel input, {required SqliteProvider provider, ModelRepository<SqliteModel>? repository}) Future<Map<String, dynamic>>
toString() String
A string representation of this object.
inherited

Operators

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