You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting this exception:
Uncaught TypeError: this.db.approximateSize is not a function
at DB.approximateSize (index.js:83)
at deferred-leveldown.js:23
at Array.forEach ()
at deferred-leveldown.js:22
at abstract-leveldown.js:33
at abstract-leveldown.js:33
at IDBOpenDBRequest.req.onsuccess (index.js:46)
var level = require('level');
var levelgraph = require("levelgraph");
var db = levelgraph( level('newDB' ) ) ;
db.put( [{
subject: "matteo",
predicate: "friend",
object: "daniele"
}, {
subject: "daniele",
predicate: "friend",
object: "matteo"
},
works fine but when I try to use db.nav("matteo").archIn("friend").archOut("friend").
solutions(function(err, results) {
console.log(results);
});
I get this exception.
I am using latest level and level-graph.
"dependencies": {
..................
"level": "^5.0.0-0",
"level-js": "^4.0.0",
"levelgraph": "^2.1.1",
.....
}
For now I could get it working(I can see correct output) by commenting out code in "node_modules\encoding-down\index.js":
// DB.prototype.approximateSize = function (start, end, opts, cb) {
// start = this.codec.encodeKey(start, opts)
// end = this.codec.encodeKey(end, opts)
// return this.db.approximateSize(start, end, opts, cb)
// }
but I am not fully sure whether this is a right way to do ??
As per my understanding from various of posts , "db.approximateSize" has been moved to leveldown and so is not part of level-js and hence commenting it out is correct.
Can you please suggest the correct wayout ?
The text was updated successfully, but these errors were encountered:
@mcollina
Getting this exception:
Uncaught TypeError: this.db.approximateSize is not a function
at DB.approximateSize (index.js:83)
at deferred-leveldown.js:23
at Array.forEach ()
at deferred-leveldown.js:22
at abstract-leveldown.js:33
at abstract-leveldown.js:33
at IDBOpenDBRequest.req.onsuccess (index.js:46)
var level = require('level');
var levelgraph = require("levelgraph");
var db = levelgraph( level('newDB' ) ) ;
db.put( [{
subject: "matteo",
predicate: "friend",
object: "daniele"
}, {
subject: "daniele",
predicate: "friend",
object: "matteo"
},
works fine but when I try to use
db.nav("matteo").archIn("friend").archOut("friend").
solutions(function(err, results) {
console.log(results);
});
I get this exception.
I am using latest level and level-graph.
"dependencies": {
..................
"level": "^5.0.0-0",
"level-js": "^4.0.0",
"levelgraph": "^2.1.1",
.....
}
For now I could get it working(I can see correct output) by commenting out code in "node_modules\encoding-down\index.js":
// DB.prototype.approximateSize = function (start, end, opts, cb) {
// start = this.codec.encodeKey(start, opts)
// end = this.codec.encodeKey(end, opts)
// return this.db.approximateSize(start, end, opts, cb)
// }
but I am not fully sure whether this is a right way to do ??
As per my understanding from various of posts , "db.approximateSize" has been moved to leveldown and so is not part of level-js and hence commenting it out is correct.
Can you please suggest the correct wayout ?
The text was updated successfully, but these errors were encountered: