Skip to content

Commit 6cf62d6

Browse files
authored
Merge pull request #22 from e-e-e/update-hyperdb
update hyperdb and use real deletion
2 parents aeb447f + d76c64c commit 6cf62d6

4 files changed

Lines changed: 80 additions & 56 deletions

File tree

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Graph.prototype._generateBatch = function (triple, action) {
269269
data = JSON.stringify(utils.extraDataMask(triple))
270270
}
271271
return this._encodeKeys(triple).map(key => ({
272-
type: 'put', // no delete in hyperdb so just putting nulls
272+
type: action,
273273
key: key,
274274
value: data
275275
}))

package-lock.json

Lines changed: 76 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"url": "https://github.com/e-e-e/hyper-graph-db/issues"
1212
},
1313
"dependencies": {
14-
"hyperdb": "^3.1.0",
14+
"hyperdb": "^3.4.0",
1515
"inherits": "^2.0.3",
1616
"lru": "^3.1.0",
1717
"pump": "^3.0.0",

test/triple-store.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ describe('generateBatch', function () {
628628
var ops = db._generateBatch(triple, 'del')
629629
expect(ops).to.have.property('length', 6)
630630
ops.forEach(function (op) {
631-
expect(op).to.have.property('type', 'put')
631+
expect(op).to.have.property('type', 'del')
632632
expect(JSON.parse(op.value)).to.eql(null)
633633
})
634634
})
@@ -656,7 +656,7 @@ describe('generateBatch', function () {
656656
var ops = db._generateBatch(triple, 'del')
657657
expect(ops).to.have.property('length', 3)
658658
ops.forEach(function (op) {
659-
expect(op).to.have.property('type', 'put')
659+
expect(op).to.have.property('type', 'del')
660660
expect(JSON.parse(op.value)).to.eql(null)
661661
})
662662
})

0 commit comments

Comments
 (0)