From af24e606b45e5917fdf093e4948a53bee38953e0 Mon Sep 17 00:00:00 2001 From: guochao Date: Wed, 10 Sep 2025 14:23:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=96=87=E6=A1=A3=E4=B8=8Esdk=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E6=80=A7=20Signed-off-by:=20guochao=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@ohos.data.relationalStore.d.ts | 104 ++++++++++++++-------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/api/@ohos.data.relationalStore.d.ts b/api/@ohos.data.relationalStore.d.ts index bcfb9d97c0..3f06c8e9fd 100644 --- a/api/@ohos.data.relationalStore.d.ts +++ b/api/@ohos.data.relationalStore.d.ts @@ -266,11 +266,11 @@ declare namespace relationalStore { /** * The type of the priority key can be number or string * - * @typedef { long | string } PRIKeyType + * @typedef { number | string } PRIKeyType * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ - type PRIKeyType = long | string; + type PRIKeyType = number | string; /** * The time is in UTC format. @@ -1164,12 +1164,12 @@ declare namespace relationalStore { /** * Total time used for executing the SQL statements, in μs. * - * @type { long } + * @type { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 */ - totalTime: long; + totalTime: number; /** * Maximum time allowed to obtain the SQL file handle, in μs. @@ -1181,12 +1181,12 @@ declare namespace relationalStore { /** * Maximum time allowed to obtain the SQL file handle, in μs. * - * @type { long } + * @type { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 */ - waitTime: long; + waitTime: number; /** * Time used to prepare SQL and args, in μs. @@ -1198,12 +1198,12 @@ declare namespace relationalStore { /** * Time used to prepare SQL and args, in μs. * - * @type { long } + * @type { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 */ - prepareTime: long; + prepareTime: number; /** * Time used to execute the SQL statements, in μs. @@ -1215,12 +1215,12 @@ declare namespace relationalStore { /** * Time used to execute the SQL statements, in μs. * - * @type { long } + * @type { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 */ - executeTime: long; + executeTime: number; } /** @@ -1235,12 +1235,12 @@ declare namespace relationalStore { /** * Error code returned by SQLite, see {@link https://www.sqlite.org/rescode.html}. * - * @type { int } + * @type { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 */ - code: int; + code: number; /** * Error message. @@ -1351,7 +1351,7 @@ declare namespace relationalStore { /** * Indicates the database synchronization mode. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -1400,7 +1400,7 @@ declare namespace relationalStore { /** * Describes the subscription type. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -1455,7 +1455,7 @@ declare namespace relationalStore { /** * Describes the change type. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ @@ -1521,31 +1521,31 @@ declare namespace relationalStore { * Indicates if there is a string primary key, the inserted will keep data's primary keys * otherwise it will keep the data's rowid. * - * @type { Array | Array } + * @type { Array | Array } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ - inserted: Array | Array; + inserted: Array | Array; /** * Indicates if there is a string primary key, the updated will keep data's primary keys * otherwise it will keep the data's rowid. * - * @type { Array | Array } + * @type { Array | Array } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ - updated: Array | Array; + updated: Array | Array; /** * Indicates if there is a string primary key, the deleted will keep data's primary keys * otherwise it will keep the data's rowid. * - * @type { Array | Array } + * @type { Array | Array } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ - deleted: Array | Array; + deleted: Array | Array; } /** @@ -2038,7 +2038,7 @@ declare namespace relationalStore { /** * Enumerates the data types of a column. * - * @enum { int } + * @enum { number } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 18 @@ -3322,7 +3322,7 @@ declare namespace relationalStore { * Obtains the column data type based on the specified column index. * The column index is passed as an input parameter. * - * @param { int | string } columnIdentifier - Index or name of the column. + * @param { number | string } columnIdentifier - Index or name of the column. * @returns { Promise } Promise used to return the data type obtained, * in an {@link ColumnType} instance. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -3352,7 +3352,7 @@ declare namespace relationalStore { * @crossplatform * @since 18 */ - getColumnType(columnIdentifier: int | string): Promise; + getColumnType(columnIdentifier: number | string): Promise; /** * Obtains the column data type based on the specified column index. This API returns the result synchronously. @@ -3386,7 +3386,7 @@ declare namespace relationalStore { * @crossplatform * @since 18 */ - getColumnTypeSync(columnIdentifier: int | string): ColumnType; + getColumnTypeSync(columnIdentifier: number | string): ColumnType; /** * Go to the specified row of the result set forwards or backwards by an offset relative to its current position. @@ -4324,8 +4324,8 @@ declare namespace relationalStore { /** * Obtains the values of all columns in the specified rows. - * @param { int } maxCount - Indicates the maximum number of rows. - * @param { int } [position] - Indicates the start position to obtain the values. + * @param { number } maxCount - Indicates the maximum number of rows. + * @param { number } [position] - Indicates the start position to obtain the values. * @returns { Promise> } Promise used to return the values obtained, * in an {@link Array}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -4351,7 +4351,7 @@ declare namespace relationalStore { * @crossplatform * @since 18 */ - getRows(maxCount: int, position?: int): Promise>; + getRows(maxCount: number, position?: number): Promise>; /** * Obtains the values of all columns in the specified row. @@ -5019,7 +5019,7 @@ declare namespace relationalStore { * @param { Array } values - * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { Promise } The number of values that were inserted if the operation is successful. + * @returns { Promise } The number of values that were inserted if the operation is successful. * returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. @@ -5047,7 +5047,7 @@ declare namespace relationalStore { * @crossplatform * @since 18 */ - batchInsertWithConflictResolution(table: string, values: Array, conflict: ConflictResolution): Promise; + batchInsertWithConflictResolution(table: string, values: Array, conflict: ConflictResolution): Promise; /** * Inserts a batch of data into the target table. @@ -5056,7 +5056,7 @@ declare namespace relationalStore { * @param { Array } values - * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { long } The number of values that were inserted if the operation is successful. returns -1 otherwise. + * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 14800000 - Inner error. @@ -5083,7 +5083,7 @@ declare namespace relationalStore { * @crossplatform * @since 18 */ - batchInsertWithConflictResolutionSync(table: string, values: Array, conflict: ConflictResolution): long; + batchInsertWithConflictResolutionSync(table: string, values: Array, conflict: ConflictResolution): number; /** * Updates data in the database based on a specified instance object of RdbPredicates. @@ -6486,7 +6486,7 @@ declare namespace relationalStore { * otherwise clean all. * * @param { string } table - Indicates the name of the table to check. - * @param { long } [cursor] - Indicates the cursor. + * @param { number } [cursor] - Indicates the cursor. * @returns { Promise } -The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. @@ -6514,7 +6514,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @since 12 */ - cleanDirtyData(table: string, cursor?: long): Promise; + cleanDirtyData(table: string, cursor?: number): Promise; /** * Obtains sharing resource of rows corresponding to the predicates. @@ -7742,8 +7742,8 @@ declare namespace relationalStore { * @param { SyncMode } mode - Indicates the database synchronization mode. * @param { RdbPredicates } predicates - * The specified sync condition by the instance object of {@link RdbPredicates}. - * @returns { Promise> } - * {Array<[string, int]>}: devices sync status array, {string}: device id, {number}: device sync status. + * @returns { Promise> } + * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 801 - Capability not supported. @@ -7752,7 +7752,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 12 */ - sync(mode: SyncMode, predicates: RdbPredicates): Promise>; + sync(mode: SyncMode, predicates: RdbPredicates): Promise>; /** * Sync data to cloud. @@ -8481,8 +8481,8 @@ declare namespace relationalStore { * * @param { string } fullPath - Indicates the path of the database file to attach. * @param { string } attachName - Indicates the alias of the database. - * @param { long } waitTime - Indicates the maximum time allowed for attaching the database file. - * @returns { Promise } Promise used to return the number of attached databases. + * @param { number } waitTime - Indicates the maximum time allowed for attaching the database file. + * @returns { Promise } Promise used to return the number of attached databases. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 801 - Capability not supported. @@ -8510,7 +8510,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 12 */ - attach(fullPath: string, attachName: string, waitTime?: long) : Promise; + attach(fullPath: string, attachName: string, waitTime?: number) : Promise; /** * Attaches a database file to the currently linked database. @@ -8519,8 +8519,8 @@ declare namespace relationalStore { * @param { StoreConfig } config - * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. * @param { string } attachName - Indicates the alias of the database. - * @param { long } waitTime - Indicates the maximum time allowed for attaching the database file. - * @returns { Promise } Promise used to return the number of attached databases. + * @param { number } waitTime - Indicates the maximum time allowed for attaching the database file. + * @returns { Promise } Promise used to return the number of attached databases. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 801 - Capability not supported. @@ -8550,14 +8550,14 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 12 */ - attach(context: Context, config: StoreConfig, attachName: string, waitTime?: long) : Promise; + attach(context: Context, config: StoreConfig, attachName: string, waitTime?: number) : Promise; /** * Detaches a database from this database. * * @param { string } attachName - Indicates the alias of the database. - * @param { long } waitTime - Indicates the maximum time allowed for detaching the database. - * @returns { Promise } Return the current number of attached databases. + * @param { number } waitTime - Indicates the maximum time allowed for detaching the database. + * @returns { Promise } Return the current number of attached databases. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 14800000 - Inner error. @@ -8582,7 +8582,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 12 */ - detach(attachName: string, waitTime?: long) : Promise; + detach(attachName: string, waitTime?: number) : Promise; /** * Locks data from the database based on a specified instance object of RdbPredicates. @@ -8689,14 +8689,14 @@ declare namespace relationalStore { /** * Lock cloud container before non-auto cloud sync. * - * @returns { Promise } The expired time of the lock. + * @returns { Promise } The expired time of the lock. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @systemapi * @since 12 */ - lockCloudContainer(): Promise; + lockCloudContainer(): Promise; /** * Unlock cloud container. @@ -8972,7 +8972,7 @@ declare namespace relationalStore { * @param { Array } values - * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { Promise } The number of values that were inserted if the operation is successful. + * @returns { Promise } The number of values that were inserted if the operation is successful. * returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. @@ -8998,7 +8998,7 @@ declare namespace relationalStore { * @crossplatform * @since 18 */ - batchInsertWithConflictResolution(table: string, values: Array, conflict: ConflictResolution): Promise; + batchInsertWithConflictResolution(table: string, values: Array, conflict: ConflictResolution): Promise; /** * Inserts a batch of data into the target table. @@ -9007,7 +9007,7 @@ declare namespace relationalStore { * @param { Array } values - * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { long } The number of values that were inserted if the operation is successful. returns -1 otherwise. + * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 14800000 - Inner error. @@ -9032,7 +9032,7 @@ declare namespace relationalStore { * @crossplatform * @since 18 */ - batchInsertWithConflictResolutionSync(table: string, values: Array, conflict: ConflictResolution): long; + batchInsertWithConflictResolutionSync(table: string, values: Array, conflict: ConflictResolution): number; /** * Updates data in the database based on a specified instance object of RdbPredicates. -- Gitee