mirror of https://gitee.com/bigwinds/arangodb
#1053 - step1: now limiting returned arguments in documentation view for single document
This commit is contained in:
parent
ab0d3e1732
commit
b89583f34a
|
@ -159,7 +159,7 @@
|
||||||
"count": this.getPageSize()
|
"count": this.getPageSize()
|
||||||
};
|
};
|
||||||
|
|
||||||
query = "FOR x in @@collection";
|
query = "FOR x in @@collection let att = slice(ATTRIBUTES(x), 0, 10)";
|
||||||
query += this.setFiltersForQuery(bindVars);
|
query += this.setFiltersForQuery(bindVars);
|
||||||
// Sort result, only useful for a small number of docs
|
// Sort result, only useful for a small number of docs
|
||||||
if (this.getTotal() < this.MAX_SORT) {
|
if (this.getTotal() < this.MAX_SORT) {
|
||||||
|
@ -173,14 +173,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bindVars.count !== 'all') {
|
if (bindVars.count !== 'all') {
|
||||||
query += " LIMIT @offset, @count RETURN x";
|
query += " LIMIT @offset, @count RETURN keep(x, att)";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tmp = {
|
tmp = {
|
||||||
"@collection": this.collectionID
|
"@collection": this.collectionID
|
||||||
};
|
};
|
||||||
bindVars = tmp;
|
bindVars = tmp;
|
||||||
query += " RETURN x";
|
query += " RETURN keep(x, att)";
|
||||||
}
|
}
|
||||||
|
|
||||||
queryObj = {
|
queryObj = {
|
||||||
|
|
Loading…
Reference in New Issue