@byted-apaas/server-sdk-node 1.1.14-beta.3 → 1.1.15-beta.1
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.
|
@@ -535,6 +535,10 @@ class _KQuery {
|
|
|
535
535
|
selectFields = queryBuilder.getSelect();
|
|
536
536
|
orders = queryBuilder.getOrder();
|
|
537
537
|
}
|
|
538
|
+
// 当用户未设置排序字段时,强制指定为主键增序,避免数据重复
|
|
539
|
+
if (!orders || orders.length === 0) {
|
|
540
|
+
orders = [{ field: '_id', direction: 'asc', type: '' }];
|
|
541
|
+
}
|
|
538
542
|
let maxId = 0, queryCount = 0;
|
|
539
543
|
for (let i = offset; !limit || i < offset + limit; i += queryBuilder_1.defaultLimit) {
|
|
540
544
|
let newLimit = function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byted-apaas/server-sdk-node",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15-beta.1",
|
|
4
4
|
"description": "aPaaS Server SDK",
|
|
5
5
|
"author": "zhouwexin <zhouwexin@bytedance.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"clean": "tsc --build --clean && rm -rf **/*.js.map"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@byted-apaas/server-common-node": "^2.0.
|
|
16
|
+
"@byted-apaas/server-common-node": "^2.0.4",
|
|
17
17
|
"@jorgeferrero/stream-to-buffer": "^2.0.6",
|
|
18
18
|
"dayjs": "^1.9.6",
|
|
19
19
|
"form-data": "^3.0.0",
|
package/request/openapi.js
CHANGED
|
@@ -285,6 +285,7 @@ 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);
|
|
288
289
|
// 1.check
|
|
289
290
|
if (!objectApiName) {
|
|
290
291
|
throw new exceptions.InternalError('objectApiName is empty');
|