2.0.0 • Published 9 years ago

bedquilt v2.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

node-bedquilt

The nodejs driver for BedquiltDB

Requires node >= 4.0.0

CircleCI

Install

$ npm install bedquilt --save

Getting Started

  • First, set up BedquiltDB
  • Install the node-bedquilt package: npm install bedquilt
  • Connect to the BedquiltDB server:
var BedquiltClient = require('bedquilt').BedquiltClient;

BedquiltClient.connect('postgres://localhost/test', function(err, client) {

  var people = client.collection('people');

  people.insert({name: "Sarah", age: 45}, function(err, result) {
    console.log('Added Sarah to the people collection with _id: ' + result);
  });

  people.find({age: {'$gte': 50, '$lte': 70}}, function(err, result) {
    console.log('Users between 50 and 70: ' + result.length)
  });

  // streaming
  cursor = people.find({city: {'$in': ['Edinburgh', 'Glasgow']}})
  cursor.on('row', function(person) {
    console.log('Someone from Scotland: ' + person.name)
  });
  cursor.on('end', function() {
    console.log('done');
  });

});

Documentation

See the node-bedquilt documentation.

Tests

Run make test to run the test suite. Requires a local instance of PostgreSQL, with BedquiltDB installed and a bedquilt_test database set up.

2.0.0

9 years ago

1.6.1

9 years ago

1.6.0

9 years ago

1.5.1

9 years ago

1.5.0

10 years ago

1.4.0

10 years ago

1.3.0

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago