Skip to content

Commit

Permalink
fix: cube prefixed twice
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianvasquez committed Oct 4, 2022
1 parent 92b5077 commit 6be6d14
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/Cube.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class Cube extends Node {

this.source = source
this.ignore = new TermSet(ignore)
this.queryPrefix = '#pragma describe.strategy cbd\n'
this.quads = []
}

Expand All @@ -38,10 +37,8 @@ class Cube extends Node {
}

cubeQuery () {
const prefix = this.queryPrefix || ''
const query = cubeQuery({ cube: this.term, graph: this.source.graph })

return [prefix, query.toString()].join('')
return query.toString()
}

async fetchCube () {
Expand All @@ -54,10 +51,10 @@ class Cube extends Node {

shapeQuery () {
if (!this.source.graph) {
return `${this.queryPrefix}DESCRIBE <${this.ptr.out(ns.cube.observationConstraint).value}>`
return `DESCRIBE <${this.ptr.out(ns.cube.observationConstraint).value}>`
}

return `${this.queryPrefix}DESCRIBE <${this.ptr.out(ns.cube.observationConstraint).value}> FROM <${this.source.graph.value}>`
return `DESCRIBE <${this.ptr.out(ns.cube.observationConstraint).value}> FROM <${this.source.graph.value}>`
}

async fetchShape () {
Expand Down

0 comments on commit 6be6d14

Please sign in to comment.