MapDrivenDataStore<T> class

Implemented types

Constructors

MapDrivenDataStore(String tableName)
const

Properties

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
final

Methods

addRelation(String parentObjectId, String relationColumnName, {List<String>? childrenObjectIds, String? whereClause}) Future<int?>
The API request has 2 options:
override
bulkCreate(covariant List<Map> entities) Future<List<String>?>
Creates multiple objects in the database. The API returns a list of object IDs for the objects created in the database.
override
bulkRemove(String whereClause) Future<int?>
Removes multiple objects according to the described whereClause. The API returns the number of objects deleted as a result of the request.
override
bulkUpdate(String whereClause, covariant Map changes) Future<int?>
This API updates multiple objects in a data table with a single request. Returns the number object of objects updated as a result of the request.
override
bulkUpsert(covariant List<Map> entities) Future<List<String>?>
TODO: add doc
override
deepSave(covariant Map map) Future<Map?>
The "Deep Save" functionality is a single API request that can create or update a complete "object tree" in the database using a single transaction. The object tree starts with the root object and includes other child objects, their corresponding children and so on.
override
deleteRelation(String parentObjectId, String relationColumnName, {List<String>? childrenObjectIds, String? whereClause}) Future<int?>
The API request has 2 options:
override
find({DataQueryBuilder? queryBuilder}) Future<List<Map>?>
Returns 10 objects by default from specified table You can customize this call using DataQueryBuilder.
override
findById(String id, {List<String>? relations, DataQueryBuilder? queryBuilder}) Future<Map?>
Returns the object from the database by specified id.
override
findFirst({List<String>? relations, DataQueryBuilder? queryBuilder}) Future<Map?>
Returns the first created object in the table.
override
findLast({List<String>? relations, DataQueryBuilder? queryBuilder}) Future<Map?>
Returns the last created object in the table.
override
getGroupObjectCount({GroupDataQueryBuilder? queryBuilder}) Future<int?>
Count items in group. 'groupPath'(this field in queryBuilder - required) - Identifies group for which count is performed.
override
getObjectCount({String? whereClause}) Future<int?>
This API returns the number of objects in a table (if the whereClause is not set), otherwise the number of objects matching the search query.
override
group({GroupDataQueryBuilder? queryBuilder}) Future<GroupResult?>
Grouping is applicable for tables and views. In case with tables usage of data from relations is not allowed. When grouping is applied it returns list of group items for each top-level field value. Each group item could contain list of nested group items or data records. When no grouping is selected - it returns plain list of records.
override
loadRelations<R>(String objectId, LoadRelationsQueryBuilder<R> relationsQueryBuilder) Future<List<R>?>
Load related objects. You need to specify relationName in relationQueryBuilder. Also you can customize pageSize and offset with the same parameter.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(covariant Map entity) Future<DateTime?>
Removes the specified object from the database by id
override
rt() Future<MapEventHandler<T>>
override
save(covariant Map entity, {bool isUpsert = false}) Future<Map?>
If the variable isUpsert = true, then it calls the upsert method. Else if the object contains an objectId, the update method is called, which updates an already existing object. Otherwise, the create method will be called, which creates a new object in the table.
override
setRelation(String parentObjectId, String relationColumnName, {List<String>? childrenObjectIds, String? whereClause}) Future<int?>
The API request has 2 options:
override
toString() String
A string representation of this object.
inherited

Operators

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