diff --git a/api/@ohos.data.rdb.d.ts b/api/@ohos.data.rdb.d.ts index 1b0bd3d1d..63e0cf480 100644 --- a/api/@ohos.data.rdb.d.ts +++ b/api/@ohos.data.rdb.d.ts @@ -13,9 +13,9 @@ * limitations under the License. */ -import {AsyncCallback, Callback} from './basic'; -import { ResultSet as _ResultSet } from './data/rdb/resultSet'; -import { ResultSetV9 as _ResultSetV9 } from './data/rdb/resultSet'; +import{ AsyncCallback, Callback } from './basic'; +import{ ResultSet as _ResultSet } from './data/rdb/resultSet'; +import{ ResultSetV9 as _ResultSetV9 } from './data/rdb/resultSet'; import Context from "./application/BaseContext"; import dataSharePredicates from './@ohos.data.dataSharePredicates'; @@ -26,8 +26,9 @@ import dataSharePredicates from './@ohos.data.dataSharePredicates'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 */ -declare namespace rdb { - /** +declare namespace rdb +{ + /** * Obtains an RDB store. * * You can set parameters of the RDB store as required. In general, this method is recommended @@ -42,8 +43,8 @@ declare namespace rdb { * @deprecated since 9 */ function getRdbStore(context: Context, config: StoreConfig, version: number, callback: AsyncCallback): void; - - /** + + /** * Obtains an RDB store. * * You can set parameters of the RDB store as required. In general, this method is recommended @@ -66,7 +67,7 @@ declare namespace rdb { * to obtain a rdb store. * * @param {Context} context - Indicates the context of application or capability. - * @param {StoreConfig} config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. + * @param {StoreConfigV9} config - Indicates the {@link StoreConfigV9} configuration of the database related to this RDB store. * @param {number} version - Indicates the database version for upgrade or downgrade. * @param {AsyncCallback} callback - the RDB store {@link RdbStoreV9}. * @throws {BusinessError} 401 - if the parameter type is incorrect. @@ -75,8 +76,8 @@ declare namespace rdb { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ - function getRdbStoreV9(context: Context, config: StoreConfig, version: number, callback: AsyncCallback): void; - + function getRdbStoreV9(context: Context, config: StoreConfigV9, version: number, callback: AsyncCallback): void; + /** * Obtains an RDB store. * @@ -84,7 +85,7 @@ declare namespace rdb { * to obtain a rdb store. * * @param {Context} context - Indicates the context of application or capability. - * @param {StoreConfig} config - Indicates the {@link StoreConfig} configuration of the database related to this RDB store. + * @param {StoreConfigV9} config - Indicates the {@link StoreConfigV9} configuration of the database related to this RDB store. * @param {number} version - Indicates the database version for upgrade or downgrade. * @returns {Promise} the RDB store {@link RdbStoreV9}. * @throws {BusinessError} 401 - if the parameter type is incorrect. @@ -93,20 +94,20 @@ declare namespace rdb { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ - function getRdbStoreV9(context: Context, config: StoreConfig, version: number): Promise; + function getRdbStoreV9(context: Context, config: StoreConfigV9, version: number): Promise; - /** + /** * Deletes the database with a specified name. * * @param {Context} context - Indicates the context of application or capability. * @param {string} name - Indicates the database name. * @param {AsyncCallback} callback - the callback of deleteRdbStore. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 - * @deprecated since 9 + * @deprecated since 9 */ function deleteRdbStore(context: Context, name: string, callback: AsyncCallback): void; - /** + /** * Deletes the database with a specified name. * * @param {Context} context - Indicates the context of application or capability. @@ -114,7 +115,7 @@ declare namespace rdb { * @returns {Promise} the promise returned by the function. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 - * @deprecated since 9 + * @deprecated since 9 */ function deleteRdbStore(context: Context, name: string): Promise; @@ -126,7 +127,7 @@ declare namespace rdb { * @param {AsyncCallback} callback - the callback of deleteRdbStore. * @throws {BusinessError} 401 - if the parameter type is incorrect. * @throws {BusinessError} 14800010 - if failed delete database by invalid database name - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ function deleteRdbStoreV9(context: Context, name: string, callback: AsyncCallback): void; @@ -183,8 +184,8 @@ declare namespace rdb { */ SUBSCRIBE_TYPE_REMOTE = 0, } - - /** + + /** * Describes the {@code RdbStoreV9} type. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -245,300 +246,300 @@ declare namespace rdb { * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 - * @deprecated since 9 + * @deprecated since 9 */ interface RdbStore { /** - * Inserts a row of data into the target table. - * - * @param {string} table - Indicates the row of data to be inserted into the table. - * @param {ValuesBucket} values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @param {AsyncCallback} callback - the row ID if the operation is successful. returns -1 otherwise. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ + * Inserts a row of data into the target table. + * + * @param {string} table - Indicates the row of data to be inserted into the table. + * @param {ValuesBucket} values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @param {AsyncCallback} callback - the row ID if the operation is successful. returns -1 otherwise. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ insert(table: string, values: ValuesBucket, callback: AsyncCallback): void; - - /** - * Inserts a row of data into the target table. - * - * @param {string} table - Indicates the row of data to be inserted into the table. - * @param {ValuesBucket} values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @returns {Promise} return the row ID if the operation is successful. return -1 otherwise. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ + + /** + * Inserts a row of data into the target table. + * + * @param {string} table - Indicates the row of data to be inserted into the table. + * @param {ValuesBucket} values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @returns {Promise} return the row ID if the operation is successful. return -1 otherwise. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ insert(table: string, values: ValuesBucket): Promise; /** - * Inserts a batch of data into the target table. - * - * @param {string} table - Indicates the target table. - * @param {Array} values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. - * @param {AsyncCallback} callback - the number of values that were inserted if the operation is successful. returns -1 otherwise. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ + * Inserts a batch of data into the target table. + * + * @param {string} table - Indicates the target table. + * @param {Array} values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. + * @param {AsyncCallback} callback - the number of values that were inserted if the operation is successful. returns -1 otherwise. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ batchInsert(table: string, values: Array, callback: AsyncCallback): void; - - /** - * Inserts a batch of data into the target table. - * - * @param {string} table - Indicates the target table. - * @param {Array} values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. - * @returns {Promise} return the number of values that were inserted if the operation is successful. returns -1 otherwise. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ + + /** + * Inserts a batch of data into the target table. + * + * @param {string} table - Indicates the target table. + * @param {Array} values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. + * @returns {Promise} return the number of values that were inserted if the operation is successful. returns -1 otherwise. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ batchInsert(table: string, values: Array): Promise; /** - * Updates data in the database based on a a specified instance object of RdbPredicates. - * - * @param {ValuesBucket} values - Indicates Indicates the row of data to be updated in the database.The key-value pairs are associated with column names of the database table. - * @param {RdbPredicates} predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @param {AsyncCallback} callback - the number of affected rows. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ + * Updates data in the database based on a a specified instance object of RdbPredicates. + * + * @param {ValuesBucket} values - Indicates Indicates the row of data to be updated in the database.The key-value pairs are associated with column names of the database table. + * @param {RdbPredicates} predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @param {AsyncCallback} callback - the number of affected rows. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback): void; - - /** - * Updates data in the database based on a a specified instance object of RdbPredicates. - * - * @param {ValuesBucket} values - Indicates Indicates the row of data to be updated in the database.The key-value pairs are associated with column names of the database table. - * @param {RdbPredicates} predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @returns {Promise} return the number of affected rows. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ + + /** + * Updates data in the database based on a a specified instance object of RdbPredicates. + * + * @param {ValuesBucket} values - Indicates Indicates the row of data to be updated in the database.The key-value pairs are associated with column names of the database table. + * @param {RdbPredicates} predicates - Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @returns {Promise} return the number of affected rows. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ update(values: ValuesBucket, predicates: RdbPredicates): Promise; /** - * Deletes data from the database based on a specified instance object of RdbPredicates. - * - * @param {RdbPredicates} predicates - the specified delete condition by the instance object of {@link RdbPredicates}. - * @param {AsyncCallback} callback - the number of affected rows. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - delete(predicates: RdbPredicates, callback: AsyncCallback): void; - - /** - * Deletes data from the database based on a specified instance object of RdbPredicates. - * - * @param {RdbPredicates} predicates - the specified delete condition by the instance object of {@link RdbPredicates}. - * @returns {Promise} return the number of affected rows. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - delete(predicates: RdbPredicates): Promise; + * Deletes data from the database based on a specified instance object of RdbPredicates. + * + * @param {RdbPredicates} predicates - the specified delete condition by the instance object of {@link RdbPredicates}. + * @param {AsyncCallback} callback - the number of affected rows. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + delete (predicates: RdbPredicates, callback: AsyncCallback): void; /** - * Queries data in the database based on specified conditions. - * - * @param {RdbPredicates} predicates - the specified query condition by the instance object of {@link RdbPredicates}. - * @param {Array} columns - the columns to query. If the value is empty array, the query applies to all columns. - * @param {AsyncCallback} callback - the {@link ResultSet} object if the operation is successful. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ + * Deletes data from the database based on a specified instance object of RdbPredicates. + * + * @param {RdbPredicates} predicates - the specified delete condition by the instance object of {@link RdbPredicates}. + * @returns {Promise} return the number of affected rows. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + delete (predicates: RdbPredicates): Promise; + + /** + * Queries data in the database based on specified conditions. + * + * @param {RdbPredicates} predicates - the specified query condition by the instance object of {@link RdbPredicates}. + * @param {Array} columns - the columns to query. If the value is empty array, the query applies to all columns. + * @param {AsyncCallback} callback - the {@link ResultSet} object if the operation is successful. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ query(predicates: RdbPredicates, columns: Array, callback: AsyncCallback): void; - - /** - * Queries data in the database based on specified conditions. - * - * @param {RdbPredicates} predicates - the specified query condition by the instance object of {@link RdbPredicates}. - * @param {Array} columns - the columns to query. If the value is null, the query applies to all columns. - * @returns {Promise} return the {@link ResultSet} object if the operation is successful. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - query(predicates: RdbPredicates, columns?: Array): Promise; /** - * Deletes data from the database based on a specified instance object of RdbPredicates. - * - * @param {string} sql - Indicates the SQL statement to execute. - * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. - * @returns {Promise} return the {@link ResultSet} object if the operation is successful. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ + * Queries data in the database based on specified conditions. + * + * @param {RdbPredicates} predicates - the specified query condition by the instance object of {@link RdbPredicates}. + * @param {Array} columns - the columns to query. If the value is null, the query applies to all columns. + * @returns {Promise} return the {@link ResultSet} object if the operation is successful. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + query(predicates: RdbPredicates, columns ?: Array): Promise; + + /** + * Deletes data from the database based on a specified instance object of RdbPredicates. + * + * @param {string} sql - Indicates the SQL statement to execute. + * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. + * @returns {Promise} return the {@link ResultSet} object if the operation is successful. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ querySql(sql: string, bindArgs: Array, callback: AsyncCallback): void; - - /** - * Deletes data from the database based on a specified instance object of RdbPredicates. - * - * @param {string} sql - Indicates the SQL statement to execute. - * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. - * @returns {Promise} return the {@link ResultSet} object if the operation is successful. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ - querySql(sql: string, bindArgs?: Array): Promise; /** - * Executes an SQL statement that contains specified parameters but returns no value. - * - * @param {string} sql - Indicates the SQL statement to execute. - * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. - * @param {AsyncCallback} callback - the callback of executeSql. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ + * Deletes data from the database based on a specified instance object of RdbPredicates. + * + * @param {string} sql - Indicates the SQL statement to execute. + * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. + * @returns {Promise} return the {@link ResultSet} object if the operation is successful. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ + querySql(sql: string, bindArgs ?: Array): Promise; + + /** + * Executes an SQL statement that contains specified parameters but returns no value. + * + * @param {string} sql - Indicates the SQL statement to execute. + * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. + * @param {AsyncCallback} callback - the callback of executeSql. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ executeSql(sql: string, bindArgs: Array, callback: AsyncCallback): void; - - /** - * Executes an SQL statement that contains specified parameters but returns no value. - * - * @param {string} sql - Indicates the SQL statement to execute. - * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. - * @returns {Promise} the promise returned by the function. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ - executeSql(sql: string, bindArgs?: Array): Promise; /** - * beginTransaction before excute your sql. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ - beginTransaction():void; + * Executes an SQL statement that contains specified parameters but returns no value. + * + * @param {string} sql - Indicates the SQL statement to execute. + * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. + * @returns {Promise} the promise returned by the function. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ + executeSql(sql: string, bindArgs ?: Array): Promise; /** - * commit the the sql you have excuted. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ - commit():void; + * beginTransaction before excute your sql. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ + beginTransaction(): void; /** - * roll back the sql you have already excuted. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ - rollBack():void; + * commit the the sql you have excuted. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ + commit(): void; /** - * Set table to be distributed table. - * + * roll back the sql you have already excuted. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ + rollBack(): void; + + /** + * Set table to be distributed table. + * * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param {Array} tables - Indicates the tables name you want to set. - * @param {AsyncCallback} callback - the callback of setDistributedTables. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ + * @param {Array} tables - Indicates the tables name you want to set. + * @param {AsyncCallback} callback - the callback of setDistributedTables. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ setDistributedTables(tables: Array, callback: AsyncCallback): void; - - /** - * Set table to be distributed table. - * + + /** + * Set table to be distributed table. + * * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param {Array} tables - Indicates the tables name you want to set. - * @returns {Promise} the promise returned by the function. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ + * @param {Array} tables - Indicates the tables name you want to set. + * @returns {Promise} the promise returned by the function. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ setDistributedTables(tables: Array): Promise; /** - * Obtain distributed table name of specified remote device according to local table name. + * Obtain distributed table name of specified remote device according to local table name. * When query remote device database, distributed table name is needed. - * + * * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param {string} device - Indicates the remote device. - * @param {AsyncCallback} callback - {string}: the distributed table name. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ + * @param {string} device - Indicates the remote device. + * @param {AsyncCallback} callback - {string}: the distributed table name. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ obtainDistributedTableName(device: string, table: string, callback: AsyncCallback): void; - - /** - * Obtain distributed table name of specified remote device according to local table name. + + /** + * Obtain distributed table name of specified remote device according to local table name. * When query remote device database, distributed table name is needed. - * + * * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param {string} device - Indicates the remote device. - * @returns {Promise} {string}: the distributed table name. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ + * @param {string} device - Indicates the remote device. + * @returns {Promise} {string}: the distributed table name. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ obtainDistributedTableName(device: string, table: string): Promise; /** - * Sync data between devices. - * + * Sync data between devices. + * * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param {string} device - Indicates the remote device. - * @param {AsyncCallback>} callback - {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ - sync(mode: SyncMode, predicates: RdbPredicates, callback: AsyncCallback>): void; - - /** - * Sync data between devices. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param {string} device - Indicates the remote device. - * @returns {Promise>} {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ - sync(mode: SyncMode, predicates: RdbPredicates): Promise>; + * @param {string} device - Indicates the remote device. + * @param {AsyncCallback>} callback - {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ + sync(mode: SyncMode, predicates: RdbPredicates, callback: AsyncCallback>): void; /** - * Registers an observer for the database. When data in the distributed database changes, + * Sync data between devices. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param {string} device - Indicates the remote device. + * @returns {Promise>} {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ + sync(mode: SyncMode, predicates: RdbPredicates): Promise>; + + /** + * Registers an observer for the database. When data in the distributed database changes, * the callback will be invoked. - * - * @param {string} event - Indicates the event must be string 'dataChange'. - * @param {SubscribeType} type - Indicates the subscription type, which is defined in {@link SubscribeType}. - * @param {AsyncCallback>} observer - {Array}: the observer of data change events in the distributed database. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ + * + * @param {string} event - Indicates the event must be string 'dataChange'. + * @param {SubscribeType} type - Indicates the subscription type, which is defined in {@link SubscribeType}. + * @param {AsyncCallback>} observer - {Array}: the observer of data change events in the distributed database. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ on(event: 'dataChange', type: SubscribeType, observer: Callback>): void; /** - * Remove specified observer of specified type from the database. - * - * @param {string} event - Indicates the event must be string 'dataChange'. - * @param {SubscribeType} type - Indicates the subscription type, which is defined in {@link SubscribeType}. - * @param {AsyncCallback>} observer - {Array}: the data change observer already registered. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ - off(event:'dataChange', type: SubscribeType, observer: Callback>): void; + * Remove specified observer of specified type from the database. + * + * @param {string} event - Indicates the event must be string 'dataChange'. + * @param {SubscribeType} type - Indicates the subscription type, which is defined in {@link SubscribeType}. + * @param {AsyncCallback>} observer - {Array}: the data change observer already registered. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ + off(event: 'dataChange', type: SubscribeType, observer: Callback>): void; } /** @@ -551,445 +552,445 @@ declare namespace rdb { * @since 9 */ interface RdbStoreV9 { - /** - * Inserts a row of data into the target table. - * - * @param {string} table - Indicates the row of data to be inserted into the table. - * @param {ValuesBucket} values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @param {AsyncCallback} callback - the row ID if the operation is successful. returns -1 otherwise. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ + /** + * Inserts a row of data into the target table. + * + * @param {string} table - Indicates the row of data to be inserted into the table. + * @param {ValuesBucket} values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @param {AsyncCallback} callback - the row ID if the operation is successful. returns -1 otherwise. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ insert(table: string, values: ValuesBucket, callback: AsyncCallback): void; - - /** - * Inserts a row of data into the target table. - * - * @param {string} table - Indicates the row of data to be inserted into the table. - * @param {ValuesBucket} values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @returns {Promise} return the row ID if the operation is successful. return -1 otherwise. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - insert(table: string, values: ValuesBucket): Promise; - - /** - * Inserts a batch of data into the target table. - * - * @param {string} table - Indicates the target table. - * @param {Array} values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. - * @param {AsyncCallback} callback - the number of values that were inserted if the operation is successful. returns -1 otherwise. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - batchInsert(table: string, values: Array, callback: AsyncCallback): void; - - /** - * Inserts a batch of data into the target table. - * - * @param {string} table - Indicates the target table. - * @param {Array} values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. - * @returns {Promise} return the number of values that were inserted if the operation is successful. returns -1 otherwise. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - batchInsert(table: string, values: Array): Promise; - - /** - * Updates data in the database based on a a specified instance object of RdbPredicatesV9. - * - * @param {ValuesBucket} values - Indicates Indicates the row of data to be updated in the database.The key-value pairs are associated with column names of the database table. - * @param {RdbPredicatesV9} predicates - Indicates the specified update condition by the instance object of {@link RdbPredicatesV9}. - * @param {AsyncCallback} callback - the number of affected rows. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - update(values: ValuesBucket, predicates: RdbPredicatesV9, callback: AsyncCallback): void; - - /** - * Updates data in the database based on a a specified instance object of RdbPredicatesV9. - * - * @param {ValuesBucket} values - Indicates Indicates the row of data to be updated in the database.The key-value pairs are associated with column names of the database table. - * @param {RdbPredicatesV9} predicates - Indicates the specified update condition by the instance object of {@link RdbPredicatesV9}. - * @returns {Promise} return the number of affected rows. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - update(values: ValuesBucket, predicates: RdbPredicatesV9): Promise; - - /** - * Updates data in the database based on a a specified instance object of RdbPredicatesV9. - * - * @param {string} table - Indicates the target table. - * @param {ValuesBucket} values - Indicates the row of data to be updated in the database.The key-value pairs are associated with column names of the database table. - * @param {DataSharePredicates} predicates - Indicates the specified update condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @param {AsyncCallback} callback - the number of affected rows. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback): void; - - /** - * Updates data in the database based on a a specified instance object of RdbPredicatesV9. - * - * @param {string} table - Indicates the target table. - * @param {ValuesBucket} values - Indicates the row of data to be updated in the database.The key-value pairs are associated with column names of the database table. - * @param {DataSharePredicates} predicates - Indicates the specified update condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @returns {Promise} return the number of affected rows. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise; - - /** - * Deletes data from the database based on a specified instance object of RdbPredicatesV9. - * - * @param {RdbPredicatesV9} predicates - the specified delete condition by the instance object of {@link RdbPredicatesV9}. - * @param {AsyncCallback} callback - the number of affected rows. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - delete(predicates: RdbPredicatesV9, callback: AsyncCallback): void; - - /** - * Deletes data from the database based on a specified instance object of RdbPredicatesV9. - * - * @param {RdbPredicatesV9} predicates - the specified delete condition by the instance object of {@link RdbPredicatesV9}. - * @returns {Promise} return the number of affected rows. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - delete(predicates: RdbPredicatesV9): Promise; - - /** - * Deletes data from the database based on a specified instance object of RdbPredicatesV9. - * - * @param {string} table - Indicates the target table. - * @param {DataSharePredicates} predicates - the specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @param {AsyncCallback} callback - the number of affected rows. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - delete(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback): void; - - /** - * Deletes data from the database based on a specified instance object of RdbPredicatesV9. - * - * @param {string} table - Indicates the target table. - * @param {DataSharePredicates} predicates - the specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @param {AsyncCallback} callback - the number of affected rows. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - delete(table: string, predicates: dataSharePredicates.DataSharePredicates): Promise; - - /** - * Queries data in the database based on specified conditions. - * - * @param {RdbPredicatesV9} predicates - the specified query condition by the instance object of {@link RdbPredicatesV9}. - * @param {Array} columns - the columns to query. If the value is empty array, the query applies to all columns. - * @param {AsyncCallback} callback - the {@link ResultSetV9} object if the operation is successful. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - query(predicates: RdbPredicatesV9, columns: Array, callback: AsyncCallback): void; - - /** - * Queries data in the database based on specified conditions. - * - * @param {RdbPredicatesV9} predicates - the specified query condition by the instance object of {@link RdbPredicatesV9}. - * @param {Array} columns - the columns to query. If the value is null, the query applies to all columns. - * @returns {Promise} return the {@link ResultSetV9} object if the operation is successful. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - query(predicates: RdbPredicatesV9, columns?: Array): Promise; - - /** - * Queries data in the database based on specified conditions. - * - * @param {string} table - Indicates the target table. - * @param {dataSharePredicates.DataSharePredicates} predicates - the specified query condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @param {Array} columns - the columns to query. If the value is empty array, the query applies to all columns. - * @param {AsyncCallback} callback - the {@link ResultSetV9} object if the operation is successful. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - query(table: string, predicates: dataSharePredicates.DataSharePredicates, columns: Array, callback: AsyncCallback): void; - - /** - * Queries data in the database based on specified conditions. - * - * @param {string} table - Indicates the target table. - * @param {dataSharePredicates.DataSharePredicates} predicates - the specified query condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @param {Array} columns - the columns to query. If the value is null, the query applies to all columns. - * @returns {Promise} return the {@link ResultSetV9} object if the operation is successful. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - query(table: string, predicates: dataSharePredicates.DataSharePredicates, columns?: Array): Promise; - - /** - * Queries remote data in the database based on specified conditions before Synchronizing Data. - * - * @param {string} device - Indicates specified remote device. - * @param {string} table - Indicates the target table. - * @param {RdbPredicatesV9} predicates - the specified remote remote query condition by the instance object of {@link RdbPredicatesV9}. - * @param {Array} columns - the columns to remote query. If the value is empty array, the remote query applies to all columns. - * @param {AsyncCallback} callback - the {@link ResultSetV9} object if the operation is successful. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - remoteQuery(device: string, table: string, predicates: RdbPredicatesV9, columns: Array, callback: AsyncCallback): void; - - /** - * Queries remote data in the database based on specified conditions before Synchronizing Data. - * - * @param {string} device - Indicates specified remote device. - * @param {string} table - Indicates the target table. - * @param {RdbPredicatesV9} predicates - the specified remote remote query condition by the instance object of {@link RdbPredicatesV9}. - * @param {Array} columns - the columns to remote query. If the value is empty array, the remote query applies to all columns. - * @returns {Promise} return the {@link ResultSetV9} object if the operation is successful. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - remoteQuery(device: string, table: string, predicates: RdbPredicatesV9, columns: Array): Promise; - - /** - * Queries data in the database based on SQL statement. - * - * @param {string} sql - Indicates the SQL statement to execute. - * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. - * @param {AsyncCallback} callback - the {@link ResultSetV9} object if the operation is successful. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - querySql(sql: string, bindArgs: Array, callback: AsyncCallback): void; - - /** - * Deletes data from the database based on a specified instance object of RdbPredicatesV9. - * - * @param {string} sql - Indicates the SQL statement to execute. - * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. - * @returns {Promise} return the {@link ResultSetV9} object if the operation is successful. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - querySql(sql: string, bindArgs?: Array): Promise; - - /** - * Executes an SQL statement that contains specified parameters but returns no value. - * - * @param {string} sql - Indicates the SQL statement to execute. - * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. - * @param {AsyncCallback} callback - the callback of executeSql. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - executeSql(sql: string, bindArgs: Array, callback: AsyncCallback): void; - - /** - * Executes an SQL statement that contains specified parameters but returns no value. - * - * @param {string} sql - Indicates the SQL statement to execute. - * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. - * @returns {Promise} the promise returned by the function. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - executeSql(sql: string, bindArgs?: Array): Promise; - - /** - * beginTransaction before excute your sql. - * - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - beginTransaction():void; - - /** - * commit the the sql you have excuted. - * - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - commit():void; /** - * roll back the sql you have already excuted. - * - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - rollBack():void; + * Inserts a row of data into the target table. + * + * @param {string} table - Indicates the row of data to be inserted into the table. + * @param {ValuesBucket} values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @returns {Promise} return the row ID if the operation is successful. return -1 otherwise. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + insert(table: string, values: ValuesBucket): Promise; - /** - * Backs up a database in a specified name. - * - * @param {string} destName - Indicates the name that saves the database backup. - * @param {AsyncCallback} callback - the callback of backup. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - backup(destName:string, callback: AsyncCallback):void; - - /** - * Backs up a database in a specified name. - * - * @param {string} destName - Indicates the name that saves the database backup. - * @returns {Promise} the promise returned by the function. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - backup(destName:string): Promise; + /** + * Inserts a batch of data into the target table. + * + * @param {string} table - Indicates the target table. + * @param {Array} values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. + * @param {AsyncCallback} callback - the number of values that were inserted if the operation is successful. returns -1 otherwise. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + batchInsert(table: string, values: Array, callback: AsyncCallback): void; - /** - * Restores a database from a specified database file. - * - * @param {string} srcName - Indicates the name that saves the database file. - * @param {AsyncCallback} callback - the callback of restore. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - restore(srcName:string, callback: AsyncCallback):void; - - /** - * Restores a database from a specified database file. - * - * @param {string} srcName - Indicates the name that saves the database file. - * @returns {Promise} the promise returned by the function. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - restore(srcName:string): Promise; + /** + * Inserts a batch of data into the target table. + * + * @param {string} table - Indicates the target table. + * @param {Array} values - Indicates the rows of data {@link ValuesBucket} to be inserted into the table. + * @returns {Promise} return the number of values that were inserted if the operation is successful. returns -1 otherwise. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + batchInsert(table: string, values: Array): Promise; - /** - * Set table to be distributed table. - * + /** + * Updates data in the database based on a a specified instance object of RdbPredicatesV9. + * + * @param {ValuesBucket} values - Indicates Indicates the row of data to be updated in the database.The key-value pairs are associated with column names of the database table. + * @param {RdbPredicatesV9} predicates - Indicates the specified update condition by the instance object of {@link RdbPredicatesV9}. + * @param {AsyncCallback} callback - the number of affected rows. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + update(values: ValuesBucket, predicates: RdbPredicatesV9, callback: AsyncCallback): void; + + /** + * Updates data in the database based on a a specified instance object of RdbPredicatesV9. + * + * @param {ValuesBucket} values - Indicates Indicates the row of data to be updated in the database.The key-value pairs are associated with column names of the database table. + * @param {RdbPredicatesV9} predicates - Indicates the specified update condition by the instance object of {@link RdbPredicatesV9}. + * @returns {Promise} return the number of affected rows. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + update(values: ValuesBucket, predicates: RdbPredicatesV9): Promise; + + /** + * Updates data in the database based on a a specified instance object of RdbPredicatesV9. + * + * @param {string} table - Indicates the target table. + * @param {ValuesBucket} values - Indicates the row of data to be updated in the database.The key-value pairs are associated with column names of the database table. + * @param {DataSharePredicates} predicates - Indicates the specified update condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @param {AsyncCallback} callback - the number of affected rows. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback): void; + + /** + * Updates data in the database based on a a specified instance object of RdbPredicatesV9. + * + * @param {string} table - Indicates the target table. + * @param {ValuesBucket} values - Indicates the row of data to be updated in the database.The key-value pairs are associated with column names of the database table. + * @param {DataSharePredicates} predicates - Indicates the specified update condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @returns {Promise} return the number of affected rows. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise; + + /** + * Deletes data from the database based on a specified instance object of RdbPredicatesV9. + * + * @param {RdbPredicatesV9} predicates - the specified delete condition by the instance object of {@link RdbPredicatesV9}. + * @param {AsyncCallback} callback - the number of affected rows. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + delete (predicates: RdbPredicatesV9, callback: AsyncCallback): void; + + /** + * Deletes data from the database based on a specified instance object of RdbPredicatesV9. + * + * @param {RdbPredicatesV9} predicates - the specified delete condition by the instance object of {@link RdbPredicatesV9}. + * @returns {Promise} return the number of affected rows. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + delete (predicates: RdbPredicatesV9): Promise; + + /** + * Deletes data from the database based on a specified instance object of RdbPredicatesV9. + * + * @param {string} table - Indicates the target table. + * @param {DataSharePredicates} predicates - the specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @param {AsyncCallback} callback - the number of affected rows. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + delete (table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback): void; + + /** + * Deletes data from the database based on a specified instance object of RdbPredicatesV9. + * + * @param {string} table - Indicates the target table. + * @param {DataSharePredicates} predicates - the specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @param {AsyncCallback} callback - the number of affected rows. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + delete (table: string, predicates: dataSharePredicates.DataSharePredicates): Promise; + + /** + * Queries data in the database based on specified conditions. + * + * @param {RdbPredicatesV9} predicates - the specified query condition by the instance object of {@link RdbPredicatesV9}. + * @param {Array} columns - the columns to query. If the value is empty array, the query applies to all columns. + * @param {AsyncCallback} callback - the {@link ResultSetV9} object if the operation is successful. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + query(predicates: RdbPredicatesV9, columns: Array, callback: AsyncCallback): void; + + /** + * Queries data in the database based on specified conditions. + * + * @param {RdbPredicatesV9} predicates - the specified query condition by the instance object of {@link RdbPredicatesV9}. + * @param {Array} columns - the columns to query. If the value is null, the query applies to all columns. + * @returns {Promise} return the {@link ResultSetV9} object if the operation is successful. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + query(predicates: RdbPredicatesV9, columns ?: Array): Promise; + + /** + * Queries data in the database based on specified conditions. + * + * @param {string} table - Indicates the target table. + * @param {dataSharePredicates.DataSharePredicates} predicates - the specified query condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @param {Array} columns - the columns to query. If the value is empty array, the query applies to all columns. + * @param {AsyncCallback} callback - the {@link ResultSetV9} object if the operation is successful. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + query(table: string, predicates: dataSharePredicates.DataSharePredicates, columns: Array, callback: AsyncCallback): void; + + /** + * Queries data in the database based on specified conditions. + * + * @param {string} table - Indicates the target table. + * @param {dataSharePredicates.DataSharePredicates} predicates - the specified query condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @param {Array} columns - the columns to query. If the value is null, the query applies to all columns. + * @returns {Promise} return the {@link ResultSetV9} object if the operation is successful. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + query(table: string, predicates: dataSharePredicates.DataSharePredicates, columns ?: Array): Promise; + + /** + * Queries remote data in the database based on specified conditions before Synchronizing Data. + * + * @param {string} device - Indicates specified remote device. + * @param {string} table - Indicates the target table. + * @param {RdbPredicatesV9} predicates - the specified remote remote query condition by the instance object of {@link RdbPredicatesV9}. + * @param {Array} columns - the columns to remote query. If the value is empty array, the remote query applies to all columns. + * @param {AsyncCallback} callback - the {@link ResultSetV9} object if the operation is successful. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + remoteQuery(device: string, table: string, predicates: RdbPredicatesV9, columns: Array, callback: AsyncCallback): void; + + /** + * Queries remote data in the database based on specified conditions before Synchronizing Data. + * + * @param {string} device - Indicates specified remote device. + * @param {string} table - Indicates the target table. + * @param {RdbPredicatesV9} predicates - the specified remote remote query condition by the instance object of {@link RdbPredicatesV9}. + * @param {Array} columns - the columns to remote query. If the value is empty array, the remote query applies to all columns. + * @returns {Promise} return the {@link ResultSetV9} object if the operation is successful. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + remoteQuery(device: string, table: string, predicates: RdbPredicatesV9, columns: Array): Promise; + + /** + * Queries data in the database based on SQL statement. + * + * @param {string} sql - Indicates the SQL statement to execute. + * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. + * @param {AsyncCallback} callback - the {@link ResultSetV9} object if the operation is successful. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + querySql(sql: string, bindArgs: Array, callback: AsyncCallback): void; + + /** + * Deletes data from the database based on a specified instance object of RdbPredicatesV9. + * + * @param {string} sql - Indicates the SQL statement to execute. + * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. + * @returns {Promise} return the {@link ResultSetV9} object if the operation is successful. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + querySql(sql: string, bindArgs ?: Array): Promise; + + /** + * Executes an SQL statement that contains specified parameters but returns no value. + * + * @param {string} sql - Indicates the SQL statement to execute. + * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. + * @param {AsyncCallback} callback - the callback of executeSql. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + executeSql(sql: string, bindArgs: Array, callback: AsyncCallback): void; + + /** + * Executes an SQL statement that contains specified parameters but returns no value. + * + * @param {string} sql - Indicates the SQL statement to execute. + * @param {Array} bindArgs - Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. + * @returns {Promise} the promise returned by the function. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + executeSql(sql: string, bindArgs ?: Array): Promise; + + /** + * BeginTransaction before excute your sql. + * + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + beginTransaction(): void; + + /** + * Commit the the sql you have executed. + * + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + commit(): void; + + /** + * Roll back the sql you have already executed. + * + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + rollBack(): void; + + /** + * Backs up a database in a specified name. + * + * @param {string} destName - Indicates the name that saves the database backup. + * @param {AsyncCallback} callback - the callback of backup. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + backup(destName: string, callback: AsyncCallback): void; + + /** + * Backs up a database in a specified name. + * + * @param {string} destName - Indicates the name that saves the database backup. + * @returns {Promise} the promise returned by the function. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + backup(destName: string): Promise; + + /** + * Restores a database from a specified database file. + * + * @param {string} srcName - Indicates the name that saves the database file. + * @param {AsyncCallback} callback - the callback of restore. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + restore(srcName: string, callback: AsyncCallback): void; + + /** + * Restores a database from a specified database file. + * + * @param {string} srcName - Indicates the name that saves the database file. + * @returns {Promise} the promise returned by the function. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + restore(srcName: string): Promise; + + /** + * Set table to be distributed table. + * * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param {Array} tables - Indicates the tables name you want to set. - * @param {AsyncCallback} callback - the callback of setDistributedTables. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ + * @param {Array} tables - Indicates the tables name you want to set. + * @param {AsyncCallback} callback - the callback of setDistributedTables. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ setDistributedTables(tables: Array, callback: AsyncCallback): void; - - /** - * Set table to be distributed table. - * + + /** + * Set table to be distributed table. + * * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param {Array} tables - Indicates the tables name you want to set. - * @returns {Promise} the promise returned by the function. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ + * @param {Array} tables - Indicates the tables name you want to set. + * @returns {Promise} the promise returned by the function. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ setDistributedTables(tables: Array): Promise; - /** - * Obtain distributed table name of specified remote device according to local table name. + /** + * Obtain distributed table name of specified remote device according to local table name. * When query remote device database, distributed table name is needed. - * + * * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param {string} device - Indicates the remote device. - * @param {AsyncCallback} callback - {string}: the distributed table name. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ + * @param {string} device - Indicates the remote device. + * @param {AsyncCallback} callback - {string}: the distributed table name. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ obtainDistributedTableName(device: string, table: string, callback: AsyncCallback): void; - - /** - * Obtain distributed table name of specified remote device according to local table name. + + /** + * Obtain distributed table name of specified remote device according to local table name. * When query remote device database, distributed table name is needed. - * + * * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param {string} device - Indicates the remote device. - * @returns {Promise} {string}: the distributed table name. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ + * @param {string} device - Indicates the remote device. + * @returns {Promise} {string}: the distributed table name. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ obtainDistributedTableName(device: string, table: string): Promise; - /** - * Sync data between devices. - * + /** + * Sync data between devices. + * * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param {string} device - Indicates the remote device. - * @param {AsyncCallback>} callback - {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - sync(mode: SyncMode, predicates: RdbPredicatesV9, callback: AsyncCallback>): void; - - /** - * Sync data between devices. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param {string} device - Indicates the remote device. - * @returns {Promise>} {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - sync(mode: SyncMode, predicates: RdbPredicatesV9): Promise>; + * @param {string} device - Indicates the remote device. + * @param {AsyncCallback>} callback - {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + sync(mode: SyncMode, predicates: RdbPredicatesV9, callback: AsyncCallback>): void; - /** - * Registers an observer for the database. When data in the distributed database changes, + /** + * Sync data between devices. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param {string} device - Indicates the remote device. + * @returns {Promise>} {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + sync(mode: SyncMode, predicates: RdbPredicatesV9): Promise>; + + /** + * Registers an observer for the database. When data in the distributed database changes, * the callback will be invoked. - * - * @param {string} event - Indicates the event must be string 'dataChange'. - * @param {SubscribeType} type - Indicates the subscription type, which is defined in {@link SubscribeType}. - * @param {AsyncCallback>} observer - {Array}: the observer of data change events in the distributed database. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ + * + * @param {string} event - Indicates the event must be string 'dataChange'. + * @param {SubscribeType} type - Indicates the subscription type, which is defined in {@link SubscribeType}. + * @param {AsyncCallback>} observer - {Array}: the observer of data change events in the distributed database. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ on(event: 'dataChange', type: SubscribeType, observer: Callback>): void; - /** - * Remove specified observer of specified type from the database. - * - * @param {string} event - Indicates the event must be string 'dataChange'. - * @param {SubscribeType} type - Indicates the subscription type, which is defined in {@link SubscribeType}. - * @param {AsyncCallback>} observer - {Array}: the data change observer already registered. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - off(event:'dataChange', type: SubscribeType, observer: Callback>): void; + /** + * Remove specified observer of specified type from the database. + * + * @param {string} event - Indicates the event must be string 'dataChange'. + * @param {SubscribeType} type - Indicates the subscription type, which is defined in {@link SubscribeType}. + * @param {AsyncCallback>} observer - {Array}: the data change observer already registered. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + off(event: 'dataChange', type: SubscribeType, observer: Callback>): void; } /** @@ -1008,844 +1009,837 @@ declare namespace rdb { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 7 */ - type ValuesBucket = { - [key: string]: ValueType | Uint8Array | null; - } + type ValuesBucket = { [key:string]: ValueType | Uint8Array | null; +} +/** + * Manages relational database configurations. + * + * @import import data_rdb from '@ohos.data.rdb'; + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ +interface StoreConfig { + name: string; +} + +/** + * Manages relational database configurations. + * + * @import import data_rdb from '@ohos.data.rdb'; + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ +interface StoreConfigV9 { /** - * Manages relational database configurations. - * - * @import import data_rdb from '@ohos.data.rdb'; - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - interface StoreConfig { - name: string; - } - - /** - * Manages relational database configurations. + * The database name. * * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ - interface StoreConfigV9 { - /** - * The database name. - * - * @import import data_rdb from '@ohos.data.rdb'; - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - name: string; - - /** - * Specifies whether the database is encrypted. - * - * @import import data_rdb from '@ohos.data.rdb'; - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - securityLevel: SecurityLevel; - - /** - * Specifies whether the database is encrypted. - * - * @import import data_rdb from '@ohos.data.rdb'; - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - encrypt?: boolean; - } + name: string; /** - * Manages relational database configurations. + * Specifies whether the database is encrypted. * * @import import data_rdb from '@ohos.data.rdb'; * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 + * @since 9 */ - class RdbPredicates { - /** - * A parameterized constructor used to create an RdbPredicates instance. - * - * @param {string} name - Indicates the table name of the database. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - constructor(name: string) + securityLevel: SecurityLevel; - /** - * Sync data between devices. - * - * @note When query database, this function should not be called. - * @param {Array} devices - Indicates specified remote devices. - * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ + /** + * Specifies whether the database is encrypted. + * + * @import import data_rdb from '@ohos.data.rdb'; + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + encrypt ?: boolean; +} + +/** + * Manages relational database configurations. + * + * @import import data_rdb from '@ohos.data.rdb'; + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ +class RdbPredicates { + /** + * A parameterized constructor used to create an RdbPredicates instance. + * + * @param {string} name - Indicates the table name of the database. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + constructor(name: string) + + /** + * Sync data between devices. + * + * @note When query database, this function should not be called. + * @param {Array} devices - Indicates specified remote devices. + * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ inDevices(devices: Array): RdbPredicates; - /** - * Specify all remote devices which connect to local device when syncing distributed database. - * - * @note When query database, this function should not be called. - * @returns {RdbPredicates} - the {@link RdbPredicates} self. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 8 - * @deprecated since 9 - */ - inAllDevices(): RdbPredicates; - - /** - * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is equal - * to a specified value. - * - * @note This method is similar to = of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. - * @returns {RdbPredicates} - the {@link RdbPredicates} self. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - equalTo(field: string, value: ValueType): RdbPredicates; - - /** - * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is unequal to - * a specified value. - * - * @note This method is similar to != of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. - * @returns {RdbPredicates} - the {@link RdbPredicates} self. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - notEqualTo(field: string, value: ValueType): RdbPredicates; - - /** - * Adds a left parenthesis to the RdbPredicates. - * - * @note This method is similar to ( of the SQL statement and needs to be used together with endWrap(). - * @returns {RdbPredicates} - the {@link RdbPredicates} with the left parenthesis. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - beginWrap(): RdbPredicates; - - /** - * Adds a right parenthesis to the RdbPredicates. - * - * @note This method is similar to ) of the SQL statement and needs to be used together - * with beginWrap(). - * @returns {RdbPredicates} - the {@link RdbPredicates} with the right parenthesis. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - endWrap(): RdbPredicates; - - /** - * Adds an or condition to the RdbPredicates. - * - * @note This method is similar to or of the SQL statement. - * @return Returns the {@link RdbPredicates} with the or condition. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - or(): RdbPredicates; - /** - * Adds an and condition to the RdbPredicates. - * - * @note This method is similar to or of the SQL statement. - * @return Returns the {@link RdbPredicates} with the or condition. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - and(): RdbPredicates; - - /** - * Configures the RdbPredicates to match the field whose data type is string and value - * contains a specified value. - * - * @note This method is similar to contains of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. - * @returns {RdbPredicates} - the {@link RdbPredicates} self. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - contains(field: string, value: string): RdbPredicates; - - /** - * Configures the RdbPredicates to match the field whose data type is string and value starts - * with a specified string. - * - * @note This method is similar to value% of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. - * @returns {RdbPredicates} - the {@link RdbPredicates} self. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - beginsWith(field: string, value: string): RdbPredicates; - - /** - * Configures the RdbPredicates to match the field whose data type is string and value - * ends with a specified string. - * - * @note This method is similar to %value of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. - * @returns {RdbPredicates} - the {@link RdbPredicates} self. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - endsWith(field: string, value: string): RdbPredicates; - - /** - * Configures the RdbPredicates to match the fields whose value is null. - * - * @note This method is similar to is null of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @returns {RdbPredicates} - the {@link RdbPredicates} self. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - isNull(field: string): RdbPredicates; - - /** - * Configures the RdbPredicates to match the specified fields whose value is not null. - * - * @note This method is similar to is not null of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @returns {RdbPredicates} - the {@link RdbPredicates} self. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - isNotNull(field: string): RdbPredicates; - - /** - * Configures the RdbPredicates to match the fields whose data type is string and value is - * similar to a specified string. - * - * @note This method is similar to like of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. - * @returns {RdbPredicates} - the {@link RdbPredicates} that match the specified field. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - like(field: string, value: string): RdbPredicates; - - /** - * Configures RdbPredicates to match the specified field whose data type is string and the value contains - * a wildcard. - * - * @note Different from like, the input parameters of this method are case-sensitive. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. - * @returns {RdbPredicates} - the SQL statement with the specified {@link RdbPredicates}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - glob(field: string, value: string): RdbPredicates; - - /** - * Configures RdbPredicates to match the specified field whose data type is string and the value contains - * a wildcard. - * - * @param {string} field - Indicates the column name. - * @param {ValueType} low - Indicates the minimum value. - * @param {ValueType} high - Indicates the maximum value. - * @returns {RdbPredicates} - the SQL statement with the specified {@link RdbPredicates}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - between(field: string, low: ValueType, high: ValueType): RdbPredicates; - - /** - * Configures RdbPredicates to match the specified field whose data type is int and value is - * out of a given range. - * - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} low - Indicates the minimum value. - * @param {ValueType} high - Indicates the maximum value to. - * @returns {RdbPredicates} - the SQL statement with the specified {@link RdbPredicates}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates; - - /** - * Restricts the value of the field to be greater than the specified value. - * - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. - * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - greaterThan(field: string, value: ValueType): RdbPredicates; - - /** - * Restricts the value of the field to be smaller than the specified value. - * - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. - * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - lessThan(field: string, value: ValueType): RdbPredicates; - - /** - * Restricts the value of the field to be greater than or equal to the specified value. - * - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. - * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates; - - /** - * Restricts the value of the field to be smaller than or equal to the specified value. - * - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. - * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates; - - /** - * Restricts the ascending order of the return list. When there are several orders, - * the one close to the head has the highest priority. - * - * @param {string} field - Indicates the column name for sorting the return list. - * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - orderByAsc(field: string): RdbPredicates; - - /** - * Restricts the descending order of the return list. When there are several orders, - * the one close to the head has the highest priority. - * - * @param {string} field - Indicates the column name for sorting the return list. - * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - orderByDesc(field: string): RdbPredicates; - - /** - * Restricts each row of the query result to be unique. - * - * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - distinct(): RdbPredicates; - - /** - * Restricts the max number of return records. - * - * @param {number} value - Indicates the max length of the return list. - * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - limitAs(value: number): RdbPredicates; - - /** - * Configures RdbPredicatesV9 to specify the start position of the returned result. - * - * @note Use this method together with limit(int). - * @param {number} rowOffset - Indicates the start position of the returned result. The value is a positive integer. - * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - offsetAs(rowOffset: number): RdbPredicates; - - /** - * Configures RdbPredicatesV9 to group query results by specified columns. - * - * @param {Array} fields - Indicates the specified columns by which query results are grouped. - * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - groupBy(fields: Array): RdbPredicates; - - /** - * Configures RdbPredicatesV9 to specify the index column. - * - * @note Before using this method, you need to create an index column. - * @param {string} field - Indicates the name of the index column. - * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - indexedBy(field: string): RdbPredicates; - - /** - * Configures RdbPredicatesV9 to match the specified field whose data type is ValueType array and values - * are within a given range. - * - * @param {string} field - Indicates the column name in the database table. - * @param {Array} value - Indicates the values to match with {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - in(field: string, value: Array): RdbPredicates; - - /** - * Configures RdbPredicatesV9 to match the specified field whose data type is ValueType array and values - * are out of a given range. - * - * @param {string} field - Indicates the column name in the database table. - * @param {Array} value - Indicates the values to match with {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 7 - * @deprecated since 9 - */ - notIn(field: string, value: Array): RdbPredicates; - } - /** - * Manages relational database configurations. + * Specify all remote devices which connect to local device when syncing distributed database. * - * @import import data_rdb from '@ohos.data.rdb'; + * @note When query database, this function should not be called. + * @returns {RdbPredicates} - the {@link RdbPredicates} self. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 8 + * @deprecated since 9 + */ + inAllDevices(): RdbPredicates; + + /** + * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is equal + * to a specified value. + * + * @note This method is similar to = of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. + * @returns {RdbPredicates} - the {@link RdbPredicates} self. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + equalTo(field: string, value: ValueType): RdbPredicates; + + /** + * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is unequal to + * a specified value. + * + * @note This method is similar to != of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. + * @returns {RdbPredicates} - the {@link RdbPredicates} self. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + notEqualTo(field: string, value: ValueType): RdbPredicates; + + /** + * Adds a left parenthesis to the RdbPredicates. + * + * @note This method is similar to ( of the SQL statement and needs to be used together with endWrap(). + * @returns {RdbPredicates} - the {@link RdbPredicates} with the left parenthesis. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + beginWrap(): RdbPredicates; + + /** + * Adds a right parenthesis to the RdbPredicates. + * + * @note This method is similar to ) of the SQL statement and needs to be used together + * with beginWrap(). + * @returns {RdbPredicates} - the {@link RdbPredicates} with the right parenthesis. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + endWrap(): RdbPredicates; + + /** + * Adds an or condition to the RdbPredicates. + * + * @note This method is similar to or of the SQL statement. + * @return Returns the {@link RdbPredicates} with the or condition. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + or (): RdbPredicates; + + /** + * Adds an and condition to the RdbPredicates. + * + * @note This method is similar to or of the SQL statement. + * @return Returns the {@link RdbPredicates} with the or condition. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + and(): RdbPredicates; + + /** + * Configures the RdbPredicates to match the field whose data type is string and value + * contains a specified value. + * + * @note This method is similar to contains of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. + * @returns {RdbPredicates} - the {@link RdbPredicates} self. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + contains(field: string, value: string): RdbPredicates; + + /** + * Configures the RdbPredicates to match the field whose data type is string and value starts + * with a specified string. + * + * @note This method is similar to value% of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. + * @returns {RdbPredicates} - the {@link RdbPredicates} self. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + beginsWith(field: string, value: string): RdbPredicates; + + /** + * Configures the RdbPredicates to match the field whose data type is string and value + * ends with a specified string. + * + * @note This method is similar to %value of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. + * @returns {RdbPredicates} - the {@link RdbPredicates} self. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + endsWith(field: string, value: string): RdbPredicates; + + /** + * Configures the RdbPredicates to match the fields whose value is null. + * + * @note This method is similar to is null of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @returns {RdbPredicates} - the {@link RdbPredicates} self. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + isNull(field: string): RdbPredicates; + + /** + * Configures the RdbPredicates to match the specified fields whose value is not null. + * + * @note This method is similar to is not null of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @returns {RdbPredicates} - the {@link RdbPredicates} self. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + isNotNull(field: string): RdbPredicates; + + /** + * Configures the RdbPredicates to match the fields whose data type is string and value is + * similar to a specified string. + * + * @note This method is similar to like of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. + * @returns {RdbPredicates} - the {@link RdbPredicates} that match the specified field. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + like(field: string, value: string): RdbPredicates; + + /** + * Configures RdbPredicates to match the specified field whose data type is string and the value contains + * a wildcard. + * + * @note Different from like, the input parameters of this method are case-sensitive. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. + * @returns {RdbPredicates} - the SQL statement with the specified {@link RdbPredicates}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + glob(field: string, value: string): RdbPredicates; + + /** + * Configures RdbPredicates to match the specified field whose data type is string and the value contains + * a wildcard. + * + * @param {string} field - Indicates the column name. + * @param {ValueType} low - Indicates the minimum value. + * @param {ValueType} high - Indicates the maximum value. + * @returns {RdbPredicates} - the SQL statement with the specified {@link RdbPredicates}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + between(field: string, low: ValueType, high: ValueType): RdbPredicates; + + /** + * Configures RdbPredicates to match the specified field whose data type is int and value is + * out of a given range. + * + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} low - Indicates the minimum value. + * @param {ValueType} high - Indicates the maximum value to. + * @returns {RdbPredicates} - the SQL statement with the specified {@link RdbPredicates}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates; + + /** + * Restricts the value of the field to be greater than the specified value. + * + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. + * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + greaterThan(field: string, value: ValueType): RdbPredicates; + + /** + * Restricts the value of the field to be smaller than the specified value. + * + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. + * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + lessThan(field: string, value: ValueType): RdbPredicates; + + /** + * Restricts the value of the field to be greater than or equal to the specified value. + * + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. + * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates; + + /** + * Restricts the value of the field to be smaller than or equal to the specified value. + * + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicates}. + * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates; + + /** + * Restricts the ascending order of the return list. When there are several orders, + * the one close to the head has the highest priority. + * + * @param {string} field - Indicates the column name for sorting the return list. + * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + orderByAsc(field: string): RdbPredicates; + + /** + * Restricts the descending order of the return list. When there are several orders, + * the one close to the head has the highest priority. + * + * @param {string} field - Indicates the column name for sorting the return list. + * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + orderByDesc(field: string): RdbPredicates; + + /** + * Restricts each row of the query result to be unique. + * + * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + distinct(): RdbPredicates; + + /** + * Restricts the max number of return records. + * + * @param {number} value - Indicates the max length of the return list. + * @returns {RdbPredicates} - the SQL query statement with the specified {@link RdbPredicates}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + limitAs(value: number): RdbPredicates; + + /** + * Configures RdbPredicatesV9 to specify the start position of the returned result. + * + * @note Use this method together with limit(int). + * @param {number} rowOffset - Indicates the start position of the returned result. The value is a positive integer. + * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + offsetAs(rowOffset: number): RdbPredicates; + + /** + * Configures RdbPredicatesV9 to group query results by specified columns. + * + * @param {Array} fields - Indicates the specified columns by which query results are grouped. + * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + groupBy(fields: Array): RdbPredicates; + + /** + * Configures RdbPredicatesV9 to specify the index column. + * + * @note Before using this method, you need to create an index column. + * @param {string} field - Indicates the name of the index column. + * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + indexedBy(field: string): RdbPredicates; + + /** + * Configures RdbPredicatesV9 to match the specified field whose data type is ValueType array and values + * are within a given range. + * + * @param {string} field - Indicates the column name in the database table. + * @param {Array} value - Indicates the values to match with {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + in(field: string, value: Array): RdbPredicates; + + /** + * Configures RdbPredicatesV9 to match the specified field whose data type is ValueType array and values + * are out of a given range. + * + * @param {string} field - Indicates the column name in the database table. + * @param {Array} value - Indicates the values to match with {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 7 + * @deprecated since 9 + */ + notIn(field: string, value: Array): RdbPredicates; +} + +/** + * Manages relational database configurations. + * + * @import import data_rdb from '@ohos.data.rdb'; + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ +class RdbPredicatesV9 { + /** + * A parameterized constructor used to create an RdbPredicates instance. + * + * @param {string} name - Indicates the table name of the database. + * @throws {BusinessError} 401 - if the parameter type is incorrect. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ - class RdbPredicatesV9 { - /** - * A parameterized constructor used to create an RdbPredicates instance. - * - * @param {string} name - Indicates the table name of the database. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - constructor(name: string) + constructor(name: string) - /** - * Sync data between devices. - * - * @note When query database, this function should not be called. - * @param {Array} devices - Indicates specified remote devices. - * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - inDevices(devices: Array): RdbPredicatesV9; + /** + * Sync data between devices. + * + * @note When query database, this function should not be called. + * @param {Array} devices - Indicates specified remote devices. + * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + inDevices(devices: Array): RdbPredicatesV9; - /** - * Specify all remote devices which connect to local device when syncing distributed database. - * - * @note When query database, this function should not be called. - * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - inAllDevices(): RdbPredicatesV9; + /** + * Specify all remote devices which connect to local device when syncing distributed database. + * + * @note When query database, this function should not be called. + * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + inAllDevices(): RdbPredicatesV9; - /** - * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is equal - * to a specified value. - * - * @note This method is similar to = of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - equalTo(field: string, value: ValueType): RdbPredicatesV9; + /** + * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is equal + * to a specified value. + * + * @note This method is similar to = of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + equalTo(field: string, value: ValueType): RdbPredicatesV9; - /** - * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is unequal to - * a specified value. - * - * @note This method is similar to != of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - notEqualTo(field: string, value: ValueType): RdbPredicatesV9; + /** + * Configures the RdbPredicatesV9 to match the field whose data type is ValueType and value is unequal to + * a specified value. + * + * @note This method is similar to != of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + notEqualTo(field: string, value: ValueType): RdbPredicatesV9; - /** - * Adds a left parenthesis to the RdbPredicatesV9. - * - * @note This method is similar to ( of the SQL statement and needs to be used together with endWrap(). - * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} with the left parenthesis. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - beginWrap(): RdbPredicatesV9; + /** + * Adds a left parenthesis to the RdbPredicatesV9. + * + * @note This method is similar to ( of the SQL statement and needs to be used together with endWrap(). + * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} with the left parenthesis. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + beginWrap(): RdbPredicatesV9; - /** - * Adds a right parenthesis to the RdbPredicatesV9. - * - * @note This method is similar to ) of the SQL statement and needs to be used together - * with beginWrap(). - * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} with the right parenthesis. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - endWrap(): RdbPredicatesV9; + /** + * Adds a right parenthesis to the RdbPredicatesV9. + * + * @note This method is similar to ) of the SQL statement and needs to be used together + * with beginWrap(). + * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} with the right parenthesis. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + endWrap(): RdbPredicatesV9; - /** - * Adds an or condition to the RdbPredicatesV9. - * - * @note This method is similar to or of the SQL statement. - * @return Returns the {@link RdbPredicatesV9} with the or condition. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - or(): RdbPredicatesV9; + /** + * Adds an or condition to the RdbPredicatesV9. + * + * @note This method is similar to or of the SQL statement. + * @return Returns the {@link RdbPredicatesV9} with the or condition. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + or (): RdbPredicatesV9; - /** - * Adds an and condition to the RdbPredicatesV9. - * - * @note This method is similar to or of the SQL statement. - * @return Returns the {@link RdbPredicatesV9} with the or condition. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - and(): RdbPredicatesV9; + /** + * Adds an and condition to the RdbPredicatesV9. + * + * @note This method is similar to or of the SQL statement. + * @return Returns the {@link RdbPredicatesV9} with the or condition. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + and(): RdbPredicatesV9; - /** - * Configures the RdbPredicatesV9 to match the field whose data type is string and value - * contains a specified value. - * - * @note This method is similar to contains of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - contains(field: string, value: string): RdbPredicatesV9; + /** + * Configures the RdbPredicatesV9 to match the field whose data type is string and value + * contains a specified value. + * + * @note This method is similar to contains of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + contains(field: string, value: string): RdbPredicatesV9; - /** - * Configures the RdbPredicatesV9 to match the field whose data type is string and value starts - * with a specified string. - * - * @note This method is similar to value% of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - beginsWith(field: string, value: string): RdbPredicatesV9; + /** + * Configures the RdbPredicatesV9 to match the field whose data type is string and value starts + * with a specified string. + * + * @note This method is similar to value% of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + beginsWith(field: string, value: string): RdbPredicatesV9; - /** - * Configures the RdbPredicatesV9 to match the field whose data type is string and value - * ends with a specified string. - * - * @note This method is similar to %value of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - endsWith(field: string, value: string): RdbPredicatesV9; - - /** - * Configures the RdbPredicatesV9 to match the fields whose value is null. - * - * @note This method is similar to is null of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - isNull(field: string): RdbPredicatesV9; + /** + * Configures the RdbPredicatesV9 to match the field whose data type is string and value + * ends with a specified string. + * + * @note This method is similar to %value of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + endsWith(field: string, value: string): RdbPredicatesV9; - /** - * Configures the RdbPredicatesV9 to match the specified fields whose value is not null. - * - * @note This method is similar to is not null of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - isNotNull(field: string): RdbPredicatesV9; + /** + * Configures the RdbPredicatesV9 to match the fields whose value is null. + * + * @note This method is similar to is null of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + isNull(field: string): RdbPredicatesV9; - /** - * Configures the RdbPredicatesV9 to match the fields whose data type is string and value is - * similar to a specified string. - * - * @note This method is similar to like of the SQL statement. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} that match the specified field. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - like(field: string, value: string): RdbPredicatesV9; + /** + * Configures the RdbPredicatesV9 to match the specified fields whose value is not null. + * + * @note This method is similar to is not null of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} self. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + isNotNull(field: string): RdbPredicatesV9; - /** - * Configures RdbPredicatesV9 to match the specified field whose data type is string and the value contains - * a wildcard. - * - * @note Different from like, the input parameters of this method are case-sensitive. - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - glob(field: string, value: string): RdbPredicatesV9; + /** + * Configures the RdbPredicatesV9 to match the fields whose data type is string and value is + * similar to a specified string. + * + * @note This method is similar to like of the SQL statement. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the {@link RdbPredicatesV9} that match the specified field. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + like(field: string, value: string): RdbPredicatesV9; - /** - * Configures RdbPredicatesV9 to match the specified field whose data type is string and the value contains - * a wildcard. - * - * @param {string} field - Indicates the column name. - * @param {ValueType} low - Indicates the minimum value. - * @param {ValueType} high - Indicates the maximum value. - * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - between(field: string, low: ValueType, high: ValueType): RdbPredicatesV9; + /** + * Configures RdbPredicatesV9 to match the specified field whose data type is string and the value contains + * a wildcard. + * + * @note Different from like, the input parameters of this method are case-sensitive. + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + glob(field: string, value: string): RdbPredicatesV9; - /** - * Configures RdbPredicatesV9 to match the specified field whose data type is int and value is - * out of a given range. - * - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} low - Indicates the minimum value. - * @param {ValueType} high - Indicates the maximum value to. - * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - notBetween(field: string, low: ValueType, high: ValueType): RdbPredicatesV9; + /** + * Configures RdbPredicatesV9 to match the specified field whose data type is string and the value contains + * a wildcard. + * + * @param {string} field - Indicates the column name. + * @param {ValueType} low - Indicates the minimum value. + * @param {ValueType} high - Indicates the maximum value. + * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + between(field: string, low: ValueType, high: ValueType): RdbPredicatesV9; - /** - * Restricts the value of the field to be greater than the specified value. - * - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - greaterThan(field: string, value: ValueType): RdbPredicatesV9; + /** + * Configures RdbPredicatesV9 to match the specified field whose data type is int and value is + * out of a given range. + * + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} low - Indicates the minimum value. + * @param {ValueType} high - Indicates the maximum value to. + * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + notBetween(field: string, low: ValueType, high: ValueType): RdbPredicatesV9; + /** + * Restricts the value of the field to be greater than the specified value. + * + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + greaterThan(field: string, value: ValueType): RdbPredicatesV9; - /** - * Restricts the value of the field to be smaller than the specified value. - * - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - lessThan(field: string, value: ValueType): RdbPredicatesV9; + /** + * Restricts the value of the field to be smaller than the specified value. + * + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + lessThan(field: string, value: ValueType): RdbPredicatesV9; - /** - * Restricts the value of the field to be greater than or equal to the specified value. - * - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicatesV9; + /** + * Restricts the value of the field to be greater than or equal to the specified value. + * + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicatesV9; - /** - * Restricts the value of the field to be smaller than or equal to the specified value. - * - * @param {string} field - Indicates the column name in the database table. - * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - lessThanOrEqualTo(field: string, value: ValueType): RdbPredicatesV9; + /** + * Restricts the value of the field to be smaller than or equal to the specified value. + * + * @param {string} field - Indicates the column name in the database table. + * @param {ValueType} value - Indicates the value to match with the {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + lessThanOrEqualTo(field: string, value: ValueType): RdbPredicatesV9; - /** - * Restricts the ascending order of the return list. When there are several orders, - * the one close to the head has the highest priority. - * - * @param {string} field - Indicates the column name for sorting the return list. - * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - orderByAsc(field: string): RdbPredicatesV9; + /** + * Restricts the ascending order of the return list. When there are several orders, + * the one close to the head has the highest priority. + * + * @param {string} field - Indicates the column name for sorting the return list. + * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + orderByAsc(field: string): RdbPredicatesV9; - /** - * Restricts the descending order of the return list. When there are several orders, - * the one close to the head has the highest priority. - * - * @param {string} field - Indicates the column name for sorting the return list. - * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - orderByDesc(field: string): RdbPredicatesV9; + /** + * Restricts the descending order of the return list. When there are several orders, + * the one close to the head has the highest priority. + * + * @param {string} field - Indicates the column name for sorting the return list. + * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + orderByDesc(field: string): RdbPredicatesV9; - /** - * Restricts each row of the query result to be unique. - * - * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - distinct(): RdbPredicatesV9; + /** + * Restricts each row of the query result to be unique. + * + * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + distinct(): RdbPredicatesV9; - /** - * Restricts the max number of return records. - * - * @param {number} value - Indicates the max length of the return list. - * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - limitAs(value: number): RdbPredicatesV9; + /** + * Restricts the max number of return records. + * + * @param {number} value - Indicates the max length of the return list. + * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + limitAs(value: number): RdbPredicatesV9; - /** - * Configures RdbPredicatesV9 to specify the start position of the returned result. - * - * @note Use this method together with limit(int). - * @param {number} rowOffset - Indicates the start position of the returned result. The value is a positive integer. - * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - offsetAs(rowOffset: number): RdbPredicatesV9; + /** + * Configures RdbPredicatesV9 to specify the start position of the returned result. + * + * @note Use this method together with limit(int). + * @param {number} rowOffset - Indicates the start position of the returned result. The value is a positive integer. + * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + offsetAs(rowOffset: number): RdbPredicatesV9; - /** - * Configures RdbPredicatesV9 to group query results by specified columns. - * - * @param {Array} fields - Indicates the specified columns by which query results are grouped. - * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - groupBy(fields: Array): RdbPredicatesV9; + /** + * Configures RdbPredicatesV9 to group query results by specified columns. + * + * @param {Array} fields - Indicates the specified columns by which query results are grouped. + * @returns {RdbPredicatesV9} - the SQL query statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + groupBy(fields: Array): RdbPredicatesV9; - /** - * Configures RdbPredicatesV9 to specify the index column. - * - * @note Before using this method, you need to create an index column. - * @param {string} field - Indicates the name of the index column. - * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - indexedBy(field: string): RdbPredicatesV9; + /** + * Configures RdbPredicatesV9 to specify the index column. + * + * @note Before using this method, you need to create an index column. + * @param {string} field - Indicates the name of the index column. + * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + indexedBy(field: string): RdbPredicatesV9; - /** - * Configures RdbPredicatesV9 to match the specified field whose data type is ValueType array and values - * are within a given range. - * - * @param {string} field - Indicates the column name in the database table. - * @param {Array} value - Indicates the values to match with {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - in(field: string, value: Array): RdbPredicatesV9; + /** + * Configures RdbPredicatesV9 to match the specified field whose data type is ValueType array and values + * are within a given range. + * + * @param {string} field - Indicates the column name in the database table. + * @param {Array} value - Indicates the values to match with {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + in(field: string, value: Array): RdbPredicatesV9; - /** - * Configures RdbPredicatesV9 to match the specified field whose data type is ValueType array and values - * are out of a given range. - * - * @param {string} field - Indicates the column name in the database table. - * @param {Array} value - Indicates the values to match with {@link RdbPredicatesV9}. - * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. - * @throws {BusinessError} 401 - if the parameter type is incorrect. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - notIn(field: string, value: Array): RdbPredicatesV9; - } + /** + * Configures RdbPredicatesV9 to match the specified field whose data type is ValueType array and values + * are out of a given range. + * + * @param {string} field - Indicates the column name in the database table. + * @param {Array} value - Indicates the values to match with {@link RdbPredicatesV9}. + * @returns {RdbPredicatesV9} - the SQL statement with the specified {@link RdbPredicatesV9}. + * @throws {BusinessError} 401 - if the parameter type is incorrect. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + notIn(field: string, value: Array): RdbPredicatesV9; +} - export type ResultSet = _ResultSet - export type ResultSetV9 = _ResultSetV9 +export type ResultSet = _ResultSet; +export type ResultSetV9 = _ResultSetV9; } export default rdb;