MongoRepository<TEntity> class

Constructors

MongoRepository(Db db, String collectionName, {bool secure = false})

Properties

actionToDemand String
no setter
collectionName String
final
createPolicy → CreatePolicy
no setter
db → Db
final
deletePolicy → DeletePolicy
default authorization policy for delete operations
no setter
entityDb EntityDb
final
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
inherited
actionToDemandOnPrincipal(DbPrincipal principal, String permission) String
addAccessFilters(AggregationPipelineBuilder pipeline, SearchPolicy searchPolicy, DbPrincipal principal) → void
beginTransaction(RepositoryTransactionOptions options) Future<RepositoryTransaction>
inherited
commitTransaction(RepositoryTransaction transaction) Future
inherited
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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