Skip to content

Commit

Permalink
update hyperdb and use real deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
e-e-e committed Aug 8, 2018
1 parent aeb447f commit d76c64c
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 56 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -269,7 +269,7 @@ Graph.prototype._generateBatch = function (triple, action) {
data = JSON.stringify(utils.extraDataMask(triple))
}
return this._encodeKeys(triple).map(key => ({
type: 'put', // no delete in hyperdb so just putting nulls
type: action,
key: key,
value: data
}))
Expand Down
128 changes: 76 additions & 52 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -11,7 +11,7 @@
"url": "https://github.com/e-e-e/hyper-graph-db/issues"
},
"dependencies": {
"hyperdb": "^3.1.0",
"hyperdb": "^3.4.0",
"inherits": "^2.0.3",
"lru": "^3.1.0",
"pump": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions test/triple-store.spec.js
Expand Up @@ -628,7 +628,7 @@ describe('generateBatch', function () {
var ops = db._generateBatch(triple, 'del')
expect(ops).to.have.property('length', 6)
ops.forEach(function (op) {
expect(op).to.have.property('type', 'put')
expect(op).to.have.property('type', 'del')
expect(JSON.parse(op.value)).to.eql(null)
})
})
Expand Down Expand Up @@ -656,7 +656,7 @@ describe('generateBatch', function () {
var ops = db._generateBatch(triple, 'del')
expect(ops).to.have.property('length', 3)
ops.forEach(function (op) {
expect(op).to.have.property('type', 'put')
expect(op).to.have.property('type', 'del')
expect(JSON.parse(op.value)).to.eql(null)
})
})
Expand Down

0 comments on commit d76c64c

Please sign in to comment.