Add count parameter in read node to return total_count

This commit is contained in:
Raimon Esteve 2018-06-05 11:17:09 +02:00
parent d13477e247
commit 58f4e0a675
1 changed files with 3 additions and 2 deletions

View File

@ -24,10 +24,11 @@ constructor(){
* @param {Array<string>} fields Fields to get
* @param {number} offset Sets where to start gathering data after getting it, the default value no offset
* @param {any} limit Limits the number of data returned, default None
* @param {false} count Return total_count
*/
addNode(method: string, domain: any, fields: Array<string>, offset = 0, limit:any = '', order:any=[]){
addNode(method: string, domain: any, fields: Array<string>, offset = 0, limit:any = '', order:any=[], count:boolean = false ){
this.root = {}
this.root[method] = [domain, fields, offset, limit, order];
this.root[method] = [domain, fields, offset, limit, order, count];
this.root_send.root.push(this.root);
}