Skip to content

Commit c7c3077

Browse files
Moving graph_filter to graph
1 parent b903ddf commit c7c3077

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

lib/query/woqlQuery.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,17 @@ WOQLQuery.prototype.or = function(...queries) {
130130
return this
131131
}
132132

133-
WOQLQuery.prototype.from = function(graph_filter, query) {
134-
//if (graph_filter && graph_filter == 'args')
135-
//return ['graph_filter', 'query']
133+
WOQLQuery.prototype.from = function(graph, query) {
134+
//if (graph && graph == 'args')
135+
//return ['graph', 'query']
136136
if (this.cursor['@type']) this.wrapCursorWithAnd()
137137
this.cursor['@type'] = 'From'
138-
if (!graph_filter || typeof graph_filter != 'string') {
138+
if (!graph || typeof graph != 'string') {
139139
return this.parameterError(
140140
'The first parameter to from must be a Graph Filter Expression (string)',
141141
)
142142
}
143-
this.cursor['graph_filter'] = graph_filter
143+
this.cursor['graph'] = graph
144144
return this.addSubQuery(query)
145145
}
146146

@@ -195,7 +195,7 @@ WOQLQuery.prototype.quad = function(a, b, c, g) {
195195
if (this.cursor['@type']) this.wrapCursorWithAnd()
196196
let args = this.triple(a, b, c)
197197
//if (a && a == 'args')
198-
//return args.concat(['graph_filter'])
198+
//return args.concat(['graph'])
199199
if (!g)
200200
return this.parameterError('Quad takes four parameters, the last should be a graph filter')
201201
this.cursor['@type'] = 'Triple'
@@ -207,23 +207,23 @@ WOQLQuery.prototype.added_quad = function(a, b, c, g) {
207207
if (this.cursor['@type']) this.wrapCursorWithAnd()
208208
let args = this.triple(a, b, c)
209209
//if (a && a == 'args')
210-
//return args.concat(['graph_filter'])
210+
//return args.concat(['graph'])
211211
if (!g)
212212
return this.parameterError('Quad takes four parameters, the last should be a graph filter')
213213
this.cursor['@type'] = 'AddedQuad'
214-
this.cursor['graph_filter'] = this.cleanGraph(g)
214+
this.cursor['graph'] = this.cleanGraph(g)
215215
return this
216216
}
217217

218218
WOQLQuery.prototype.removed_quad = function(a, b, c, g) {
219219
if (this.cursor['@type']) this.wrapCursorWithAnd()
220220
let args = this.triple(a, b, c)
221221
//if (a && a == 'args')
222-
//return args.concat(['graph_filter'])
222+
//return args.concat(['graph'])
223223
if (!g)
224224
return this.parameterError('Quad takes four parameters, the last should be a graph filter')
225225
this.cursor['@type'] = 'RemovedQuad'
226-
this.cursor['graph_filter'] = this.cleanGraph(g)
226+
this.cursor['graph'] = this.cleanGraph(g)
227227
return this
228228
}
229229

@@ -953,4 +953,4 @@ WOQLQuery.prototype.type_of = function(a, b) {
953953
return this
954954
}
955955

956-
module.exports = WOQLQuery
956+
module.exports = WOQLQuery

test/woql.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ describe('woql queries', function () {
143143
const woqlObject=WOQL.from("http://dburl", WOQLQuery);
144144
const jsonObj={
145145
"@type": "From",
146-
"graph_filter": "http://dburl",
146+
"graph": "http://dburl",
147147
"query": {
148148
"@type": "Limit",
149149
"limit": 10,

0 commit comments

Comments
 (0)