Add a user to the database.
Add a user to the database.
the username.
the password.
the results callback
Add a user to the database.
Add a user to the database.
the username.
the password.
the optional settings.
the results callback
Add a user to the database.
Add a user to the database.
the username.
the password.
the optional settings.
the promise of the result
Returns the Admin db instance
Returns the Admin db instance
the Admin db instance
Authenticate a user against the server.
Authenticate a user against the server.
the username.
the password.
the results callback
Authenticate a user against the server.
Authenticate a user against the server.
the username.
the password.
the optional settings.
the results callback
Authenticate a user against the server.
Authenticate a user against the server.
the username.
the password.
the optional settings.
the promise of the result
Close the db and its underlying connections
Close the db and its underlying connections
the results callback
Close the db and its underlying connections
Close the db and its underlying connections
Force close, emitting no events
the results callback
Close the db and its underlying connections
Close the db and its underlying connections
Force close, emitting no events
the promise of the result
Fetch a specific collection (containing the actual collection information).
Fetch a specific collection (containing the actual collection information). If the application does not use strict mode you can can use it without a callback in the following way:
var collection = db.collection('mycollection');
the collection name we wish to access.
the optional settings.
the collection result callback
Fetch a specific collection (containing the actual collection information).
Fetch a specific collection (containing the actual collection information). If the application does not use strict mode you can can use it without a callback in the following way:
var collection = db.collection('mycollection');
the collection name we wish to access.
the collection result callback
Fetch a specific collection (containing the actual collection information).
Fetch a specific collection (containing the actual collection information). If the application does not use strict mode you can can use it without a callback in the following way:
var collection = db.collection('mycollection');
the collection name we wish to access.
the collection
Fetch all collections for the current db.
Fetch all collections for the current db.
the collections result callback
Fetch all collections for the current db.
Fetch all collections for the current db.
the promise of an array of collections
Execute a command
Execute a command
the command hash
the results callback
Execute a command
Execute a command
the command hash
the optional settings.
the results callback
Execute a command
Execute a command
the command hash
the optional settings.
the promise of the result
Create a new collection on a server with the specified options.
Create a new collection on a server with the specified options. Use this to create capped collections. More information about command options available at https://docs.mongodb.com/manual/reference/command/create/
the collection name we wish to access.
the results callback
Create a new collection on a server with the specified options.
Create a new collection on a server with the specified options. Use this to create capped collections. More information about command options available at https://docs.mongodb.com/manual/reference/command/create/
the collection name we wish to access.
the optional settings
the results callback
Create a new collection on a server with the specified options.
Create a new collection on a server with the specified options. Use this to create capped collections. More information about command options available at https://docs.mongodb.com/manual/reference/command/create/
the collection name we wish to access.
the optional settings
a promise of the result
Creates an index on the db and collection collection.
Creates an index on the db and collection collection.
the name of the collection to create the index on.
defines the index.
the results callback
Creates an index on the db and collection collection.
Creates an index on the db and collection collection.
the name of the collection to create the index on.
defines the index.
the optional settings.
the results callback
Creates an index on the db and collection collection.
Creates an index on the db and collection collection.
the name of the collection to create the index on.
defines the index.
the optional settings.
the promise of the result
Create a new Db instance sharing the current socket connections.
Create a new Db instance sharing the current socket connections. Be aware that the new db instances are related in a parent-child relationship to the original instance so that events are correctly emitted on child db instances. Child db instances are cached so performing db('db1') twice will return the same instance. You can control these behaviors with the options noListener and returnNonCachedInstance.
the name of the database we want to use.
the optional settings.
Drop a collection from the database, removing it permanently.
Drop a collection from the database, removing it permanently. New accesses will create a new collection.
the name of collection to drop
the results callback
Drop a collection from the database, removing it permanently.
Drop a collection from the database, removing it permanently. New accesses will create a new collection.
the name of collection to drop
the promise of the result
Drop a database, removing it permanently from the server.
Drop a database, removing it permanently from the server.
the callback containing a reference to this instance
Drop a database, removing it permanently from the server.
Drop a database, removing it permanently from the server.
the promise of the result
Ensures that an index exists, if it does not it creates it
Ensures that an index exists, if it does not it creates it
the name of the collection to create the index on.
defines the index.
the results callback
Ensures that an index exists, if it does not it creates it
Ensures that an index exists, if it does not it creates it
the name of the collection to create the index on.
defines the index.
the optional settings.
the results callback
Ensures that an index exists, if it does not it creates it
Ensures that an index exists, if it does not it creates it
the name of the collection to create the index on.
defines the index.
the optional settings.
the promise of the result
Evaluate JavaScript on the server
Evaluate JavaScript on the server
JavaScript to execute on server.
The parameters for the call.
the results callback
Evaluate JavaScript on the server
Evaluate JavaScript on the server
JavaScript to execute on server.
The parameters for the call.
the optional settings.
the results callback
Evaluate JavaScript on the server
Evaluate JavaScript on the server
JavaScript to execute on server.
The parameters for the call.
the optional settings.
the promise of the result
Runs a command on the database as admin.
Runs a command on the database as admin.
the command hash
the results callback
Runs a command on the database as admin.
Runs a command on the database as admin.
the command hash
the optional settings.
the results callback
Runs a command on the database as admin.
Runs a command on the database as admin.
the command hash
the optional settings.
the promise of the result
Retrieves this collections index info.
Retrieves this collections index info.
the name of the collection.
the callback containing the index information
Retrieves this collections index info.
Retrieves this collections index info.
the name of the collection.
the optional settings.
the callback containing the index information
Retrieves this collections index info.
Retrieves this collections index info.
the name of the collection.
the optional settings.
a promise of the index information
Get the list of all collection information for the specified db.
Get the list of all collection information for the specified db.
query to filter collections by
the qptional settings.
a CommandCursor containing the results
Logout user from server, fire off on all connections and remove all auth info
Logout user from server, fire off on all connections and remove all auth info
the command result callback
Logout user from server, fire off on all connections and remove all auth info
Logout user from server, fire off on all connections and remove all auth info
the optional settings.
the command result callback
Logout user from server, fire off on all connections and remove all auth info
Logout user from server, fire off on all connections and remove all auth info
the optional settings.
the promise of the result
Open the database
Open the database
the callback
Open the database
Open the database
the promise of a Db
Remove a user from a database
Remove a user from a database
the username.
the command result callback
Remove a user from a database
Remove a user from a database
the username.
the optional settings.
the command result callback
Remove a user from a database
Remove a user from a database
the username.
the optional settings.
the promise of the result
Rename a collection.
Rename a collection.
the name of current collection to rename.
the new name of of the collection.
the results callback
Rename a collection.
Rename a collection.
the name of current collection to rename.
the new name of of the collection.
the optional settings.
the results callback
Rename a collection.
Rename a collection.
the name of current collection to rename.
the new name of of the collection.
the optional settings.
the promise of the result
Get all the db statistics.
Get all the db statistics.
the collection result callback
Get all the db statistics.
Get all the db statistics.
the optional settings.
the collection result callback
Get all the db statistics.
Get all the db statistics.
the optional settings.
Unref all sockets
Mongo Database
https://mongodb.github.io/node-mongodb-native/api-articles/nodekoarticle1.html