@itwin/core-common 3.5.0-dev.60 → 3.5.0-dev.63
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.
- package/lib/cjs/ConcurrentQuery.d.ts +181 -1
- package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
- package/lib/cjs/ConcurrentQuery.js +173 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ElementMesh.d.ts +40 -0
- package/lib/cjs/ElementMesh.d.ts.map +1 -0
- package/lib/cjs/ElementMesh.js +57 -0
- package/lib/cjs/ElementMesh.js.map +1 -0
- package/lib/cjs/core-common.d.ts +1 -0
- package/lib/cjs/core-common.d.ts.map +1 -1
- package/lib/cjs/core-common.js +1 -0
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.d.ts +2 -0
- package/lib/cjs/rpc/IModelReadRpcInterface.d.ts.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js +4 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/ConcurrentQuery.d.ts +181 -1
- package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
- package/lib/esm/ConcurrentQuery.js +173 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ElementMesh.d.ts +40 -0
- package/lib/esm/ElementMesh.d.ts.map +1 -0
- package/lib/esm/ElementMesh.js +53 -0
- package/lib/esm/ElementMesh.js.map +1 -0
- package/lib/esm/core-common.d.ts +1 -0
- package/lib/esm/core-common.d.ts.map +1 -1
- package/lib/esm/core-common.js +1 -0
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.d.ts +2 -0
- package/lib/esm/rpc/IModelReadRpcInterface.d.ts.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js +4 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/package.json +7 -7
|
@@ -80,6 +80,12 @@ export interface BaseReaderOptions {
|
|
|
80
80
|
usePrimaryConn?: boolean;
|
|
81
81
|
/** Restrict time or memory for query but use as hint and may be changed base on backend settings */
|
|
82
82
|
quota?: QueryQuota;
|
|
83
|
+
/**
|
|
84
|
+
* @internal
|
|
85
|
+
* Allow query to be be deferred by milliseconds specified. This parameter is ignore by default unless
|
|
86
|
+
* concurrent query is configure to honour it.
|
|
87
|
+
*/
|
|
88
|
+
delay?: number;
|
|
83
89
|
}
|
|
84
90
|
/**
|
|
85
91
|
* ECSql query config
|
|
@@ -122,44 +128,210 @@ export declare class QueryOptionsBuilder {
|
|
|
122
128
|
private _options;
|
|
123
129
|
constructor(_options?: QueryOptions);
|
|
124
130
|
getOptions(): QueryOptions;
|
|
131
|
+
/**
|
|
132
|
+
* @internal
|
|
133
|
+
* Allow to set priority of query. Query will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.
|
|
134
|
+
* @param val integer value which can be negative as well. By default its zero.
|
|
135
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
136
|
+
*/
|
|
125
137
|
setPriority(val: number): this;
|
|
138
|
+
/**
|
|
139
|
+
* Allow to set restart token. If restart token is set then any other query(s) in queue with same token is cancelled if its not already executed.
|
|
140
|
+
* @param val A string token identifying a use case in which previous query with same token is cancelled.
|
|
141
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
142
|
+
*/
|
|
126
143
|
setRestartToken(val: string): this;
|
|
144
|
+
/**
|
|
145
|
+
* Allow to set quota restriction for query. Its a hint and may be overriden or ignored by concurrent query manager.
|
|
146
|
+
* @param val @type QueryQuota Specify time and memory that can be used by a query.
|
|
147
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
148
|
+
*/
|
|
127
149
|
setQuota(val: QueryQuota): this;
|
|
150
|
+
/**
|
|
151
|
+
* Force a query to be executed synchronously against primary connection. This option is ignored if provided by frontend.
|
|
152
|
+
* @param val A boolean value to force use primary connection on main thread to execute query.
|
|
153
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
154
|
+
*/
|
|
128
155
|
setUsePrimaryConnection(val: boolean): this;
|
|
156
|
+
/**
|
|
157
|
+
* By default all blobs are abbreviated to save memory and network bandwidth. If set to false, all blob data will be returned by query as is.
|
|
158
|
+
* Use @type BlobReader to access blob data more efficiently.
|
|
159
|
+
* @param val A boolean value, if set to false will return complete blob type property data. This could cost time and network bandwidth.
|
|
160
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
161
|
+
*/
|
|
129
162
|
setAbbreviateBlobs(val: boolean): this;
|
|
163
|
+
/**
|
|
164
|
+
* When query fail to prepare it will log error. This setting will suppress log errors in case where query come from user typing it and its expected to fail often.
|
|
165
|
+
* @param val A boolean value, if set to true, any error logging will be suppressed.
|
|
166
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
167
|
+
*/
|
|
130
168
|
setSuppressLogErrors(val: boolean): this;
|
|
169
|
+
/**
|
|
170
|
+
* If set ECClassId, SourceECClassId and TargetECClassId system properties will return qualified name of class instead of a @typedef Id64String.
|
|
171
|
+
* @param val A boolean value.
|
|
172
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
173
|
+
*/
|
|
131
174
|
setConvertClassIdsToNames(val: boolean): this;
|
|
175
|
+
/**
|
|
176
|
+
* Specify limit for query. Limit determine number of rows and offset in result-set.
|
|
177
|
+
* @param val Specify count and offset from within the result-set of a ECSQL query.
|
|
178
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
179
|
+
*/
|
|
132
180
|
setLimit(val: QueryLimit): this;
|
|
181
|
+
/**
|
|
182
|
+
* Specify row format returned by concurrent query manager.
|
|
183
|
+
* @param val @enum QueryRowFormat specifying format for result.
|
|
184
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
185
|
+
*/
|
|
133
186
|
setRowFormat(val: QueryRowFormat): this;
|
|
187
|
+
/**
|
|
188
|
+
* @internal
|
|
189
|
+
* Defers execution of query in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.
|
|
190
|
+
* @param val Number of milliseconds.
|
|
191
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
192
|
+
*/
|
|
193
|
+
setDelay(val: number): this;
|
|
134
194
|
}
|
|
135
195
|
/** @beta */
|
|
136
196
|
export declare class BlobOptionsBuilder {
|
|
137
197
|
private _options;
|
|
138
198
|
constructor(_options?: BlobOptions);
|
|
139
199
|
getOptions(): BlobOptions;
|
|
200
|
+
/**
|
|
201
|
+
* @internal
|
|
202
|
+
* Allow to set priority of blob request. Blob request will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.
|
|
203
|
+
* @param val integer value which can be negative as well. By default its zero.
|
|
204
|
+
* @returns @type BlobOptionsBuilder for fluent interface.
|
|
205
|
+
*/
|
|
140
206
|
setPriority(val: number): this;
|
|
207
|
+
/**
|
|
208
|
+
* Allow to set restart token. If restart token is set then any other blob request in queue with same token is cancelled if its not already executed.
|
|
209
|
+
* @param val A string token identifying a use case in which previous blob request with same token is cancelled.
|
|
210
|
+
* @returns @type BlobOptionsBuilder for fluent interface.
|
|
211
|
+
*/
|
|
141
212
|
setRestartToken(val: string): this;
|
|
213
|
+
/**
|
|
214
|
+
* Allow to set quota restriction for blob request. Its a hint and may be overriden or ignored by concurrent query manager.
|
|
215
|
+
* @param val @type QueryQuota Specify time and memory that can be used by a query.
|
|
216
|
+
* @returns @type BlobOptionsBuilder for fluent interface.
|
|
217
|
+
*/
|
|
142
218
|
setQuota(val: QueryQuota): this;
|
|
219
|
+
/**
|
|
220
|
+
* Force a blob request to be executed synchronously against primary connection. This option is ignored if provided by frontend.
|
|
221
|
+
* @param val A boolean value to force use primary connection on main thread to execute blob request.
|
|
222
|
+
* @returns @type BlobOptionsBuilder for fluent interface.
|
|
223
|
+
*/
|
|
143
224
|
setUsePrimaryConnection(val: boolean): this;
|
|
225
|
+
/**
|
|
226
|
+
* Specify range with in the blob that need to be returned.
|
|
227
|
+
* @param val Specify offset and count of bytes that need to be returned.
|
|
228
|
+
* @returns @type BlobOptionsBuilder for fluent interface.
|
|
229
|
+
*/
|
|
144
230
|
setRange(val: BlobRange): this;
|
|
231
|
+
/**
|
|
232
|
+
* @internal
|
|
233
|
+
* Defers execution of blob request in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.
|
|
234
|
+
* @param val Number of milliseconds.
|
|
235
|
+
* @returns @type BlobOptionsBuilder for fluent interface.
|
|
236
|
+
*/
|
|
237
|
+
setDelay(val: number): this;
|
|
145
238
|
}
|
|
146
|
-
/**
|
|
239
|
+
/**
|
|
240
|
+
* @public
|
|
241
|
+
* QueryBinder allow to bind values to a ECSQL query.
|
|
242
|
+
* */
|
|
147
243
|
export declare class QueryBinder {
|
|
148
244
|
private _args;
|
|
149
245
|
private verify;
|
|
246
|
+
/**
|
|
247
|
+
* Bind boolean value to ECSQL statement.
|
|
248
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
249
|
+
* @param val Boolean value to bind to ECSQL statement.
|
|
250
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
251
|
+
*/
|
|
150
252
|
bindBoolean(indexOrName: string | number, val: boolean): this;
|
|
253
|
+
/**
|
|
254
|
+
* Bind blob value to ECSQL statement.
|
|
255
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
256
|
+
* @param val Blob value to bind to ECSQL statement.
|
|
257
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
258
|
+
*/
|
|
151
259
|
bindBlob(indexOrName: string | number, val: Uint8Array): this;
|
|
260
|
+
/**
|
|
261
|
+
* Bind double value to ECSQL statement.
|
|
262
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
263
|
+
* @param val Double value to bind to ECSQL statement.
|
|
264
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
265
|
+
*/
|
|
152
266
|
bindDouble(indexOrName: string | number, val: number): this;
|
|
267
|
+
/**
|
|
268
|
+
* Bind @typedef Id64String value to ECSQL statement.
|
|
269
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
270
|
+
* @param val @typedef Id64String value to bind to ECSQL statement.
|
|
271
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
272
|
+
*/
|
|
153
273
|
bindId(indexOrName: string | number, val: Id64String): this;
|
|
274
|
+
/**
|
|
275
|
+
* Bind @type OrderedId64Iterable to ECSQL statement.
|
|
276
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
277
|
+
* @param val @type OrderedId64Iterable value to bind to ECSQL statement.
|
|
278
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
279
|
+
*/
|
|
154
280
|
bindIdSet(indexOrName: string | number, val: OrderedId64Iterable): this;
|
|
281
|
+
/**
|
|
282
|
+
* Bind integer to ECSQL statement.
|
|
283
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
284
|
+
* @param val Integer value to bind to ECSQL statement.
|
|
285
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
286
|
+
*/
|
|
155
287
|
bindInt(indexOrName: string | number, val: number): this;
|
|
288
|
+
/**
|
|
289
|
+
* Bind struct to ECSQL statement. Struct specified as object.
|
|
290
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
291
|
+
* @param val struct value to bind to ECSQL statement.
|
|
292
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
293
|
+
*/
|
|
156
294
|
bindStruct(indexOrName: string | number, val: object): this;
|
|
295
|
+
/**
|
|
296
|
+
* Bind long to ECSQL statement.
|
|
297
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
298
|
+
* @param val Long value to bind to ECSQL statement.
|
|
299
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
300
|
+
*/
|
|
157
301
|
bindLong(indexOrName: string | number, val: number): this;
|
|
302
|
+
/**
|
|
303
|
+
* Bind string to ECSQL statement.
|
|
304
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
305
|
+
* @param val String value to bind to ECSQL statement.
|
|
306
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
307
|
+
*/
|
|
158
308
|
bindString(indexOrName: string | number, val: string): this;
|
|
309
|
+
/**
|
|
310
|
+
* Bind null to ECSQL statement.
|
|
311
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
312
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
313
|
+
*/
|
|
159
314
|
bindNull(indexOrName: string | number): this;
|
|
315
|
+
/**
|
|
316
|
+
* Bind @type Point2d to ECSQL statement.
|
|
317
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
318
|
+
* @param val @type Point2d value to bind to ECSQL statement.
|
|
319
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
320
|
+
*/
|
|
160
321
|
bindPoint2d(indexOrName: string | number, val: Point2d): this;
|
|
322
|
+
/**
|
|
323
|
+
* Bind @type Point3d to ECSQL statement.
|
|
324
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
325
|
+
* @param val @type Point3d value to bind to ECSQL statement.
|
|
326
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
327
|
+
*/
|
|
161
328
|
bindPoint3d(indexOrName: string | number, val: Point3d): this;
|
|
162
329
|
private static bind;
|
|
330
|
+
/**
|
|
331
|
+
* Allow bulk bind either parameters by index as value array or by parameter names as object.
|
|
332
|
+
* @param args if array of values is provided then array index is used as index. If object is provided then object property name is used as parameter name of reach value.
|
|
333
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
334
|
+
*/
|
|
163
335
|
static from(args: any[] | object | undefined): QueryBinder;
|
|
164
336
|
serialize(): object;
|
|
165
337
|
}
|
|
@@ -239,4 +411,12 @@ export declare class DbQueryError extends BentleyError {
|
|
|
239
411
|
export interface DbRequestExecutor<TRequest extends DbRequest, TResponse extends DbResponse> {
|
|
240
412
|
execute(request: TRequest): Promise<TResponse>;
|
|
241
413
|
}
|
|
414
|
+
/** @internal */
|
|
415
|
+
export interface DbQueryConfig {
|
|
416
|
+
globalQuota?: QueryQuota;
|
|
417
|
+
ignoreDelay?: boolean;
|
|
418
|
+
ignorePriority?: boolean;
|
|
419
|
+
requestQueueSize?: number;
|
|
420
|
+
workerThreads?: number;
|
|
421
|
+
}
|
|
242
422
|
//# sourceMappingURL=ConcurrentQuery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConcurrentQuery.d.ts","sourceRoot":"","sources":["../../src/ConcurrentQuery.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAqB,QAAQ,EAAQ,UAAU,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGxD;;;;;;GAMG;AACH,oBAAY,cAAc;IACxB;;OAEG;IACH,qBAAqB,IAAA;IACrB;;OAEG;IACH,uBAAuB,IAAA;IACvB;;OAEG;IACH,kBAAkB,IAAA;CACnB;AACD;;;;KAIK;AACL,MAAM,WAAW,UAAU;IACzB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AACD,YAAY;AACZ,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,YAAY;AACZ,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,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,YAAa,SAAQ,YAAY;aACT,QAAQ,EAAE,GAAG;aAAkB,OAAO,CAAC;gBAAvC,QAAQ,EAAE,GAAG,EAAkB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,QAAQ;WAGhF,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG;CAQxD;AACD,gBAAgB;AAChB,MAAM,WAAW,iBAAiB,CAAC,QAAQ,SAAS,SAAS,EAAE,SAAS,SAAS,UAAU;IACzF,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CAChD;AAED,gBAAgB;AAChB,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -39,42 +39,99 @@ class QueryOptionsBuilder {
|
|
|
39
39
|
this._options = _options;
|
|
40
40
|
}
|
|
41
41
|
getOptions() { return this._options; }
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
* Allow to set priority of query. Query will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.
|
|
45
|
+
* @param val integer value which can be negative as well. By default its zero.
|
|
46
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
47
|
+
*/
|
|
42
48
|
setPriority(val) {
|
|
43
49
|
this._options.priority = val;
|
|
44
50
|
return this;
|
|
45
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Allow to set restart token. If restart token is set then any other query(s) in queue with same token is cancelled if its not already executed.
|
|
54
|
+
* @param val A string token identifying a use case in which previous query with same token is cancelled.
|
|
55
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
56
|
+
*/
|
|
46
57
|
setRestartToken(val) {
|
|
47
58
|
this._options.restartToken = val;
|
|
48
59
|
return this;
|
|
49
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Allow to set quota restriction for query. Its a hint and may be overriden or ignored by concurrent query manager.
|
|
63
|
+
* @param val @type QueryQuota Specify time and memory that can be used by a query.
|
|
64
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
65
|
+
*/
|
|
50
66
|
setQuota(val) {
|
|
51
67
|
this._options.quota = val;
|
|
52
68
|
return this;
|
|
53
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Force a query to be executed synchronously against primary connection. This option is ignored if provided by frontend.
|
|
72
|
+
* @param val A boolean value to force use primary connection on main thread to execute query.
|
|
73
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
74
|
+
*/
|
|
54
75
|
setUsePrimaryConnection(val) {
|
|
55
76
|
this._options.usePrimaryConn = val;
|
|
56
77
|
return this;
|
|
57
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* By default all blobs are abbreviated to save memory and network bandwidth. If set to false, all blob data will be returned by query as is.
|
|
81
|
+
* Use @type BlobReader to access blob data more efficiently.
|
|
82
|
+
* @param val A boolean value, if set to false will return complete blob type property data. This could cost time and network bandwidth.
|
|
83
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
84
|
+
*/
|
|
58
85
|
setAbbreviateBlobs(val) {
|
|
59
86
|
this._options.abbreviateBlobs = val;
|
|
60
87
|
return this;
|
|
61
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* When query fail to prepare it will log error. This setting will suppress log errors in case where query come from user typing it and its expected to fail often.
|
|
91
|
+
* @param val A boolean value, if set to true, any error logging will be suppressed.
|
|
92
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
93
|
+
*/
|
|
62
94
|
setSuppressLogErrors(val) {
|
|
63
95
|
this._options.suppressLogErrors = val;
|
|
64
96
|
return this;
|
|
65
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* If set ECClassId, SourceECClassId and TargetECClassId system properties will return qualified name of class instead of a @typedef Id64String.
|
|
100
|
+
* @param val A boolean value.
|
|
101
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
102
|
+
*/
|
|
66
103
|
setConvertClassIdsToNames(val) {
|
|
67
104
|
this._options.convertClassIdsToClassNames = val;
|
|
68
105
|
return this;
|
|
69
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Specify limit for query. Limit determine number of rows and offset in result-set.
|
|
109
|
+
* @param val Specify count and offset from within the result-set of a ECSQL query.
|
|
110
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
111
|
+
*/
|
|
70
112
|
setLimit(val) {
|
|
71
113
|
this._options.limit = val;
|
|
72
114
|
return this;
|
|
73
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Specify row format returned by concurrent query manager.
|
|
118
|
+
* @param val @enum QueryRowFormat specifying format for result.
|
|
119
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
120
|
+
*/
|
|
74
121
|
setRowFormat(val) {
|
|
75
122
|
this._options.rowFormat = val;
|
|
76
123
|
return this;
|
|
77
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* @internal
|
|
127
|
+
* Defers execution of query in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.
|
|
128
|
+
* @param val Number of milliseconds.
|
|
129
|
+
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
130
|
+
*/
|
|
131
|
+
setDelay(val) {
|
|
132
|
+
this._options.delay = val;
|
|
133
|
+
return this;
|
|
134
|
+
}
|
|
78
135
|
}
|
|
79
136
|
exports.QueryOptionsBuilder = QueryOptionsBuilder;
|
|
80
137
|
/** @beta */
|
|
@@ -83,26 +140,62 @@ class BlobOptionsBuilder {
|
|
|
83
140
|
this._options = _options;
|
|
84
141
|
}
|
|
85
142
|
getOptions() { return this._options; }
|
|
143
|
+
/**
|
|
144
|
+
* @internal
|
|
145
|
+
* Allow to set priority of blob request. Blob request will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.
|
|
146
|
+
* @param val integer value which can be negative as well. By default its zero.
|
|
147
|
+
* @returns @type BlobOptionsBuilder for fluent interface.
|
|
148
|
+
*/
|
|
86
149
|
setPriority(val) {
|
|
87
150
|
this._options.priority = val;
|
|
88
151
|
return this;
|
|
89
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Allow to set restart token. If restart token is set then any other blob request in queue with same token is cancelled if its not already executed.
|
|
155
|
+
* @param val A string token identifying a use case in which previous blob request with same token is cancelled.
|
|
156
|
+
* @returns @type BlobOptionsBuilder for fluent interface.
|
|
157
|
+
*/
|
|
90
158
|
setRestartToken(val) {
|
|
91
159
|
this._options.restartToken = val;
|
|
92
160
|
return this;
|
|
93
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Allow to set quota restriction for blob request. Its a hint and may be overriden or ignored by concurrent query manager.
|
|
164
|
+
* @param val @type QueryQuota Specify time and memory that can be used by a query.
|
|
165
|
+
* @returns @type BlobOptionsBuilder for fluent interface.
|
|
166
|
+
*/
|
|
94
167
|
setQuota(val) {
|
|
95
168
|
this._options.quota = val;
|
|
96
169
|
return this;
|
|
97
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Force a blob request to be executed synchronously against primary connection. This option is ignored if provided by frontend.
|
|
173
|
+
* @param val A boolean value to force use primary connection on main thread to execute blob request.
|
|
174
|
+
* @returns @type BlobOptionsBuilder for fluent interface.
|
|
175
|
+
*/
|
|
98
176
|
setUsePrimaryConnection(val) {
|
|
99
177
|
this._options.usePrimaryConn = val;
|
|
100
178
|
return this;
|
|
101
179
|
}
|
|
180
|
+
/**
|
|
181
|
+
* Specify range with in the blob that need to be returned.
|
|
182
|
+
* @param val Specify offset and count of bytes that need to be returned.
|
|
183
|
+
* @returns @type BlobOptionsBuilder for fluent interface.
|
|
184
|
+
*/
|
|
102
185
|
setRange(val) {
|
|
103
186
|
this._options.range = val;
|
|
104
187
|
return this;
|
|
105
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* @internal
|
|
191
|
+
* Defers execution of blob request in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.
|
|
192
|
+
* @param val Number of milliseconds.
|
|
193
|
+
* @returns @type BlobOptionsBuilder for fluent interface.
|
|
194
|
+
*/
|
|
195
|
+
setDelay(val) {
|
|
196
|
+
this._options.delay = val;
|
|
197
|
+
return this;
|
|
198
|
+
}
|
|
106
199
|
}
|
|
107
200
|
exports.BlobOptionsBuilder = BlobOptionsBuilder;
|
|
108
201
|
/** @internal */
|
|
@@ -123,7 +216,10 @@ var QueryParamType;
|
|
|
123
216
|
QueryParamType[QueryParamType["Blob"] = 10] = "Blob";
|
|
124
217
|
QueryParamType[QueryParamType["Struct"] = 11] = "Struct";
|
|
125
218
|
})(QueryParamType || (QueryParamType = {}));
|
|
126
|
-
/**
|
|
219
|
+
/**
|
|
220
|
+
* @public
|
|
221
|
+
* QueryBinder allow to bind values to a ECSQL query.
|
|
222
|
+
* */
|
|
127
223
|
class QueryBinder {
|
|
128
224
|
constructor() {
|
|
129
225
|
this._args = {};
|
|
@@ -139,6 +235,12 @@ class QueryBinder {
|
|
|
139
235
|
}
|
|
140
236
|
}
|
|
141
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* Bind boolean value to ECSQL statement.
|
|
240
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
241
|
+
* @param val Boolean value to bind to ECSQL statement.
|
|
242
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
243
|
+
*/
|
|
142
244
|
bindBoolean(indexOrName, val) {
|
|
143
245
|
this.verify(indexOrName);
|
|
144
246
|
const name = String(indexOrName);
|
|
@@ -151,6 +253,12 @@ class QueryBinder {
|
|
|
151
253
|
});
|
|
152
254
|
return this;
|
|
153
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* Bind blob value to ECSQL statement.
|
|
258
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
259
|
+
* @param val Blob value to bind to ECSQL statement.
|
|
260
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
261
|
+
*/
|
|
154
262
|
bindBlob(indexOrName, val) {
|
|
155
263
|
this.verify(indexOrName);
|
|
156
264
|
const name = String(indexOrName);
|
|
@@ -163,6 +271,12 @@ class QueryBinder {
|
|
|
163
271
|
});
|
|
164
272
|
return this;
|
|
165
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* Bind double value to ECSQL statement.
|
|
276
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
277
|
+
* @param val Double value to bind to ECSQL statement.
|
|
278
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
279
|
+
*/
|
|
166
280
|
bindDouble(indexOrName, val) {
|
|
167
281
|
this.verify(indexOrName);
|
|
168
282
|
const name = String(indexOrName);
|
|
@@ -174,6 +288,12 @@ class QueryBinder {
|
|
|
174
288
|
});
|
|
175
289
|
return this;
|
|
176
290
|
}
|
|
291
|
+
/**
|
|
292
|
+
* Bind @typedef Id64String value to ECSQL statement.
|
|
293
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
294
|
+
* @param val @typedef Id64String value to bind to ECSQL statement.
|
|
295
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
296
|
+
*/
|
|
177
297
|
bindId(indexOrName, val) {
|
|
178
298
|
this.verify(indexOrName);
|
|
179
299
|
const name = String(indexOrName);
|
|
@@ -185,6 +305,12 @@ class QueryBinder {
|
|
|
185
305
|
});
|
|
186
306
|
return this;
|
|
187
307
|
}
|
|
308
|
+
/**
|
|
309
|
+
* Bind @type OrderedId64Iterable to ECSQL statement.
|
|
310
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
311
|
+
* @param val @type OrderedId64Iterable value to bind to ECSQL statement.
|
|
312
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
313
|
+
*/
|
|
188
314
|
bindIdSet(indexOrName, val) {
|
|
189
315
|
this.verify(indexOrName);
|
|
190
316
|
const name = String(indexOrName);
|
|
@@ -197,6 +323,12 @@ class QueryBinder {
|
|
|
197
323
|
});
|
|
198
324
|
return this;
|
|
199
325
|
}
|
|
326
|
+
/**
|
|
327
|
+
* Bind integer to ECSQL statement.
|
|
328
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
329
|
+
* @param val Integer value to bind to ECSQL statement.
|
|
330
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
331
|
+
*/
|
|
200
332
|
bindInt(indexOrName, val) {
|
|
201
333
|
this.verify(indexOrName);
|
|
202
334
|
const name = String(indexOrName);
|
|
@@ -208,6 +340,12 @@ class QueryBinder {
|
|
|
208
340
|
});
|
|
209
341
|
return this;
|
|
210
342
|
}
|
|
343
|
+
/**
|
|
344
|
+
* Bind struct to ECSQL statement. Struct specified as object.
|
|
345
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
346
|
+
* @param val struct value to bind to ECSQL statement.
|
|
347
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
348
|
+
*/
|
|
211
349
|
bindStruct(indexOrName, val) {
|
|
212
350
|
this.verify(indexOrName);
|
|
213
351
|
const name = String(indexOrName);
|
|
@@ -219,6 +357,12 @@ class QueryBinder {
|
|
|
219
357
|
});
|
|
220
358
|
return this;
|
|
221
359
|
}
|
|
360
|
+
/**
|
|
361
|
+
* Bind long to ECSQL statement.
|
|
362
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
363
|
+
* @param val Long value to bind to ECSQL statement.
|
|
364
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
365
|
+
*/
|
|
222
366
|
bindLong(indexOrName, val) {
|
|
223
367
|
this.verify(indexOrName);
|
|
224
368
|
const name = String(indexOrName);
|
|
@@ -230,6 +374,12 @@ class QueryBinder {
|
|
|
230
374
|
});
|
|
231
375
|
return this;
|
|
232
376
|
}
|
|
377
|
+
/**
|
|
378
|
+
* Bind string to ECSQL statement.
|
|
379
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
380
|
+
* @param val String value to bind to ECSQL statement.
|
|
381
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
382
|
+
*/
|
|
233
383
|
bindString(indexOrName, val) {
|
|
234
384
|
this.verify(indexOrName);
|
|
235
385
|
const name = String(indexOrName);
|
|
@@ -241,6 +391,11 @@ class QueryBinder {
|
|
|
241
391
|
});
|
|
242
392
|
return this;
|
|
243
393
|
}
|
|
394
|
+
/**
|
|
395
|
+
* Bind null to ECSQL statement.
|
|
396
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
397
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
398
|
+
*/
|
|
244
399
|
bindNull(indexOrName) {
|
|
245
400
|
this.verify(indexOrName);
|
|
246
401
|
const name = String(indexOrName);
|
|
@@ -252,6 +407,12 @@ class QueryBinder {
|
|
|
252
407
|
});
|
|
253
408
|
return this;
|
|
254
409
|
}
|
|
410
|
+
/**
|
|
411
|
+
* Bind @type Point2d to ECSQL statement.
|
|
412
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
413
|
+
* @param val @type Point2d value to bind to ECSQL statement.
|
|
414
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
415
|
+
*/
|
|
255
416
|
bindPoint2d(indexOrName, val) {
|
|
256
417
|
this.verify(indexOrName);
|
|
257
418
|
const name = String(indexOrName);
|
|
@@ -263,6 +424,12 @@ class QueryBinder {
|
|
|
263
424
|
});
|
|
264
425
|
return this;
|
|
265
426
|
}
|
|
427
|
+
/**
|
|
428
|
+
* Bind @type Point3d to ECSQL statement.
|
|
429
|
+
* @param indexOrName Specify parameter index or its name used in ECSQL statement.
|
|
430
|
+
* @param val @type Point3d value to bind to ECSQL statement.
|
|
431
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
432
|
+
*/
|
|
266
433
|
bindPoint3d(indexOrName, val) {
|
|
267
434
|
this.verify(indexOrName);
|
|
268
435
|
const name = String(indexOrName);
|
|
@@ -306,6 +473,11 @@ class QueryBinder {
|
|
|
306
473
|
throw new Error("unsupported type");
|
|
307
474
|
}
|
|
308
475
|
}
|
|
476
|
+
/**
|
|
477
|
+
* Allow bulk bind either parameters by index as value array or by parameter names as object.
|
|
478
|
+
* @param args if array of values is provided then array index is used as index. If object is provided then object property name is used as parameter name of reach value.
|
|
479
|
+
* @returns @type QueryBinder to allow fluent interface.
|
|
480
|
+
*/
|
|
309
481
|
static from(args) {
|
|
310
482
|
const params = new QueryBinder();
|
|
311
483
|
if (typeof args === "undefined")
|