landlord-couchbase

1.0.1 • Public • Published

landlord-couchbase

A Store implementation for the landlord module using Couchbase.

Usage

Add landlord-couchbase as a dependency in package.json:

$ npm install landlord-couchbase -S

Then configure instances of Landlord to use landlord-couchbase as it's store:

const couchbase = require('couchbase-promises');
const Landlord = require('landlord');
const Store = require('landlord-couchbase');
 
const cluster = new couchbase.Cluster('couchbase://127.0.0.1');
const bucket = cluster.openBucket('default');
 
const store = new Store({ bucket: bucket });
 
const landlord = new Landlord({
  store: store
});

Couchbase

This module expects couchbase-promises-styled Bucket instances. This is because couchbase-promises provides a number of "multi" operation methods for batching document mutations. At a minimum, landlord-couchbase expects buckets to have the methods: insertMultiAsync(), removeMultiAsync(), and touchMultiAsync().

Dependencies (1)

Dev Dependencies (4)

Package Sidebar

Install

npm i landlord-couchbase

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • dsfields