https://github.com/dsfields/landlord-couchbase
A Landlord Store implementation using Couchbase.
https://github.com/dsfields/landlord-couchbase
Last synced: about 1 year ago
JSON representation
A Landlord Store implementation using Couchbase.
- Host: GitHub
- URL: https://github.com/dsfields/landlord-couchbase
- Owner: dsfields
- Created: 2016-12-17T21:13:46.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-28T18:19:06.000Z (over 9 years ago)
- Last Synced: 2025-03-09T23:18:00.340Z (over 1 year ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# landlord-couchbase
A [`Store`](https://www.npmjs.com/package/landlord#stores) implementation for the [`landlord`](https://www.npmjs.com/package/landlord) module using [Couchbase](http://couchbase.com).
## Usage
Add `landlord-couchbase` as a dependency in `package.json`:
```sh
$ npm install landlord-couchbase -S
```
Then configure instances of `Landlord` to use `landlord-couchbase` as it's store:
```js
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`](https://www.npmjs.com/package/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()`.