| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Sun, 21 Dec 2025 11:16:31 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100119161029
location: https://web.archive.org/web/20100119161029/https://github.com/mrclash/narwhal-mongodb
server-timing: captures_list;dur=0.680367, exclusion.robots;dur=0.051293, exclusion.robots.policy;dur=0.039808, esindex;dur=0.012970, cdx.remote;dur=12.869162, LoadShardBlock;dur=209.550406, PetaboxLoader3.resolve;dur=44.912019, PetaboxLoader3.datanode;dur=54.632385
x-app-server: wwwb-app223-dc8
x-ts: 302
x-tr: 249
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app223; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Sun, 21 Dec 2025 11:16:31 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Tue, 19 Jan 2010 16:10:24 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "ae62c1eaced477bf3dbfc3ab81838bf7"
x-archive-orig-x-runtime: 125ms
x-archive-orig-content-length: 22343
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Tue, 19 Jan 2010 16:10:29 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_13_20100119091656_crawl101_IndexOnly-c/51_13_20100119160506_crawl101.arc.gz
server-timing: captures_list;dur=0.595307, exclusion.robots;dur=0.020233, exclusion.robots.policy;dur=0.009149, esindex;dur=0.011928, cdx.remote;dur=8.053868, LoadShardBlock;dur=76.510797, PetaboxLoader3.datanode;dur=89.349585, load_resource;dur=79.610277, PetaboxLoader3.resolve;dur=35.598801
x-app-server: wwwb-app223-dc8
x-ts: 200
x-tr: 221
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
mrclash's narwhal-mongodb at master - GitHub
This service is courtesy of Pledgie.
mrclash / narwhal-mongodb
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
Sending Request…
Enable Donations
Pledgie Donations
Once activated, we'll place the following badge in your repository's detail box:
Wrapper of MongoDB database for CommonJS — Read more
| name | age | message | |
|---|---|---|---|
| |
jars/ | Wed Oct 21 07:23:21 -0700 2009 | first commit [mrclash] |
| |
lib/ | Sun Nov 01 05:56:22 -0800 2009 | Collection.find now takes all the arguments int... [mrclash] |
| |
package.json | Tue Oct 27 12:05:12 -0700 2009 | Small bugfixing [mrclash] |
| |
readme.md | Tue Oct 27 14:42:39 -0700 2009 | Added more examples to readme.md [mrclash] |
| |
tests/ | Sun Nov 01 05:55:13 -0800 2009 | Fixed two assertions, now it doesn't use |itcount| [mrclash] |
readme.md
Javascript driver for Mongo database
narwhal-mongodb is a CommonJS-compliant JavaScript driver for the Mongo database. It wraps the official Java driver and emulates its behavior, while adding some JavaScript sugar and convenience methods.
Source & Download:
Mongo Homepage:
Mongo Java driver source
Example usage
var MongoDB = require("mongodb");
var db = new MongoDB.Mongo().getDB("mydb");
var colls = db.getCollectionNames();
colls.forEach(function(el) { print(el); });
var coll = db.getCollection("testCollection");
coll.drop();
var doc = {
"name" : "MongoDB",
"type" : "database",
"count" : 1,
"info" : {
x : 203,
y : 102
}
}
coll.insert(doc)
myDoc = coll.findOne();
print(myDoc);
// Now, lets add lots of little documents to the collection so we can explore queries and cursors
for (var i=0; i < 100; i++) {
coll.insert({"i": i});
}
print(coll.getCount());
// Let's get all the documents in the collection and print them out
var cur = coll.find();
while(cur.hasNext()) {
print(cur.next());
}
// Now use a query to get 1 document out
var query = { i: 71 };
cur = coll.find(query);
while(cur.hasNext())
print(cur.next());
// Now use a query to get a larger set
query = { "i": { "$gt": 50 } }; // i.e. find all where i > 50
cur = coll.find(query);
while(cur.hasNext())
print(cur.next());
