8000 GitHub - eugeneware/level-lively: Levelup/Leveldb implementation of LivelyDb for doing real-time data binding of a database with local javascript objects.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Levelup/Leveldb implementation of LivelyDb for doing real-time data binding of a database with local javascript objects.

License

Notifications You must be signed in to change notification settings

eugeneware/level-lively

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

level-lively

Levelup/Leveldb implementation of LivelyDb for doing real-time data binding of a database with local javascript objects.

Just one of multiple database implementations for the livedb real-time data-binding framework for replicating databases to local javascript objects.

build status

Installation

This module is installed via npm:

$ npm install level-lively

Example Usage

var levelLively = require('level-lively');

Example Usage

var LevelLively = require('level-lively');
var level = require('level');
var db = level('/path/to/db', { valueEncoding: 'json' });

// Write to the levelup database
var ldb = new LevelLively(db);
ldb.put('my key', 'my value, function (err) {
  // I/O or other error, pass it up the callback chain
  if (err) return callback(err);
});

// Read from the memory database
ldb.get('my key', function (err, value) {
  if (err) {
    if (err.notFound) {
      // handle not found error
      return;
    } else {
      // I/O or other error, pass it up the callback chain
      return callback(err);
    }
  }
});

// Delete from the memory database
ldb.del('my key', function (err) {
  // I/O or other error, pass it up the callback chain
  if (err) return callback(err);
});

About

Levelup/Leveldb implementation of LivelyDb for doing real-time data binding of a database with local javascript objects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0