OfflineFirstWithRestAdapter<_Model extends OfflineFirstWithRestModel> class

This adapter fetches first from SqliteProvider then hydrates with RestProvider.

Inheritance
Mixed in types

Constructors

OfflineFirstWithRestAdapter()

Properties

fieldsToSqliteColumns Map<String, Map<String, dynamic>>
A dictionary that connects field names to SQLite column names.
read / write, inherited
fromKey String
Retrieves data under this key when deserializing from REST
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
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.
read-only, inherited
toKey String
Submits data under this key when serializing to REST
read-only, inherited

Methods

fromRest(Map<String, dynamic> data, {RestProvider provider, ModelRepository<RestModel> repository}) Future<_Model>
inherited
fromSqlite(Map<String, dynamic> data, {SqliteProvider provider, ModelRepository<SqliteModel> repository}) Future<_Model>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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 instance, {RestProvider provider, ModelRepository<RestModel> repository}) Future<Map<String, dynamic>>
inherited
toSqlite(_Model data, {SqliteProvider provider, ModelRepository<SqliteModel> repository}) Future<Map<String, dynamic>>
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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