Permalink
Browse files

Bumped v0.8.2. Updated HISTORY. New bundle.

  • Loading branch information...
mcollina committed Jan 19, 2014
1 parent 0167e80 commit 96876ab164864ed2cc0d87a5dfca5838413729dc
Showing with 17 additions and 8 deletions.
  1. +5 −0 HISTORY.md
  2. +1 −1 bower.json
  3. +7 −3 build/levelgraph.js
  4. +3 −3 build/levelgraph.min.js
  5. +1 −1 package.json
View
@@ -2,6 +2,11 @@
History
======
## 0.8.2
* Exposed `generateBatch()` method
[#62](https://github.com/mcollina/levelgraph/issues/62).
## 0.8.1
* Fixed deferred open support for searches over IndexedDB.
View
@@ -1,5 +1,5 @@
{
"name": "levelgraph",
"version": "0.8.1",
"version": "0.8.2",
"main": "build/levelgraph.js"
}
View
@@ -254,6 +254,7 @@ module.exports = function levelgraph(leveldb, options, readyCallback) {
, nav: function(start) {
return new Navigator({ start: start, db: this });
}
, generateBatch: utilities.generateBatch
};
db.joinStream = function(a, b, c) {
@@ -341,7 +342,7 @@ doAction = function(action, leveldb) {
}
var actions = triples.reduce(function(acc, triple) {
return acc.concat(utilities.genActions(action, triple));
return acc.concat(utilities.generateBatch(triple, action));
}, []);
leveldb.batch(actions, cb);
@@ -1003,14 +1004,17 @@ function createQuery(pattern, options) {
module.exports.createQuery = createQuery;
function genActions(action, triple) {
function generateBatch(triple, action) {
if (!action) {
action = 'put';
}
var json = JSON.stringify(triple);
return genKeys(triple).map(function(key) {
return { type: action, key: key, value: json };
});
}
module.exports.genActions = genActions;
module.exports.generateBatch = generateBatch;
function materializer(pattern, data) {
return Object.keys(pattern)
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,6 +1,6 @@
{
"name": "levelgraph",
"version": "0.8.1",
"version": "0.8.2",
"description": "A graph database for Node.js and the browser built on top of LevelUp",
"main": "lib/levelgraph.js",
"scripts": {

0 comments on commit 96876ab

Please sign in to comment.