Browse files

Bumped v0.8.2. Updated HISTORY. New bundle.

  • Loading branch information...
1 parent 0167e80 commit 96876ab164864ed2cc0d87a5dfca5838413729dc @mcollina committed Jan 19, 2014
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
5 HISTORY.md
@@ -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
2 bower.json
@@ -1,5 +1,5 @@
{
"name": "levelgraph",
- "version": "0.8.1",
+ "version": "0.8.2",
"main": "build/levelgraph.js"
}
View
10 build/levelgraph.js
@@ -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
6 build/levelgraph.min.js
3 additions, 3 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2 package.json
@@ -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.