Entity Manager used by this repository.
Entity metadata of the entity current repository manages.
Query runner provider used for this repository.
Returns object that is managed by this repository. If this repository manages entity from schema, then it returns a name of that schema instead.
Execute an aggregation framework pipeline against the collection.
Execute an aggregation framework pipeline against the collection. This returns modified version of cursor that transforms each result into Entity model.
Perform a bulkWrite operation without a fluent API.
Clears all the data from the given table/collection (truncates/drops it).
Note: this method uses TRUNCATE and may not work as you expect in transactions on some platforms.
Retrieve all the indexes on the collection.
Retrieves this collections index info.
Retrieve all the indexes on the collection.
Count number of matching documents in the db to a query.
Creates a new entity instance.
Creates a new entities and copies all entity properties from given objects into their new entities. Note that it copies only properties that present in entity schema.
Creates a new entity instance and copies all entity properties from this object into a new entity. Note that it copies only properties that present in entity schema.
Creates an index on the db and collection.
Creates multiple indexes in the collection, this method is only supported for MongoDB 2.6 or higher. Earlier version of MongoDB will throw a command not supported error. Index specifications are defined at http://docs.mongodb.org/manual/reference/command/createIndexes/.
Creates a cursor for a query that can be used to iterate over results from MongoDB.
Creates a cursor for a query that can be used to iterate over results from MongoDB. This returns modified version of cursor that transforms each result into Entity model.
Using Query Builder with MongoDB is not supported yet. Calling this method will return an error.
Decrements some column by provided value of the entities matched given conditions.
Deletes entities by a given criteria. Unlike save method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient DELETE query. Does not check if entity exist in the database.
Delete multiple documents on MongoDB.
Delete a document on MongoDB.
The distinct command returns returns a list of distinct values for the given key across a collection.
Drops an index from this collection.
Drops all indexes from the collection.
Finds entities that match given find options or conditions.
Finds entities that match given find options or conditions. Also counts all entities that match given conditions, but ignores pagination settings (from and take options).
Finds entities by ids. Optionally find options can be applied.
Finds first entity that matches given conditions and/or find options.
Find a document and delete it in one atomic operation, requires a write lock for the duration of the operation.
Find a document and replace it in one atomic operation, requires a write lock for the duration of the operation.
Find a document and update it in one atomic operation, requires a write lock for the duration of the operation.
Finds first entity that matches given options.
Finds first entity that matches given options.
Finds first entity that matches given conditions.
Execute a geo search using a geo haystack index on a collection.
Execute the geoNear command to search for items in the collection.
Gets entity mixed id.
Checks if entity has an id. If entity composite compose ids, it will check them all.
Increments some column by provided value of the entities matched given conditions.
Initiate an In order bulk write operation, operations will be serially executed in the order they are added, creating a new operation for each switch in types.
Initiate a Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order.
Inserts a given entity into the database. Unlike save method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient INSERT query. Does not check if entity exist in the database, so query will fail if duplicate entity is being inserted.
Inserts an array of documents into MongoDB.
Inserts a single document into MongoDB.
Returns if the collection is a capped collection.
Get the list of all indexes information for the collection.
Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection.
Merges multiple entities (or entity-like objects) into a given entity.
Return N number of parallel cursors for a collection allowing parallel reading of entire collection. There are no ordering guarantees for returned results.
Creates a new entity from the given plan javascript object. If entity already exist in the database, then it loads it (and everything related to it), replaces all values with the new ones from the given object and returns this new entity. This new entity is actually a loaded from the db entity with all properties replaced from the new object.
Note that given entity-like object must have an entity id / primary key to find entity by. Returns undefined if entity with given id was not found.
Raw SQL query execution is not supported by MongoDB. Calling this method will return an error.
Reindex all indexes on the collection Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections.
Removes a given entities from the database.
Removes a given entity from the database.
Reindex all indexes on the collection Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections.
Replace a document on MongoDB.
Saves all given entities in the database. If entities do not exist in the database then inserts, otherwise updates.
Saves a given entity in the database. If entity does not exist in the database then inserts, otherwise updates.
Get all the collection statistics.
Updates entity partially. Entity can be found by a given conditions. Unlike save method executes a primitive operation without cascades, relations and other operations included. Executes fast and efficient UPDATE query. Does not check if entity exist in the database.
Update multiple documents on MongoDB.
Update a single document on MongoDB.
Generated using TypeDoc
Repository used to manage mongodb documents of a single entity type.