import { MongoRepository } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/index.ts";
Repository used to manage mongodb documents of a single entity type.
Methods
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.
Retrieve all the indexes on the collection.
Retrieves this collections index info.
Count number of matching documents in the db to a query.
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.
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.
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.
Execute a geo search using a geo haystack index on a collection.
Execute the geoNear command to search for items in the collection.
Run a group command across a collection.
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 an array of documents into MongoDB.
Inserts a single document into MongoDB.
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.
Return N number of parallel cursors for a collection allowing parallel reading of entire collection. There are no ordering guarantees for returned results.
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.
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.
Update multiple documents on MongoDB.
Update a single document on MongoDB.
Methods
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.
Retrieve all the indexes on the collection.
Retrieves this collections index info.
Count number of matching documents in the db to a query.
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.
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.
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.
Execute a geo search using a geo haystack index on a collection.
Execute the geoNear command to search for items in the collection.
Run a group command across a collection.
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 an array of documents into MongoDB.
Inserts a single document into MongoDB.
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.
Return N number of parallel cursors for a collection allowing parallel reading of entire collection. There are no ordering guarantees for returned results.
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.
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.
Update multiple documents on MongoDB.
Update a single document on MongoDB.