ArangoDbRepositoryBase<TEntity> class abstract

Implementers

Constructors

ArangoDbRepositoryBase(DbClient db, String collectionName)

Properties

actionToDemand String
no setter
collectionName String
final
createPolicy → CreatePolicy
no setter
db → DbClient
final
deletePolicy → DeletePolicy
default authorization policy for delete operations
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchPolicy → SearchPolicy
default authorization policy for search operations
no setter
updatePolicy → UpdatePolicy
default authorization policy for update operations
no setter

Methods

abortTransaction(RepositoryTransaction transaction) Future
actionToDemandOnPrincipal(DbPrincipal principal, String permission) String
addAuthFilterToQuery({required DbQueryWithClient query, required String collectionName, required DbPrincipal principal, required String action, required bool filterByTenant}) → void
beginTransaction(RepositoryTransactionOptions options) Future<ArangoDbRepositoryTransaction>
commitTransaction(RepositoryTransaction transaction) Future
count(SearchCriteria criteria, DbPrincipal principal, {SearchPolicy? searchPolicy, RepositoryTransaction? transaction}) Future<int>
Searches entities according to criteria and returns the total count of entities fitting the constraints.
create(Map<String, dynamic> map, DbPrincipal principal, {CreatePolicy? createPolicy, RepositoryTransaction? transaction}) Future<Map<String, dynamic>>
Inserts the map as a new entity in the database collection.
delete(String key, DbPrincipal principal, {DeletePolicy? deletePolicy, RepositoryTransaction? transaction}) Future<Map<String, dynamic>>
Deletes the entity from the collection identified by the key parameter.
get(String key, DbPrincipal principal, {SearchPolicy? searchPolicy, RepositoryTransaction? transaction}) Future<Map<String, dynamic>>
Retrieves an entity from the collection identified by the key parameter.
getAllToList(DbPrincipal principal, {SearchPolicy? searchPolicy, RepositoryTransaction? transaction}) Future<List<Map<String, dynamic>>>
inherited
getAllToStream(DbPrincipal principal, {SearchPolicy? searchPolicy, RepositoryTransaction? transaction}) Future<Stream<Map<String, dynamic>>>
Gets all the entities from the collection identified by the key parameter. Use this method only with collections where the number of elements in the collection (per tenant) is guaranteed to be very limited.
handleMetaForCreate(Map<String, dynamic> map, DbPrincipal principal, PermissionPolicy policy) → void
handleMetaForDelete(Map<String, dynamic> map, DbPrincipal principal, PermissionPolicy policy) → void
handleMetaForGet(Map<String, dynamic> map, DbPrincipal principal, PermissionPolicy policy) → void
handleMetaForUpdate(Map<String, dynamic> oldMap, Map<String, dynamic> newMap, DbPrincipal principal, PermissionPolicy policy) → void
isValidTenant(DbPrincipal principal, Map<String, dynamic> map) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
principalHasPermission(Map<String, dynamic> entity, DbPrincipal principal, String sharePermission) bool
searchToList(SearchCriteria criteria, DbPrincipal principal, {SearchPolicy? searchPolicy, RepositoryTransaction? transaction}) Future<List<Map<String, dynamic>>>
inherited
searchToStream(SearchCriteria criteria, DbPrincipal principal, {SearchPolicy? searchPolicy, RepositoryTransaction? transaction}) Future<Stream<Map<String, dynamic>>>
Searches entities according to criteria, returning all the entities that fit the constraints.
searchWithCount(SearchCriteria criteria, DbPrincipal principal, {SearchPolicy? searchPolicy, RepositoryTransaction? transaction}) Future<SearchResult>
Searches entities according to criteria, returning a page of entities and the count of total entities that fit the given constraints.
toString() String
A string representation of this object.
inherited
update(Map<String, dynamic> map, DbPrincipal principal, {UpdatePolicy? updatePolicy, RepositoryTransaction? transaction}) Future<Map<String, dynamic>>
Update an entity in the collection contained in the map parameter.

Operators

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