Skip to content

Commit 3511915

Browse files
committed
Merge branch 'dev' of https://github.com/terminusdb/terminus-client into dev
2 parents b323356 + 5aebc0b commit 3511915

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

lib/woql.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,10 @@ WOQLQuery.prototype.getLimit = function(){
730730
return this.getPagingProperty("limit");
731731
}
732732

733+
WOQLQuery.prototype.setLimit = function(l){
734+
return this.setPagingProperty("limit", l);
735+
}
736+
733737
WOQLQuery.prototype.isPaged = function(q){
734738
q = (q ? q : this.query);
735739
for (const prop of Object.keys(q)) {
@@ -790,7 +794,7 @@ WOQLQuery.prototype.setPageSize = function(size){
790794
}
791795

792796
WOQLQuery.prototype.hasSelect = function(){
793-
return this.getPagingProperty("select");
797+
return (this.getPagingProperty("select") ? true : false);
794798
}
795799

796800
WOQLQuery.prototype.getSelectVariables = function(q){
@@ -972,6 +976,15 @@ WOQLQuery.prototype.getContext = function(q){
972976
}
973977
}
974978

979+
980+
/**
981+
* Retrieves the value of the current json-ld context
982+
*/
983+
WOQLQuery.prototype.context = function(c){
984+
this.cursor['@context'] = c;
985+
}
986+
987+
975988
/*
976989
* Transforms from internal json representation to human writable WOQL.js format
977990
*/
@@ -1055,6 +1068,9 @@ WOQLQuery.prototype.prettyPrint = function(indent, show_context, q, embed){
10551068
}
10561069
}
10571070
}
1071+
if(str.substring(str.length-1) == "."){
1072+
str = str.substring(0, str.length-1);
1073+
}
10581074
return str;
10591075
}
10601076

0 commit comments

Comments
 (0)