OfflineFirstAdapter<_Model extends OfflineFirstModel> class
abstract
This adapter fetches first from SqliteProvider
then hydrates with from a remote provider..
Constructors
Properties
-
fieldsToSqliteColumns
→ Map<
String, RuntimeSqliteColumnDefinition> -
A dictionary that connects field names to SQLite column properties.
no setterinherited
- 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 nextMigration
.no setterinherited
Methods
-
afterSave(
_Model 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
.inherited -
beforeSave(
_Model 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
.inherited -
fromSqlite(
Map< String, dynamic> input, {required SqliteProvider provider, ModelRepository<SqliteModel> ? repository}) → Future<_Model> -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
primaryKeyByUniqueColumns(
_Model 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.inherited -
toSqlite(
_Model input, {required SqliteProvider provider, ModelRepository< SqliteModel> ? repository}) → Future<Map< String, dynamic> > -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited