@byted-apaas/server-sdk-node 1.1.15-beta.1 → 1.1.15-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -571,6 +571,7 @@ class _KQuery {
571
571
  }
572
572
  else {
573
573
  let criterion = (0, logic_1.buildCriterion)(queryBuilder.getLogic(), apiName, maxId);
574
+ console.log('walkRecordsByLimitOffset_start', criterion, server_common_node_1.utils.getLogID());
574
575
  rs = await Request.GetInstance().getRecordsOrCountByCriterion(apiName, await (0, logic_1.handleCriterion)(criterion), queryBuilder.fuzzySearch, orders, false, selectFields, i, newLimit, false, this.authType);
575
576
  }
576
577
  queryCount += rs.length;
@@ -580,6 +581,7 @@ class _KQuery {
580
581
  }
581
582
  }
582
583
  catch (err) {
584
+ console.log('walkRecordsByLimitOffset_err', err, server_common_node_1.utils.getLogID());
583
585
  throw err;
584
586
  }
585
587
  if (rs.length < queryBuilder_1.defaultLimit) {
@@ -63,6 +63,7 @@ function buildCriterion(logic, objectApiName, maxId = -1) {
63
63
  let index = 0;
64
64
  let logics = [];
65
65
  let expressions = [];
66
+ console.log('buildCriterion_log', 0, logic, logic.expressions, server_common_node_1.utils.getLogID());
66
67
  // check type of logic
67
68
  function f(logic, value = 'and') {
68
69
  // 1.如果是逻辑表达式
@@ -84,8 +85,10 @@ function buildCriterion(logic, objectApiName, maxId = -1) {
84
85
  // 2.否则是算法表达式
85
86
  let exps = logic;
86
87
  let logs = [];
88
+ console.log('buildCriterion_log', 111, exps, server_common_node_1.utils.getLogID());
87
89
  for (let left of Object.keys(exps)) {
88
90
  let right = logic[left];
91
+ console.log('buildCriterion_log', 222, JSON.stringify(right), right instanceof Condition, server_common_node_1.utils.getLogID());
89
92
  let copy = right;
90
93
  if (server_common_node_1.utils.isObject(right) && !(right instanceof Condition) && !isKunlunTypeOrSerializedObject(right)) {
91
94
  for (let leftInner of Object.keys(right)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byted-apaas/server-sdk-node",
3
- "version": "1.1.15-beta.1",
3
+ "version": "1.1.15-beta.11",
4
4
  "description": "aPaaS Server SDK",
5
5
  "author": "zhouwexin <zhouwexin@bytedance.com>",
6
6
  "homepage": "",
@@ -285,7 +285,6 @@ function handleResponse(objectAPIName, data, needCount) {
285
285
  }
286
286
  }
287
287
  async function getRecordsOrCountByCriterion(objectApiName, criterion, fuzzySearch, order, ignoreBackLookupField, fieldApiNames, offset, limit, needCount, authType) {
288
- console.log(criterion);
289
288
  // 1.check
290
289
  if (!objectApiName) {
291
290
  throw new exceptions.InternalError('objectApiName is empty');
@@ -610,7 +609,7 @@ async function getGlobalConfigByKey(key) {
610
609
  'biz_type': 'GlobalVariables',
611
610
  'used_by': 'UsedBySystem',
612
611
  'filter': {
613
- 'offset': offset * i,
612
+ 'offset': pageSize * i,
614
613
  'limit': pageSize,
615
614
  },
616
615
  };