IDataStore<T> class abstract

Implementers

Constructors

IDataStore()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addRelation(String parentObjectId, String relationColumnName, {List<String>? childrenObjectIds, String? whereClause}) Future<int?>
The API request has 2 options:
bulkCreate(List<T> 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.
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.
bulkUpdate(String whereClause, T 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.
bulkUpsert(List<T> entities) Future<List<String>?>
TODO: add doc
deepSave(T entity) Future<T?>
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.
deleteRelation(String parentObjectId, String relationColumnName, {List<String>? childrenObjectIds, String? whereClause}) Future<int?>
The API request has 2 options:
find({DataQueryBuilder? queryBuilder}) Future<List<T?>?>
Returns 10 objects by default from specified table You can customize this call using DataQueryBuilder.
findById(String id, {List<String>? relations, DataQueryBuilder? queryBuilder}) Future<T?>
Returns the object from the database by specified id.
findFirst({List<String>? relations, DataQueryBuilder? queryBuilder}) Future<T?>
Returns the first created object in the table.
findLast({List<String>? relations, DataQueryBuilder? queryBuilder}) Future<T?>
Returns the last created object in the table.
getGroupObjectCount({GroupDataQueryBuilder? queryBuilder}) Future<int?>
Count items in group. 'groupPath'(this field in queryBuilder - required) - Identifies group for which count is performed.
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.
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.
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(T entity) Future<DateTime?>
Removes the specified object from the database by id
rt() Future<IEventHandler<T>>
save(T entity, {bool isUpsert = false}) Future<T?>
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.
setRelation(String parentObjectId, String relationColumnName, {List<String>? childrenObjectIds, String? whereClause}) Future<int?>
The API request has 2 options:
toString() String
A string representation of this object.
inherited

Operators

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