0.2.0 • Published 10 years ago

couchbase-promise v0.2.0

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

couchbase-promise

A promise-based asynchronous library for Couchbase and node.js.

The Official Couchbase Node.js Client Library provides only callback functions to handle the result of the asynchronous operations. This couchbase-promise library wraps those callback functions with Bluebird promises to provide a convenient, promise-based interface.

Build Status Build status NPM version Downloads

NPM

Usage

First, install couchbase-promise as a dependency:

npm install --save couchbase-promise

Then, reference it in your code file:

var Repository = require('couchbase-promise');

Initialize the repository with the connection string and the name of the bucket you want to connect to:

Repository.init('http://localhost:8091', 'default');

Use the static methods of the Repository class to manage documents stored in your Couchbase database directly by their document identifiers:

  • createAsync
  • existsAsync
  • getAsync
  • replaceAsync
  • deleteAsync

You can also use the getViewAsync method to query a document by a view.

Limitations

  • As a static class, currently supports only one connection string and one bucket.
  • The views are always updated before reading data from them (stale not configurable yet).

Tip: If you find anything that limits the usage of this library for you, feel free the post a new issue and describe it.

0.2.0

10 years ago

0.1.0

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago