• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkData
19 */
20
21import { ValueType } from './@ohos.data.ValuesBucket';
22
23/**
24 * This module provides data share services based on the ExtensionAbility.
25 *
26 * @namespace dataSharePredicates
27 * @syscap SystemCapability.DistributedDataManager.DataShare.Core
28 * @StageModelOnly
29 * @since 10
30 */
31/**
32 * This module provides data share services based on the ExtensionAbility.
33 *
34 * @namespace dataSharePredicates
35 * @syscap SystemCapability.DistributedDataManager.DataShare.Core
36 * @StageModelOnly
37 * @crossplatform
38 * @since 12
39 */
40/**
41 * This module provides data share services based on the ExtensionAbility.
42 *
43 * @namespace dataSharePredicates
44 * @syscap SystemCapability.DistributedDataManager.DataShare.Core
45 * @StageModelOnly
46 * @crossplatform
47 * @atomicservice
48 * @since arkts {'1.1':'20', '1.2':'20'}
49 * @arkts 1.1&1.2
50 */
51declare namespace dataSharePredicates {
52  /**
53   * Provides a filter object to query data in a database by using DataShare APIs.
54   * <strong>This type is not multi-thread safe. If a DataSharePredicates instance is operated by multiple threads
55   * at the same time in an application, use a lock for it.</strong>
56   *
57   * @syscap SystemCapability.DistributedDataManager.DataShare.Core
58   * @StageModelOnly
59   * @since 10
60   */
61  /**
62   * Provides a filter object to query data in a database by using DataShare APIs.
63   * <strong>This type is not multi-thread safe. If a DataSharePredicates instance is operated by multiple threads
64   * at the same time in an application, use a lock for it.</strong>
65   *
66   * @syscap SystemCapability.DistributedDataManager.DataShare.Core
67   * @StageModelOnly
68   * @crossplatform
69   * @since 12
70   */
71  /**
72   * Manages relational database configurations.
73   *
74   * @syscap SystemCapability.DistributedDataManager.DataShare.Core
75   * @StageModelOnly
76   * @crossplatform
77   * @atomicservice
78   * @since arkts {'1.1':'20', '1.2':'20'}
79   * @arkts 1.1&1.2
80   */
81  class DataSharePredicates {
82    /**
83     * Configure the DataSharePredicates to match the field whose data type is ValueType and value is equal
84     * to a specified value.
85     * This method is similar to = of the SQL statement.
86     * Currently only used for RDB and KVDB(schema).
87     *
88     * @param { string } field - Indicates the column name in the database table.
89     * @param { ValueType } value - Indicates the value to match with the DataSharePredicates.
90     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
91     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
92     * @StageModelOnly
93     * @since 10
94     */
95    /**
96     * Configure the DataSharePredicates to match the field whose data type is ValueType and value is equal
97     * to a specified value.
98     * This method is similar to = of the SQL statement.
99     * Currently only used for RDB and KVDB(schema).
100     *
101     * @param { string } field - Indicates the column name in the database table.
102     * @param { ValueType } value - Indicates the value to match with the DataSharePredicates.
103     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
104     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
105     * @StageModelOnly
106     * @crossplatform
107     * @since 12
108     */
109    /**
110     * Configure the DataSharePredicates to match the field whose data type is ValueType and value is equal
111     * to a specified value.
112     * This method is similar to = of the SQL statement.
113     * Currently only used for RDB and KVDB(schema).
114     *
115     * @param { string } field - Indicates the column name in the database table.
116     * @param { ValueType } value - Indicates the value to match with the DataSharePredicates.
117     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
118     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
119     * @StageModelOnly
120     * @crossplatform
121     * @atomicservice
122     * @since arkts {'1.1':'20', '1.2':'20'}
123     * @arkts 1.1&1.2
124     */
125    equalTo(field: string, value: ValueType): DataSharePredicates;
126
127    /**
128     * Configure the DataSharePredicates to match the field whose data type is ValueType and value is unequal to
129     * a specified value.
130     * This method is similar to != of the SQL statement.
131     * Currently only used for RDB and KVDB(schema).
132     *
133     * @param { string } field - Indicates the column name in the database table.
134     * @param { ValueType } value - Indicates the value to match with the DataSharePredicates.
135     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
136     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
137     * @systemapi
138     * @StageModelOnly
139     * @since arkts {'1.1':'9', '1.2':'20'}
140     * @arkts 1.1&1.2
141     */
142    notEqualTo(field: string, value: ValueType): DataSharePredicates;
143
144    /**
145     * Adds a left parenthesis to the DataSharePredicates.
146     * This method is similar to ( of the SQL statement and needs to be used together with endWrap().
147     * Currently only used for RDB.
148     *
149     * @returns { DataSharePredicates } Returns the DataSharePredicates with the left parenthesis.
150     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
151     * @systemapi
152     * @StageModelOnly
153     * @since arkts {'1.1':'9', '1.2':'20'}
154     * @arkts 1.1&1.2
155     */
156    beginWrap(): DataSharePredicates;
157
158    /**
159     * Adds a right parenthesis to the DataSharePredicates.
160     * This method is similar to ) of the SQL statement and needs to be used together
161     * with beginWrap().
162     * Currently only used for RDB.
163     *
164     * @returns { DataSharePredicates } Returns the DataSharePredicates with the right parenthesis.
165     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
166     * @systemapi
167     * @StageModelOnly
168     * @since arkts {'1.1':'9', '1.2':'20'}
169     * @arkts 1.1&1.2
170     */
171    endWrap(): DataSharePredicates;
172
173    /**
174     * Adds an or condition to the DataSharePredicates.
175     * This method is similar to or of the SQL statement.
176     * Currently only used for RDB and KVDB(schema).
177     *
178     * @returns { DataSharePredicates } Returns the DataSharePredicates with the or condition.
179     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
180     * @systemapi
181     * @StageModelOnly
182     * @since arkts {'1.1':'9', '1.2':'20'}
183     * @arkts 1.1&1.2
184     */
185    or(): DataSharePredicates;
186
187    /**
188     * Adds an and condition to the DataSharePredicates.
189     * This method is similar to and of the SQL statement.
190     * Currently only used for RDB and KVDB(schema).
191     *
192     * @returns { DataSharePredicates } Returns the DataSharePredicates with the and condition.
193     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
194     * @StageModelOnly
195     * @since 10
196     */
197    /**
198     * Adds an and condition to the DataSharePredicates.
199     * This method is similar to and of the SQL statement.
200     * Currently only used for RDB and KVDB(schema).
201     *
202     * @returns { DataSharePredicates } Returns the DataSharePredicates with the and condition.
203     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
204     * @StageModelOnly
205     * @crossplatform
206     * @since 12
207     */
208    /**
209     * Adds an and condition to the DataSharePredicates.
210     * This method is similar to and of the SQL statement.
211     * Currently only used for RDB and KVDB(schema).
212     *
213     * @returns { DataSharePredicates } Returns the DataSharePredicates with the and condition.
214     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
215     * @StageModelOnly
216     * @crossplatform
217     * @atomicservice
218     * @since arkts {'1.1':'20', '1.2':'20'}
219     * @arkts 1.1&1.2
220     */
221    and(): DataSharePredicates;
222
223    /**
224     * Configure the DataSharePredicates to match the field whose data type is string and value
225     * contains a specified value.
226     * This method is similar to contains of the SQL statement.
227     * Currently only used for RDB.
228     *
229     * @param { string } field - Indicates the column name in the database table.
230     * @param { string } value - Indicates the value to match with the DataSharePredicates.
231     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
232     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
233     * @systemapi
234     * @StageModelOnly
235     * @since arkts {'1.1':'9', '1.2':'20'}
236     * @arkts 1.1&1.2
237     */
238    contains(field: string, value: string): DataSharePredicates;
239
240    /**
241     * Configure the DataSharePredicates to match the field whose data type is string and value starts
242     * with a specified string.
243     * This method is similar to value% of the SQL statement.
244     * Currently only used for RDB.
245     *
246     * @param { string } field - Indicates the column name in the database table.
247     * @param { string } value - Indicates the value to match with the DataSharePredicates.
248     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
249     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
250     * @systemapi
251     * @StageModelOnly
252     * @since 9
253     */
254    beginsWith(field: string, value: string): DataSharePredicates;
255
256    /**
257     * Configure the DataSharePredicates to match the field whose data type is string and value
258     * ends with a specified string.
259     * This method is similar to %value of the SQL statement.
260     * Currently only used for RDB.
261     *
262     * @param { string } field - Indicates the column name in the database table.
263     * @param { string } value - Indicates the value to match with the DataSharePredicates.
264     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
265     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
266     * @systemapi
267     * @StageModelOnly
268     * @since 9
269     */
270    endsWith(field: string, value: string): DataSharePredicates;
271
272    /**
273     * Configure the DataSharePredicates to match the fields whose value is null.
274     * This method is similar to is null of the SQL statement.
275     * Currently only used for RDB and KVDB(schema).
276     *
277     * @param { string } field - Indicates the column name in the database table.
278     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
279     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
280     * @systemapi
281     * @StageModelOnly
282     * @since 9
283     */
284    isNull(field: string): DataSharePredicates;
285
286    /**
287     * Configure the DataSharePredicates to match the specified fields whose value is not null.
288     * This method is similar to is not null of the SQL statement.
289     * Currently only used for RDB and KVDB(schema).
290     *
291     * @param { string } field - Indicates the column name in the database table.
292     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
293     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
294     * @systemapi
295     * @StageModelOnly
296     * @since 9
297     */
298    isNotNull(field: string): DataSharePredicates;
299
300    /**
301     * Configure the DataSharePredicates to match the fields whose data type is string and value is
302     * similar to a specified string.
303     * This method is similar to like of the SQL statement.
304     * Currently only used for RDB and KVDB(schema).
305     *
306     * @param { string } field - Indicates the column name in the database table.
307     * @param { string } value - Indicates the value to match with the DataSharePredicates. The percent sign (%) in the value
308     * is a wildcard (like * in a regular expression).
309     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
310     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
311     * @systemapi
312     * @StageModelOnly
313     * @since arkts {'1.1':'9', '1.2':'20'}
314     * @arkts 1.1&1.2
315     */
316    like(field: string, value: string): DataSharePredicates;
317
318    /**
319     * Configure the DataSharePredicates to match the fields whose data type is string and value is
320     * not similar to a specified string.
321     * This method is similar to unlike of the SQL statement.
322     * Currently only used for RDB and KVDB(schema).
323     *
324     * @param { string } field - Indicates the column name in the database table.
325     * @param { string } value - Indicates the value to match with the DataSharePredicates. The percent sign (%) in the value
326     * is a wildcard (like * in a regular expression).
327     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
328     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
329     * @systemapi
330     * @StageModelOnly
331     * @since 9
332     */
333    unlike(field: string, value: string): DataSharePredicates;
334
335    /**
336     * Configure DataSharePredicates to match the specified field whose data type is string and the value contains
337     * a wildcard.
338     * Different from like, the input parameters of this method are case-sensitive.
339     * Currently only used for RDB.
340     *
341     * @param { string } field - Indicates the column name in the database table.
342     * @param { string } value - Indicates the value to match with DataSharePredicates.
343     * @returns { DataSharePredicates } Returns the SQL statement with the specified DataSharePredicates.
344     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
345     * @systemapi
346     * @StageModelOnly
347     * @since 9
348     */
349    glob(field: string, value: string): DataSharePredicates;
350
351    /**
352     * Restricts the value of the field to the range between low value and high value.
353     * Currently only used for RDB.
354     *
355     * @param { string } field - Indicates the column name.
356     * @param { ValueType } low - Indicates the minimum value.
357     * @param { ValueType } high - Indicates the maximum value.
358     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
359     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
360     * @systemapi
361     * @StageModelOnly
362     * @since 9
363     */
364    between(field: string, low: ValueType, high: ValueType): DataSharePredicates;
365
366    /**
367     * Configure DataSharePredicates to match the specified field whose data type is int and value is
368     * out of a given range.
369     * Currently only used for RDB.
370     *
371     * @param { string } field - Indicates the column name in the database table.
372     * @param { ValueType } low - Indicates the minimum value to match with DataSharePredicates.
373     * @param { ValueType } high - Indicates the maximum value to match with DataSharePredicates.
374     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
375     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
376     * @systemapi
377     * @StageModelOnly
378     * @since 9
379     */
380    notBetween(field: string, low: ValueType, high: ValueType): DataSharePredicates;
381
382    /**
383     * Restricts the value of the field to be greater than the specified value.
384     * Currently only used for RDB and KVDB(schema).
385     *
386     * @param { string } field - Indicates the column name.
387     * @param { ValueType } value - Indicates the String field.
388     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
389     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
390     * @systemapi
391     * @StageModelOnly
392     * @since arkts {'1.1':'9', '1.2':'20'}
393     * @arkts 1.1&1.2
394     */
395    greaterThan(field: string, value: ValueType): DataSharePredicates;
396
397    /**
398     * Restricts the value of the field to be smaller than the specified value.
399     * Currently only used for RDB and KVDB(schema).
400     *
401     * @param { string } field - Indicates the column name.
402     * @param { ValueType } value - Indicates the String field.
403     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
404     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
405     * @systemapi
406     * @StageModelOnly
407     * @since arkts {'1.1':'9', '1.2':'20'}
408     * @arkts 1.1&1.2
409     */
410    lessThan(field: string, value: ValueType): DataSharePredicates;
411
412    /**
413     * Restricts the value of the field to be greater than or equal to the specified value.
414     * Currently only used for RDB and KVDB(schema).
415     *
416     * @param { string } field - Indicates the column name.
417     * @param { ValueType } value - Indicates the String field.
418     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
419     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
420     * @systemapi
421     * @StageModelOnly
422     * @since arkts {'1.1':'9', '1.2':'20'}
423     * @arkts 1.1&1.2
424     */
425    greaterThanOrEqualTo(field: string, value: ValueType): DataSharePredicates;
426
427    /**
428     * Restricts the value of the field to be smaller than or equal to the specified value.
429     * Currently only used for RDB and KVDB(schema).
430     *
431     * @param { string } field - Indicates the column name.
432     * @param { ValueType } value - Indicates the String field.
433     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
434     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
435     * @systemapi
436     * @StageModelOnly
437     * @since 9
438     */
439    lessThanOrEqualTo(field: string, value: ValueType): DataSharePredicates;
440
441    /**
442     * Restricts the ascending order of the return list. When there are several orders,
443     * the one close to the head has the highest priority.
444     * Currently only used for RDB and KVDB(schema).
445     *
446     * @param { string } field - Indicates the column name for sorting the return list.
447     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
448     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
449     * @StageModelOnly
450     * @since 10
451     */
452    /**
453     * Restricts the ascending order of the return list. When there are several orders,
454     * the one close to the head has the highest priority.
455     * Currently only used for RDB and KVDB(schema).
456     *
457     * @param { string } field - Indicates the column name for sorting the return list.
458     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
459     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
460     * @StageModelOnly
461     * @crossplatform
462     * @since 12
463     */
464    /**
465     * Restricts the ascending order of the return list. When there are several orders,
466     * the one close to the head has the highest priority.
467     * Currently only used for RDB and KVDB(schema).
468     *
469     * @param { string } field - Indicates the column name for sorting the return list.
470     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
471     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
472     * @StageModelOnly
473     * @crossplatform
474     * @atomicservice
475     * @since arkts {'1.1':'20', '1.2':'20'}
476     * @arkts 1.1&1.2
477     */
478    orderByAsc(field: string): DataSharePredicates;
479
480    /**
481     * Restricts the descending order of the return list. When there are several orders,
482     * the one close to the head has the highest priority.
483     * Currently only used for RDB and KVDB(schema).
484     *
485     * @param { string } field - Indicates the column name for sorting the return list.
486     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
487     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
488     * @StageModelOnly
489     * @since 10
490     */
491    /**
492     * Restricts the descending order of the return list. When there are several orders,
493     * the one close to the head has the highest priority.
494     * Currently only used for RDB and KVDB(schema).
495     *
496     * @param { string } field - Indicates the column name for sorting the return list.
497     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
498     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
499     * @StageModelOnly
500     * @crossplatform
501     * @since 12
502     */
503    /**
504     * Restricts the descending order of the return list. When there are several orders,
505     * the one close to the head has the highest priority.
506     * Currently only used for RDB and KVDB(schema).
507     *
508     * @param { string } field - Indicates the column name for sorting the return list.
509     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
510     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
511     * @StageModelOnly
512     * @crossplatform
513     * @atomicservice
514     * @since arkts {'1.1':'20', '1.2':'20'}
515     * @arkts 1.1&1.2
516     */
517    orderByDesc(field: string): DataSharePredicates;
518
519    /**
520     * Restricts each row of the query result to be unique.
521     * Currently only used for RDB.
522     *
523     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
524     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
525     * @systemapi
526     * @StageModelOnly
527     * @since 9
528     */
529    distinct(): DataSharePredicates;
530
531    /**
532     * Construct a query object to specify the number of results and the starting position.
533     * Currently only used for RDB and KVDB(schema).
534     *
535     * @param { number } total - Represents the specified number of results.
536     * @param { number } offset - Indicates the starting position.
537     * @returns { DataSharePredicates } Returns the query object.
538     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
539     * @StageModelOnly
540     * @since 10
541     */
542    /**
543     * Construct a query object to specify the number of results and the starting position.
544     * Currently only used for RDB and KVDB(schema).
545     *
546     * @param { number } total - Represents the specified number of results.
547     * @param { number } offset - Indicates the starting position.
548     * @returns { DataSharePredicates } Returns the query object.
549     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
550     * @StageModelOnly
551     * @crossplatform
552     * @since 12
553     */
554    /**
555     * Construct a query object to specify the number of results and the starting position.
556     * Currently only used for RDB and KVDB(schema).
557     *
558     * @param { number } total - Represents the specified number of results.
559     * @param { number } offset - Indicates the starting position.
560     * @returns { DataSharePredicates } Returns the query object.
561     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
562     * @StageModelOnly
563     * @crossplatform
564     * @atomicservice
565     * @since arkts {'1.1':'20', '1.2':'20'}
566     * @arkts 1.1&1.2
567     */
568    limit(total: number, offset: number): DataSharePredicates;
569
570    /**
571     * Configure {@code DataSharePredicates} to group query results by specified columns.
572     * Currently only used for RDB.
573     *
574     * @param { Array<string> } fields - Indicates the specified columns by which query results are grouped.
575     * @returns { DataSharePredicates } Returns the DataSharePredicates with the specified columns by which query results are grouped.
576     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
577     * @systemapi
578     * @StageModelOnly
579     * @since arkts {'1.1':'9', '1.2':'20'}
580     * @arkts 1.1&1.2
581     */
582    groupBy(fields: Array<string>): DataSharePredicates;
583
584    /**
585     * Configure {@code DataSharePredicates} to specify the index column.
586     * Before using this method, you need to create an index column.
587     * Currently only used for RDB.
588     *
589     * @param { string } field - Indicates the name of the index column.
590     * @returns { DataSharePredicates } Returns DataSharePredicates with the specified index column.
591     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
592     * @systemapi
593     * @StageModelOnly
594     * @since 9
595     */
596    indexedBy(field: string): DataSharePredicates;
597
598    /**
599     * Configure {@code DataSharePredicates} to match the specified field whose data type is ValueType array and values
600     * are within a given range.
601     * Currently only used for RDB and KVDB(schema).
602     *
603     * @param { string } field - Indicates the column name in the database table.
604     * @param { Array<ValueType> } value - Indicates the values to match with DataSharePredicates.
605     * @returns { DataSharePredicates } Returns DataSharePredicates that matches the specified field.
606     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
607     * @StageModelOnly
608     * @since 10
609     */
610    /**
611     * Configure {@code DataSharePredicates} to match the specified field whose data type is ValueType array and values
612     * are within a given range.
613     * Currently only used for RDB and KVDB(schema).
614     *
615     * @param { string } field - Indicates the column name in the database table.
616     * @param { Array<ValueType> } value - Indicates the values to match with DataSharePredicates.
617     * @returns { DataSharePredicates } Returns DataSharePredicates that matches the specified field.
618     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
619     * @StageModelOnly
620     * @crossplatform
621     * @since 12
622     */
623    /**
624     * Configure {@code DataSharePredicates} to match the specified field whose data type is ValueType array and values
625     * are within a given range.
626     * Currently only used for RDB and KVDB(schema).
627     *
628     * @param { string } field - Indicates the column name in the database table.
629     * @param { Array<ValueType> } value - Indicates the values to match with DataSharePredicates.
630     * @returns { DataSharePredicates } Returns DataSharePredicates that matches the specified field.
631     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
632     * @StageModelOnly
633     * @crossplatform
634     * @atomicservice
635     * @since arkts {'1.1':'20', '1.2':'20'}
636     * @arkts 1.1&1.2
637     */
638    in(field: string, value: Array<ValueType>): DataSharePredicates;
639
640    /**
641     * Configure {@code DataSharePredicates} to match the specified field whose data type is String array and values
642     * are out of a given range.
643     * Currently only used for RDB and KVDB(schema).
644     *
645     * @param { string } field - Indicates the column name in the database table.
646     * @param { Array<ValueType> } value - Indicates the values to match with DataSharePredicates.
647     * @returns { DataSharePredicates } Returns DataSharePredicates that matches the specified field.
648     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
649     * @systemapi
650     * @StageModelOnly
651     * @since arkts {'1.1':'9', '1.2':'20'}
652     * @arkts 1.1&1.2
653     */
654    notIn(field: string, value: Array<ValueType>): DataSharePredicates;
655
656    /**
657     * Configure {@code DataSharePredicates} Creates a query condition using the specified key prefix.
658     * Currently only used for KVDB.
659     *
660     * @param { string } prefix - Represents the specified key prefix.
661     * @returns { DataSharePredicates } Returns the query object.
662     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
663     * @systemapi
664     * @StageModelOnly
665     * @since 9
666     */
667    prefixKey(prefix: string): DataSharePredicates;
668
669    /**
670     * Configure {@code DataSharePredicates} to match the specified value whose key is within a given range.
671     * Currently only used for KVDB.
672     *
673     * @param { Array<string> } keys - Represents the key names.
674     * @returns { DataSharePredicates } Returns the query object.
675     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
676     * @systemapi
677     * @StageModelOnly
678     * @since 9
679     */
680    inKeys(keys: Array<string>): DataSharePredicates;
681  }
682}
683
684export default dataSharePredicates;
685