{"repo":"LinusU/node-albatross","free":true,"listed":false,"github":"https://github.com/LinusU/node-albatross","clone":"git clone https://github.com/LinusU/node-albatross.git","description":"Best way to access MongoDB from Node.js","language":"JavaScript","stars":16,"topics":["mongodb","nodejs","hacktoberfest"],"license":"MIT","category":"databases-storage","readme_excerpt":"Albatross is a small library that makes accessing MongoDB from Node.js a breeze. It's goal is to be a thin wrapper that enables you to forget about connection state and get right to accessing your data. Installation Usage You can start querying the database right away, as soon as a connection is established it will start sending your commands to the server. API Module The module default exports a single function to create a new Albatross instance. It also exports the BSON Binary API as named exports. albatross(uri) Creates a new instance of Albatross and connect to the specified uri. Note: Albatross creates the MongoDB client with ignoreUndefined: true , which means that undefined values will not be stored in the database. This is the new default in the BSON library, and is also how the standard JSON.stringify works. BSON Binary API The following functions are exported from the module: Albatross .collection(name) Returns a new instance of Collection bound to the collection named name . .grid([name]) Returns a new instance of Grid, optionally using the supplied name as the name of the root collection. .id(strOrObjectId) Makes sure that the given argument is an ObjectId. .ping([timeout]): Promise Send the ping command to the server, to check that the connection is still intact. Optionally accepts a timeout in milliseconds. .transaction(fn): Promise Runs a provided function within a transaction, retrying either the commit operation or entire transaction as needed (and when the e","default_branch":null,"files":null,"tree":[],"storefront":"/r/LinusU","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/LinusU/node-albatross/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}