161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit ArkData
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport { ValueType } from './@ohos.data.ValuesBucket';
2261847f8eSopenharmony_ci
2361847f8eSopenharmony_ci/**
2461847f8eSopenharmony_ci * This module provides data share services based on the ExtensionAbility.
2561847f8eSopenharmony_ci *
2661847f8eSopenharmony_ci * @namespace dataSharePredicates
2761847f8eSopenharmony_ci * @syscap SystemCapability.DistributedDataManager.DataShare.Core
2861847f8eSopenharmony_ci * @StageModelOnly
2961847f8eSopenharmony_ci * @since 10
3061847f8eSopenharmony_ci */
3161847f8eSopenharmony_ci/**
3261847f8eSopenharmony_ci * This module provides data share services based on the ExtensionAbility.
3361847f8eSopenharmony_ci *
3461847f8eSopenharmony_ci * @namespace dataSharePredicates
3561847f8eSopenharmony_ci * @syscap SystemCapability.DistributedDataManager.DataShare.Core
3661847f8eSopenharmony_ci * @StageModelOnly
3761847f8eSopenharmony_ci * @crossplatform
3861847f8eSopenharmony_ci * @since 12
3961847f8eSopenharmony_ci */
4061847f8eSopenharmony_cideclare namespace dataSharePredicates {
4161847f8eSopenharmony_ci  /**
4261847f8eSopenharmony_ci   * Manages relational database configurations.
4361847f8eSopenharmony_ci   *
4461847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedDataManager.DataShare.Core
4561847f8eSopenharmony_ci   * @StageModelOnly
4661847f8eSopenharmony_ci   * @since 10
4761847f8eSopenharmony_ci   */
4861847f8eSopenharmony_ci  /**
4961847f8eSopenharmony_ci   * Manages relational database configurations.
5061847f8eSopenharmony_ci   *
5161847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedDataManager.DataShare.Core
5261847f8eSopenharmony_ci   * @StageModelOnly
5361847f8eSopenharmony_ci   * @crossplatform
5461847f8eSopenharmony_ci   * @since 12
5561847f8eSopenharmony_ci   */
5661847f8eSopenharmony_ci  class DataSharePredicates {
5761847f8eSopenharmony_ci    /**
5861847f8eSopenharmony_ci     * Configure the DataSharePredicates to match the field whose data type is ValueType and value is equal
5961847f8eSopenharmony_ci     * to a specified value.
6061847f8eSopenharmony_ci     * This method is similar to = of the SQL statement.
6161847f8eSopenharmony_ci     *
6261847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
6361847f8eSopenharmony_ci     * @param { ValueType } value - Indicates the value to match with the DataSharePredicates.
6461847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
6561847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
6661847f8eSopenharmony_ci     * @StageModelOnly
6761847f8eSopenharmony_ci     * @since 10
6861847f8eSopenharmony_ci     */
6961847f8eSopenharmony_ci    /**
7061847f8eSopenharmony_ci     * Configure the DataSharePredicates to match the field whose data type is ValueType and value is equal
7161847f8eSopenharmony_ci     * to a specified value.
7261847f8eSopenharmony_ci     * This method is similar to = of the SQL statement.
7361847f8eSopenharmony_ci     *
7461847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
7561847f8eSopenharmony_ci     * @param { ValueType } value - Indicates the value to match with the DataSharePredicates.
7661847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
7761847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
7861847f8eSopenharmony_ci     * @StageModelOnly
7961847f8eSopenharmony_ci     * @crossplatform
8061847f8eSopenharmony_ci     * @since 12
8161847f8eSopenharmony_ci     */
8261847f8eSopenharmony_ci    equalTo(field: string, value: ValueType): DataSharePredicates;
8361847f8eSopenharmony_ci
8461847f8eSopenharmony_ci    /**
8561847f8eSopenharmony_ci     * Configure the DataSharePredicates to match the field whose data type is ValueType and value is unequal to
8661847f8eSopenharmony_ci     * a specified value.
8761847f8eSopenharmony_ci     * This method is similar to != of the SQL statement.
8861847f8eSopenharmony_ci     *
8961847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
9061847f8eSopenharmony_ci     * @param { ValueType } value - Indicates the value to match with the DataSharePredicates.
9161847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
9261847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
9361847f8eSopenharmony_ci     * @systemapi
9461847f8eSopenharmony_ci     * @StageModelOnly
9561847f8eSopenharmony_ci     * @since 9
9661847f8eSopenharmony_ci     */
9761847f8eSopenharmony_ci    notEqualTo(field: string, value: ValueType): DataSharePredicates;
9861847f8eSopenharmony_ci
9961847f8eSopenharmony_ci    /**
10061847f8eSopenharmony_ci     * Adds a left parenthesis to the DataSharePredicates.
10161847f8eSopenharmony_ci     * This method is similar to ( of the SQL statement and needs to be used together with endWrap().
10261847f8eSopenharmony_ci     *
10361847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates with the left parenthesis.
10461847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
10561847f8eSopenharmony_ci     * @systemapi
10661847f8eSopenharmony_ci     * @StageModelOnly
10761847f8eSopenharmony_ci     * @since 9
10861847f8eSopenharmony_ci     */
10961847f8eSopenharmony_ci    beginWrap(): DataSharePredicates;
11061847f8eSopenharmony_ci
11161847f8eSopenharmony_ci    /**
11261847f8eSopenharmony_ci     * Adds a right parenthesis to the DataSharePredicates.
11361847f8eSopenharmony_ci     * This method is similar to ) of the SQL statement and needs to be used together
11461847f8eSopenharmony_ci     * with beginWrap().
11561847f8eSopenharmony_ci     *
11661847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates with the right parenthesis.
11761847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
11861847f8eSopenharmony_ci     * @systemapi
11961847f8eSopenharmony_ci     * @StageModelOnly
12061847f8eSopenharmony_ci     * @since 9
12161847f8eSopenharmony_ci     */
12261847f8eSopenharmony_ci    endWrap(): DataSharePredicates;
12361847f8eSopenharmony_ci
12461847f8eSopenharmony_ci    /**
12561847f8eSopenharmony_ci     * Adds an or condition to the DataSharePredicates.
12661847f8eSopenharmony_ci     * This method is similar to or of the SQL statement.
12761847f8eSopenharmony_ci     *
12861847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates with the or condition.
12961847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
13061847f8eSopenharmony_ci     * @systemapi
13161847f8eSopenharmony_ci     * @StageModelOnly
13261847f8eSopenharmony_ci     * @since 9
13361847f8eSopenharmony_ci     */
13461847f8eSopenharmony_ci    or(): DataSharePredicates;
13561847f8eSopenharmony_ci
13661847f8eSopenharmony_ci    /**
13761847f8eSopenharmony_ci     * Adds an and condition to the DataSharePredicates.
13861847f8eSopenharmony_ci     * This method is similar to and of the SQL statement.
13961847f8eSopenharmony_ci     *
14061847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates with the and condition.
14161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
14261847f8eSopenharmony_ci     * @StageModelOnly
14361847f8eSopenharmony_ci     * @since 10
14461847f8eSopenharmony_ci     */
14561847f8eSopenharmony_ci    /**
14661847f8eSopenharmony_ci     * Adds an and condition to the DataSharePredicates.
14761847f8eSopenharmony_ci     * This method is similar to and of the SQL statement.
14861847f8eSopenharmony_ci     *
14961847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates with the and condition.
15061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
15161847f8eSopenharmony_ci     * @StageModelOnly
15261847f8eSopenharmony_ci     * @crossplatform
15361847f8eSopenharmony_ci     * @since 12
15461847f8eSopenharmony_ci     */
15561847f8eSopenharmony_ci    and(): DataSharePredicates;
15661847f8eSopenharmony_ci
15761847f8eSopenharmony_ci    /**
15861847f8eSopenharmony_ci     * Configure the DataSharePredicates to match the field whose data type is string and value
15961847f8eSopenharmony_ci     * contains a specified value.
16061847f8eSopenharmony_ci     * This method is similar to contains of the SQL statement.
16161847f8eSopenharmony_ci     *
16261847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
16361847f8eSopenharmony_ci     * @param { string } value - Indicates the value to match with the DataSharePredicates.
16461847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
16561847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
16661847f8eSopenharmony_ci     * @systemapi
16761847f8eSopenharmony_ci     * @StageModelOnly
16861847f8eSopenharmony_ci     * @since 9
16961847f8eSopenharmony_ci     */
17061847f8eSopenharmony_ci    contains(field: string, value: string): DataSharePredicates;
17161847f8eSopenharmony_ci
17261847f8eSopenharmony_ci    /**
17361847f8eSopenharmony_ci     * Configure the DataSharePredicates to match the field whose data type is string and value starts
17461847f8eSopenharmony_ci     * with a specified string.
17561847f8eSopenharmony_ci     * This method is similar to value% of the SQL statement.
17661847f8eSopenharmony_ci     *
17761847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
17861847f8eSopenharmony_ci     * @param { string } value - Indicates the value to match with the DataSharePredicates.
17961847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
18061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
18161847f8eSopenharmony_ci     * @systemapi
18261847f8eSopenharmony_ci     * @StageModelOnly
18361847f8eSopenharmony_ci     * @since 9
18461847f8eSopenharmony_ci     */
18561847f8eSopenharmony_ci    beginsWith(field: string, value: string): DataSharePredicates;
18661847f8eSopenharmony_ci
18761847f8eSopenharmony_ci    /**
18861847f8eSopenharmony_ci     * Configure the DataSharePredicates to match the field whose data type is string and value
18961847f8eSopenharmony_ci     * ends with a specified string.
19061847f8eSopenharmony_ci     * This method is similar to %value of the SQL statement.
19161847f8eSopenharmony_ci     *
19261847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
19361847f8eSopenharmony_ci     * @param { string } value - Indicates the value to match with the DataSharePredicates.
19461847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
19561847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
19661847f8eSopenharmony_ci     * @systemapi
19761847f8eSopenharmony_ci     * @StageModelOnly
19861847f8eSopenharmony_ci     * @since 9
19961847f8eSopenharmony_ci     */
20061847f8eSopenharmony_ci    endsWith(field: string, value: string): DataSharePredicates;
20161847f8eSopenharmony_ci
20261847f8eSopenharmony_ci    /**
20361847f8eSopenharmony_ci     * Configure the DataSharePredicates to match the fields whose value is null.
20461847f8eSopenharmony_ci     * This method is similar to is null of the SQL statement.
20561847f8eSopenharmony_ci     *
20661847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
20761847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
20861847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
20961847f8eSopenharmony_ci     * @systemapi
21061847f8eSopenharmony_ci     * @StageModelOnly
21161847f8eSopenharmony_ci     * @since 9
21261847f8eSopenharmony_ci     */
21361847f8eSopenharmony_ci    isNull(field: string): DataSharePredicates;
21461847f8eSopenharmony_ci
21561847f8eSopenharmony_ci    /**
21661847f8eSopenharmony_ci     * Configure the DataSharePredicates to match the specified fields whose value is not null.
21761847f8eSopenharmony_ci     * This method is similar to is not null of the SQL statement.
21861847f8eSopenharmony_ci     *
21961847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
22061847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
22161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
22261847f8eSopenharmony_ci     * @systemapi
22361847f8eSopenharmony_ci     * @StageModelOnly
22461847f8eSopenharmony_ci     * @since 9
22561847f8eSopenharmony_ci     */
22661847f8eSopenharmony_ci    isNotNull(field: string): DataSharePredicates;
22761847f8eSopenharmony_ci
22861847f8eSopenharmony_ci    /**
22961847f8eSopenharmony_ci     * Configure the DataSharePredicates to match the fields whose data type is string and value is
23061847f8eSopenharmony_ci     * similar to a specified string.
23161847f8eSopenharmony_ci     * This method is similar to like of the SQL statement.
23261847f8eSopenharmony_ci     *
23361847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
23461847f8eSopenharmony_ci     * @param { string } value - Indicates the value to match with the DataSharePredicates. The percent sign (%) in the value
23561847f8eSopenharmony_ci     * is a wildcard (like * in a regular expression).
23661847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
23761847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
23861847f8eSopenharmony_ci     * @systemapi
23961847f8eSopenharmony_ci     * @StageModelOnly
24061847f8eSopenharmony_ci     * @since 9
24161847f8eSopenharmony_ci     */
24261847f8eSopenharmony_ci    like(field: string, value: string): DataSharePredicates;
24361847f8eSopenharmony_ci
24461847f8eSopenharmony_ci    /**
24561847f8eSopenharmony_ci     * Configure the DataSharePredicates to match the fields whose data type is string and value is
24661847f8eSopenharmony_ci     * not similar to a specified string.
24761847f8eSopenharmony_ci     * This method is similar to unlike of the SQL statement.
24861847f8eSopenharmony_ci     *
24961847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
25061847f8eSopenharmony_ci     * @param { string } value - Indicates the value to match with the DataSharePredicates. The percent sign (%) in the value
25161847f8eSopenharmony_ci     * is a wildcard (like * in a regular expression).
25261847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates that match the specified field.
25361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
25461847f8eSopenharmony_ci     * @systemapi
25561847f8eSopenharmony_ci     * @StageModelOnly
25661847f8eSopenharmony_ci     * @since 9
25761847f8eSopenharmony_ci     */
25861847f8eSopenharmony_ci    unlike(field: string, value: string): DataSharePredicates;
25961847f8eSopenharmony_ci
26061847f8eSopenharmony_ci    /**
26161847f8eSopenharmony_ci     * Configure DataSharePredicates to match the specified field whose data type is string and the value contains
26261847f8eSopenharmony_ci     * a wildcard.
26361847f8eSopenharmony_ci     * Different from like, the input parameters of this method are case-sensitive.
26461847f8eSopenharmony_ci     *
26561847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
26661847f8eSopenharmony_ci     * @param { string } value - Indicates the value to match with DataSharePredicates.
26761847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the SQL statement with the specified DataSharePredicates.
26861847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
26961847f8eSopenharmony_ci     * @systemapi
27061847f8eSopenharmony_ci     * @StageModelOnly
27161847f8eSopenharmony_ci     * @since 9
27261847f8eSopenharmony_ci     */
27361847f8eSopenharmony_ci    glob(field: string, value: string): DataSharePredicates;
27461847f8eSopenharmony_ci
27561847f8eSopenharmony_ci    /**
27661847f8eSopenharmony_ci     * Restricts the value of the field to the range between low value and high value.
27761847f8eSopenharmony_ci     *
27861847f8eSopenharmony_ci     * @param { string } field - Indicates the column name.
27961847f8eSopenharmony_ci     * @param { ValueType } low - Indicates the minimum value.
28061847f8eSopenharmony_ci     * @param { ValueType } high - Indicates the maximum value.
28161847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
28261847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
28361847f8eSopenharmony_ci     * @systemapi
28461847f8eSopenharmony_ci     * @StageModelOnly
28561847f8eSopenharmony_ci     * @since 9
28661847f8eSopenharmony_ci     */
28761847f8eSopenharmony_ci    between(field: string, low: ValueType, high: ValueType): DataSharePredicates;
28861847f8eSopenharmony_ci
28961847f8eSopenharmony_ci    /**
29061847f8eSopenharmony_ci     * Configure DataSharePredicates to match the specified field whose data type is int and value is
29161847f8eSopenharmony_ci     * out of a given range.
29261847f8eSopenharmony_ci     *
29361847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
29461847f8eSopenharmony_ci     * @param { ValueType } low - Indicates the minimum value to match with DataSharePredicates.
29561847f8eSopenharmony_ci     * @param { ValueType } high - Indicates the maximum value to match with DataSharePredicates.
29661847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
29761847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
29861847f8eSopenharmony_ci     * @systemapi
29961847f8eSopenharmony_ci     * @StageModelOnly
30061847f8eSopenharmony_ci     * @since 9
30161847f8eSopenharmony_ci     */
30261847f8eSopenharmony_ci    notBetween(field: string, low: ValueType, high: ValueType): DataSharePredicates;
30361847f8eSopenharmony_ci
30461847f8eSopenharmony_ci    /**
30561847f8eSopenharmony_ci     * Restricts the value of the field to be greater than the specified value.
30661847f8eSopenharmony_ci     *
30761847f8eSopenharmony_ci     * @param { string } field - Indicates the column name.
30861847f8eSopenharmony_ci     * @param { ValueType } value - Indicates the String field.
30961847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
31061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
31161847f8eSopenharmony_ci     * @systemapi
31261847f8eSopenharmony_ci     * @StageModelOnly
31361847f8eSopenharmony_ci     * @since 9
31461847f8eSopenharmony_ci     */
31561847f8eSopenharmony_ci    greaterThan(field: string, value: ValueType): DataSharePredicates;
31661847f8eSopenharmony_ci
31761847f8eSopenharmony_ci    /**
31861847f8eSopenharmony_ci     * Restricts the value of the field to be smaller than the specified value.
31961847f8eSopenharmony_ci     *
32061847f8eSopenharmony_ci     * @param { string } field - Indicates the column name.
32161847f8eSopenharmony_ci     * @param { ValueType } value - Indicates the String field.
32261847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
32361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
32461847f8eSopenharmony_ci     * @systemapi
32561847f8eSopenharmony_ci     * @StageModelOnly
32661847f8eSopenharmony_ci     * @since 9
32761847f8eSopenharmony_ci     */
32861847f8eSopenharmony_ci    lessThan(field: string, value: ValueType): DataSharePredicates;
32961847f8eSopenharmony_ci
33061847f8eSopenharmony_ci    /**
33161847f8eSopenharmony_ci     * Restricts the value of the field to be greater than or equal to the specified value.
33261847f8eSopenharmony_ci     *
33361847f8eSopenharmony_ci     * @param { string } field - Indicates the column name.
33461847f8eSopenharmony_ci     * @param { ValueType } value - Indicates the String field.
33561847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
33661847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
33761847f8eSopenharmony_ci     * @systemapi
33861847f8eSopenharmony_ci     * @StageModelOnly
33961847f8eSopenharmony_ci     * @since 9
34061847f8eSopenharmony_ci     */
34161847f8eSopenharmony_ci    greaterThanOrEqualTo(field: string, value: ValueType): DataSharePredicates;
34261847f8eSopenharmony_ci
34361847f8eSopenharmony_ci    /**
34461847f8eSopenharmony_ci     * Restricts the value of the field to be smaller than or equal to the specified value.
34561847f8eSopenharmony_ci     *
34661847f8eSopenharmony_ci     * @param { string } field - Indicates the column name.
34761847f8eSopenharmony_ci     * @param { ValueType } value - Indicates the String field.
34861847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
34961847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
35061847f8eSopenharmony_ci     * @systemapi
35161847f8eSopenharmony_ci     * @StageModelOnly
35261847f8eSopenharmony_ci     * @since 9
35361847f8eSopenharmony_ci     */
35461847f8eSopenharmony_ci    lessThanOrEqualTo(field: string, value: ValueType): DataSharePredicates;
35561847f8eSopenharmony_ci
35661847f8eSopenharmony_ci    /**
35761847f8eSopenharmony_ci     * Restricts the ascending order of the return list. When there are several orders,
35861847f8eSopenharmony_ci     * the one close to the head has the highest priority.
35961847f8eSopenharmony_ci     *
36061847f8eSopenharmony_ci     * @param { string } field - Indicates the column name for sorting the return list.
36161847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
36261847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
36361847f8eSopenharmony_ci     * @StageModelOnly
36461847f8eSopenharmony_ci     * @since 10
36561847f8eSopenharmony_ci     */
36661847f8eSopenharmony_ci    /**
36761847f8eSopenharmony_ci     * Restricts the ascending order of the return list. When there are several orders,
36861847f8eSopenharmony_ci     * the one close to the head has the highest priority.
36961847f8eSopenharmony_ci     *
37061847f8eSopenharmony_ci     * @param { string } field - Indicates the column name for sorting the return list.
37161847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
37261847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
37361847f8eSopenharmony_ci     * @StageModelOnly
37461847f8eSopenharmony_ci     * @crossplatform
37561847f8eSopenharmony_ci     * @since 12
37661847f8eSopenharmony_ci     */
37761847f8eSopenharmony_ci    orderByAsc(field: string): DataSharePredicates;
37861847f8eSopenharmony_ci
37961847f8eSopenharmony_ci    /**
38061847f8eSopenharmony_ci     * Restricts the descending order of the return list. When there are several orders,
38161847f8eSopenharmony_ci     * the one close to the head has the highest priority.
38261847f8eSopenharmony_ci     *
38361847f8eSopenharmony_ci     * @param { string } field - Indicates the column name for sorting the return list.
38461847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
38561847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
38661847f8eSopenharmony_ci     * @StageModelOnly
38761847f8eSopenharmony_ci     * @since 10
38861847f8eSopenharmony_ci     */
38961847f8eSopenharmony_ci    /**
39061847f8eSopenharmony_ci     * Restricts the descending order of the return list. When there are several orders,
39161847f8eSopenharmony_ci     * the one close to the head has the highest priority.
39261847f8eSopenharmony_ci     *
39361847f8eSopenharmony_ci     * @param { string } field - Indicates the column name for sorting the return list.
39461847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
39561847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
39661847f8eSopenharmony_ci     * @StageModelOnly
39761847f8eSopenharmony_ci     * @crossplatform
39861847f8eSopenharmony_ci     * @since 12
39961847f8eSopenharmony_ci     */
40061847f8eSopenharmony_ci    orderByDesc(field: string): DataSharePredicates;
40161847f8eSopenharmony_ci
40261847f8eSopenharmony_ci    /**
40361847f8eSopenharmony_ci     * Restricts each row of the query result to be unique.
40461847f8eSopenharmony_ci     *
40561847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the SQL query statement with the specified DataSharePredicates.
40661847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
40761847f8eSopenharmony_ci     * @systemapi
40861847f8eSopenharmony_ci     * @StageModelOnly
40961847f8eSopenharmony_ci     * @since 9
41061847f8eSopenharmony_ci     */
41161847f8eSopenharmony_ci    distinct(): DataSharePredicates;
41261847f8eSopenharmony_ci
41361847f8eSopenharmony_ci    /**
41461847f8eSopenharmony_ci     * Construct a query object to specify the number of results and the starting position.
41561847f8eSopenharmony_ci     *
41661847f8eSopenharmony_ci     * @param { number } total - Represents the specified number of results.
41761847f8eSopenharmony_ci     * @param { number } offset - Indicates the starting position.
41861847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the query object.
41961847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
42061847f8eSopenharmony_ci     * @StageModelOnly
42161847f8eSopenharmony_ci     * @since 10
42261847f8eSopenharmony_ci     */
42361847f8eSopenharmony_ci    /**
42461847f8eSopenharmony_ci     * Construct a query object to specify the number of results and the starting position.
42561847f8eSopenharmony_ci     *
42661847f8eSopenharmony_ci     * @param { number } total - Represents the specified number of results.
42761847f8eSopenharmony_ci     * @param { number } offset - Indicates the starting position.
42861847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the query object.
42961847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
43061847f8eSopenharmony_ci     * @StageModelOnly
43161847f8eSopenharmony_ci     * @crossplatform
43261847f8eSopenharmony_ci     * @since 12
43361847f8eSopenharmony_ci     */
43461847f8eSopenharmony_ci    limit(total: number, offset: number): DataSharePredicates;
43561847f8eSopenharmony_ci
43661847f8eSopenharmony_ci    /**
43761847f8eSopenharmony_ci     * Configure {@code DataSharePredicates} to group query results by specified columns.
43861847f8eSopenharmony_ci     *
43961847f8eSopenharmony_ci     * @param { Array<string> } fields - Indicates the specified columns by which query results are grouped.
44061847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the DataSharePredicates with the specified columns by which query results are grouped.
44161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
44261847f8eSopenharmony_ci     * @systemapi
44361847f8eSopenharmony_ci     * @StageModelOnly
44461847f8eSopenharmony_ci     * @since 9
44561847f8eSopenharmony_ci     */
44661847f8eSopenharmony_ci    groupBy(fields: Array<string>): DataSharePredicates;
44761847f8eSopenharmony_ci
44861847f8eSopenharmony_ci    /**
44961847f8eSopenharmony_ci     * Configure {@code DataSharePredicates} to specify the index column.
45061847f8eSopenharmony_ci     * Before using this method, you need to create an index column.
45161847f8eSopenharmony_ci     *
45261847f8eSopenharmony_ci     * @param { string } field - Indicates the name of the index column.
45361847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns DataSharePredicates with the specified index column.
45461847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
45561847f8eSopenharmony_ci     * @systemapi
45661847f8eSopenharmony_ci     * @StageModelOnly
45761847f8eSopenharmony_ci     * @since 9
45861847f8eSopenharmony_ci     */
45961847f8eSopenharmony_ci    indexedBy(field: string): DataSharePredicates;
46061847f8eSopenharmony_ci
46161847f8eSopenharmony_ci    /**
46261847f8eSopenharmony_ci     * Configure {@code DataSharePredicates} to match the specified field whose data type is ValueType array and values
46361847f8eSopenharmony_ci     * are within a given range.
46461847f8eSopenharmony_ci     *
46561847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
46661847f8eSopenharmony_ci     * @param { Array<ValueType> } value - Indicates the values to match with DataSharePredicates.
46761847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns DataSharePredicates that matches the specified field.
46861847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
46961847f8eSopenharmony_ci     * @StageModelOnly
47061847f8eSopenharmony_ci     * @since 10
47161847f8eSopenharmony_ci     */
47261847f8eSopenharmony_ci    /**
47361847f8eSopenharmony_ci     * Configure {@code DataSharePredicates} to match the specified field whose data type is ValueType array and values
47461847f8eSopenharmony_ci     * are within a given range.
47561847f8eSopenharmony_ci     *
47661847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
47761847f8eSopenharmony_ci     * @param { Array<ValueType> } value - Indicates the values to match with DataSharePredicates.
47861847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns DataSharePredicates that matches the specified field.
47961847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
48061847f8eSopenharmony_ci     * @StageModelOnly
48161847f8eSopenharmony_ci     * @crossplatform
48261847f8eSopenharmony_ci     * @since 12
48361847f8eSopenharmony_ci     */
48461847f8eSopenharmony_ci    in(field: string, value: Array<ValueType>): DataSharePredicates;
48561847f8eSopenharmony_ci
48661847f8eSopenharmony_ci    /**
48761847f8eSopenharmony_ci     * Configure {@code DataSharePredicates} to match the specified field whose data type is String array and values
48861847f8eSopenharmony_ci     * are out of a given range.
48961847f8eSopenharmony_ci     *
49061847f8eSopenharmony_ci     * @param { string } field - Indicates the column name in the database table.
49161847f8eSopenharmony_ci     * @param { Array<ValueType> } value - Indicates the values to match with DataSharePredicates.
49261847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns DataSharePredicates that matches the specified field.
49361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
49461847f8eSopenharmony_ci     * @systemapi
49561847f8eSopenharmony_ci     * @StageModelOnly
49661847f8eSopenharmony_ci     * @since 9
49761847f8eSopenharmony_ci     */
49861847f8eSopenharmony_ci    notIn(field: string, value: Array<ValueType>): DataSharePredicates;
49961847f8eSopenharmony_ci
50061847f8eSopenharmony_ci    /**
50161847f8eSopenharmony_ci     * Configure {@code DataSharePredicates} Creates a query condition using the specified key prefix.
50261847f8eSopenharmony_ci     *
50361847f8eSopenharmony_ci     * @param { string } prefix - Represents the specified key prefix.
50461847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the query object.
50561847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
50661847f8eSopenharmony_ci     * @systemapi
50761847f8eSopenharmony_ci     * @StageModelOnly
50861847f8eSopenharmony_ci     * @since 9
50961847f8eSopenharmony_ci     */
51061847f8eSopenharmony_ci    prefixKey(prefix: string): DataSharePredicates;
51161847f8eSopenharmony_ci
51261847f8eSopenharmony_ci    /**
51361847f8eSopenharmony_ci     * Configure {@code DataSharePredicates} to match the specified value whose key is within a given range.
51461847f8eSopenharmony_ci     *
51561847f8eSopenharmony_ci     * @param { Array<string> } keys - Represents the key names.
51661847f8eSopenharmony_ci     * @returns { DataSharePredicates } Returns the query object.
51761847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedDataManager.DataShare.Core
51861847f8eSopenharmony_ci     * @systemapi
51961847f8eSopenharmony_ci     * @StageModelOnly
52061847f8eSopenharmony_ci     * @since 9
52161847f8eSopenharmony_ci     */
52261847f8eSopenharmony_ci    inKeys(keys: Array<string>): DataSharePredicates;
52361847f8eSopenharmony_ci  }
52461847f8eSopenharmony_ci}
52561847f8eSopenharmony_ci
52661847f8eSopenharmony_ciexport default dataSharePredicates;
527