OfflineFirstWithRestAdapter<_Model extends OfflineFirstWithRestModel> class
abstract
This adapter fetches first from SqliteProvider then hydrates with RestProvider.
Constructors
Properties
-
fieldsToSqliteColumns
→ Map<
String, RuntimeSqliteColumnDefinition> -
A dictionary that connects field names to SQLite column properties.
no setterinherited
- fromKey → String?
-
Retrieves data under this key when deserializing from REST
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 - toKey → String?
-
Submits data under this key when serializing to REST
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 -
fromRest(
Map< String, dynamic> input, {required RestProvider provider, ModelRepository<RestModel> ? repository}) → Future<_Model> -
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 -
restEndpoint(
{Query? query, _Model? instance}) → String? -
The endpoint path to access provided a query. Must include a leading slash.
inherited
-
toRest(
_Model input, {required RestProvider provider, ModelRepository< RestModel> ? repository}) → Future<Map< String, dynamic> > -
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