|
|
@ -284,7 +284,7 @@ class Xapi { |
|
|
|
this.mysql.getHavingClause(req.query._having, req.app.locals._tableName, queryParamsObj); |
|
|
|
this.mysql.getHavingClause(req.query._having, req.app.locals._tableName, queryParamsObj); |
|
|
|
|
|
|
|
|
|
|
|
/**************** add order clause ****************/ |
|
|
|
/**************** add order clause ****************/ |
|
|
|
queryParamsObj.query += this.mysql.getOrderByClause(req.query, req.app.locals._tableName); |
|
|
|
this.mysql.getOrderByClause(req.query, req.app.locals._tableName, queryParamsObj); |
|
|
|
|
|
|
|
|
|
|
|
/**************** add limit clause ****************/ |
|
|
|
/**************** add limit clause ****************/ |
|
|
|
queryParamsObj.query += ' limit ?,? ' |
|
|
|
queryParamsObj.query += ' limit ?,? ' |
|
|
@ -497,7 +497,7 @@ class Xapi { |
|
|
|
/**************** where clause ****************/ |
|
|
|
/**************** where clause ****************/ |
|
|
|
this.mysql.getHavingClause(req.query._having, req.app.locals._tableName, queryParamsObj, ' having '); |
|
|
|
this.mysql.getHavingClause(req.query._having, req.app.locals._tableName, queryParamsObj, ' having '); |
|
|
|
|
|
|
|
|
|
|
|
queryParamsObj.query = queryParamsObj.query + this.mysql.getOrderByClause(req.query, tableName); |
|
|
|
this.mysql.getOrderByClause(req.query, tableName, queryParamsObj); |
|
|
|
|
|
|
|
|
|
|
|
//console.log(queryParamsObj.query, queryParamsObj.params);
|
|
|
|
//console.log(queryParamsObj.query, queryParamsObj.params);
|
|
|
|
var results = await this.mysql.exec(queryParamsObj.query, queryParamsObj.params); |
|
|
|
var results = await this.mysql.exec(queryParamsObj.query, queryParamsObj.params); |
|
|
|