1 Accessing data
Returns true if connection is object with some inforamtion about connection to mongo server.
Stores mongo connection created by connect-to-mongo
Used by mongo-use
- connection to server is not established.
If you want to use functions of this module with several mongo servers simultaneously -
try parameterization (Dynamic Binding: parameterize).
Simplifies database operations while you using one mongo collection:
functions like mongo-save
use it as the default parameter.
Used by functions mongo-use-collection
- default collection is not selected.
Automaticly switches current-mongo-collection to false.
Result is mongo-db or false.
Alias to mongo-use-database.
, collection with given name or false
Result is new value of current-mongo-collection
Attention: look at Names issues about issues with names in the native console.
Combination of mongo-use-database and mongo-use-collection functions.
If collection is specified, result will be value of current-mongo-collection], if database - value of current-mongo-database.
Creates mongo connection and stores it in current-mongo-connection
Optionally accepts names of mongo database and mongo collection in that database.
if database name and colection was not specified,
if database name was specified, current-mongo-collection
if both was specified.
Alias to connect-to-mongo.