Have ideas to improve npm?Join in the discussion! »

    haro-couchbase

    1.0.2 • Public • Published

    haro-couchbase

    Join the chat at https://gitter.im/avoidwork/haro-couchbase

    build status

    Harō is a modern immutable DataStore built with ES6 features, which can be wired to an API for a complete feedback loop. It is un-opinionated, and offers a plug'n'play solution to modeling, searching, & managing data on the client, or server (in RAM). It is a partially persistent data structure, by maintaining version sets of records in versions (MVCC).

    haro-couchbase is a persistent storage adapter, providing 'auto saving' behavior, as well as the ability to save(), load(), & unload() the entire DataStore or records.

    How to use

    Require the adapter & register it with haro.register(key, fn). The key must match the store.adapters key. The prefix will be used if set, otherwise store.id will be the prefix for localStorage items. Records will be have keys as prefix_key, while DataStores will be prefix.

    For configuration options see couchbase.

    var haro = require('haro'),
        store;
     
    // Configure a store to utilize the adapter
    store = haro(null, {
      adapters: {
        couchbase: {
            prefix: "myData",
            cluster: "couchbase://127.0.0.1"
        }
      }
    });
     
    // Register the adapter
    store.register('couchbase', require('haro-couchbase'));
     
    // Ready to `load()`, `batch()` or `set()`!

    License

    Copyright (c) 2015 Jason Mulligan Licensed under the BSD-3 license

    Install

    npm i haro-couchbase

    DownloadsWeekly Downloads

    2

    Version

    1.0.2

    License

    BSD-3-Clause

    Last publish

    Collaborators

    • avatar