Skip to content

Commit 7d80ff5

Browse files
committed
Fix default graph translation in MemoryDatasource
1 parent 4702a8d commit 7d80ff5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/datasources/MemoryDatasource.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ MemoryDatasource.prototype._getAllQuads = function (addQuad, done) {
2525

2626
// Writes the results of the query to the given quad stream
2727
MemoryDatasource.prototype._executeQuery = function (query, destination) {
28+
if (query.graph === '')
29+
query.graph = this._quadStore.defaultGraph;
2830
var offset = query.offset || 0, limit = query.limit || Infinity,
2931
quads = this._quadStore.findByIRI(query.subject, query.predicate, query.object,
3032
query.graph);

0 commit comments

Comments
 (0)