@byted-apaas/server-sdk-node 1.0.8 → 1.0.9
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.
|
@@ -158,7 +158,7 @@ export interface _IKQuery<T> {
|
|
|
158
158
|
* context.db.object("_user").orderBy(["_email", "_phoneNumber"]).find()
|
|
159
159
|
* ```
|
|
160
160
|
*/
|
|
161
|
-
orderBy<K extends keyof T>(fieldApiNames: K[]): _IKQuery<T>;
|
|
161
|
+
orderBy<K extends keyof T>(fieldApiNames: K[]): Omit<_IKQuery<T>, 'findAll'>;
|
|
162
162
|
/**
|
|
163
163
|
* 根据指定字段升序排序(a -> z, 0 -> 9)
|
|
164
164
|
* @param fieldApiNames 排序依据的字段,按先后顺序确定优先级,用逗号分隔
|
|
@@ -167,7 +167,7 @@ export interface _IKQuery<T> {
|
|
|
167
167
|
* context.db.object("_user").orderBy("_email", "_phoneNumber").find()
|
|
168
168
|
* ```
|
|
169
169
|
*/
|
|
170
|
-
orderBy<K extends keyof T>(...fieldApiNames: K[]): _IKQuery<T>;
|
|
170
|
+
orderBy<K extends keyof T>(...fieldApiNames: K[]): Omit<_IKQuery<T>, 'findAll'>;
|
|
171
171
|
/**
|
|
172
172
|
* 根据指定字段降序排序(z -> a, 9 -> 0)
|
|
173
173
|
* @param fieldApiNames 排序依据的字段数组,按先后顺序确定优先级
|
|
@@ -176,7 +176,7 @@ export interface _IKQuery<T> {
|
|
|
176
176
|
* context.db.object("_user").orderByDesc("_email", "_phoneNumber").find()
|
|
177
177
|
* ```
|
|
178
178
|
*/
|
|
179
|
-
orderByDesc<K extends keyof T>(fieldApiNames: K[]): _IKQuery<T>;
|
|
179
|
+
orderByDesc<K extends keyof T>(fieldApiNames: K[]): Omit<_IKQuery<T>, 'findAll'>;
|
|
180
180
|
/**
|
|
181
181
|
* 根据指定字段降序排序(z -> a, 9 -> 0)
|
|
182
182
|
* @param fieldApiNames 排序依据的字段,按先后顺序确定优先级,用逗号分隔
|
|
@@ -185,7 +185,7 @@ export interface _IKQuery<T> {
|
|
|
185
185
|
* context.db.object("_user").orderByDesc("_email", "_phoneNumber").find()
|
|
186
186
|
* ```
|
|
187
187
|
*/
|
|
188
|
-
orderByDesc<K extends keyof T>(...fieldApiNames: K[]): _IKQuery<T>;
|
|
188
|
+
orderByDesc<K extends keyof T>(...fieldApiNames: K[]): Omit<_IKQuery<T>, 'findAll'>;
|
|
189
189
|
/**
|
|
190
190
|
* 指定需返回的字段
|
|
191
191
|
* @param fieldApiNames 需返回的字段数组
|
|
@@ -194,7 +194,7 @@ export interface _IKQuery<T> {
|
|
|
194
194
|
* context.db.object("_user").select(["_name", "_email"]).find()
|
|
195
195
|
* ```
|
|
196
196
|
*/
|
|
197
|
-
select<K extends keyof T>(fieldApiNames: K[]): _IKQuery<T>;
|
|
197
|
+
select<K extends keyof T>(fieldApiNames: K[]): Omit<_IKQuery<T>, 'findAll'>;
|
|
198
198
|
/**
|
|
199
199
|
* 指定需返回的字段
|
|
200
200
|
* @param fieldApiNames 需返回的字段,用逗号分隔
|
|
@@ -203,7 +203,7 @@ export interface _IKQuery<T> {
|
|
|
203
203
|
* context.db.object("_user").select("_name", "_email").find()
|
|
204
204
|
* ```
|
|
205
205
|
*/
|
|
206
|
-
select<K extends keyof T>(...fieldApiNames: K[]): _IKQuery<T>;
|
|
206
|
+
select<K extends keyof T>(...fieldApiNames: K[]): Omit<_IKQuery<T>, 'findAll'>;
|
|
207
207
|
/**
|
|
208
208
|
* 设置查询条件
|
|
209
209
|
* @param conditionMap 对字段赋值以指定查询筛选条件
|
|
@@ -215,11 +215,11 @@ export interface _IKQuery<T> {
|
|
|
215
215
|
* }).find()
|
|
216
216
|
* ```
|
|
217
217
|
*/
|
|
218
|
-
where(conditionMap: _WhereCond<T>): _IKQuery<T>;
|
|
218
|
+
where(conditionMap: _WhereCond<T>): Omit<_IKQuery<T>, 'findAll'>;
|
|
219
219
|
/**
|
|
220
220
|
* 设置查询条件
|
|
221
221
|
*/
|
|
222
|
-
where(): _IKQuery<T>;
|
|
222
|
+
where(): Omit<_IKQuery<T>, 'findAll'>;
|
|
223
223
|
/**
|
|
224
224
|
* 指定分页查询的数量
|
|
225
225
|
* @param limit 分页查询的数量
|
|
@@ -229,7 +229,7 @@ export interface _IKQuery<T> {
|
|
|
229
229
|
* context.db.object("_user").limit(10)
|
|
230
230
|
* ```
|
|
231
231
|
*/
|
|
232
|
-
limit(limit: number): _IKQuery<T>;
|
|
232
|
+
limit(limit: number): Omit<_IKQuery<T>, 'findAll'>;
|
|
233
233
|
/**
|
|
234
234
|
* 指定分页查询的偏移量
|
|
235
235
|
* @param offset 分页查询的偏移量
|
|
@@ -239,7 +239,7 @@ export interface _IKQuery<T> {
|
|
|
239
239
|
* context.db.object("_user").offset(0)
|
|
240
240
|
* ```
|
|
241
241
|
*/
|
|
242
|
-
offset(offset: number): _IKQuery<T>;
|
|
242
|
+
offset(offset: number): Omit<_IKQuery<T>, 'findAll'>;
|
|
243
243
|
/**
|
|
244
244
|
* 指定条件的行数
|
|
245
245
|
* @example
|
|
@@ -498,6 +498,7 @@ class _KQuery {
|
|
|
498
498
|
}
|
|
499
499
|
limit(limit) {
|
|
500
500
|
const { queryBuilder, queryV2 } = queryPropertiesStore.get(this);
|
|
501
|
+
limit = Number(limit);
|
|
501
502
|
if (queryV2) {
|
|
502
503
|
queryV2.limit(limit);
|
|
503
504
|
}
|
|
@@ -509,6 +510,7 @@ class _KQuery {
|
|
|
509
510
|
;
|
|
510
511
|
offset(offset) {
|
|
511
512
|
const { queryBuilder, queryV2 } = queryPropertiesStore.get(this);
|
|
513
|
+
offset = Number(offset);
|
|
512
514
|
if (queryV2) {
|
|
513
515
|
queryV2.offset(offset);
|
|
514
516
|
}
|