From a4beafe732df5adf40b1d6d173db7e67469b45e9 Mon Sep 17 00:00:00 2001 From: BrainL Date: Mon, 16 Jun 2025 11:54:18 +0800 Subject: [PATCH] =?UTF-8?q?arkui=20=E8=B7=A8=E5=B9=B3=E5=8F=B0=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: BrainL --- api/@ohos.data.preferences.d.ts | 3998 ++--- api/@ohos.data.relationalStore.d.ts | 18409 ++++++++++---------- api/@ohos.data.uniformTypeDescriptor.d.ts | 4089 ++--- api/@ohos.request.d.ts | 25 +- 4 files changed, 13296 insertions(+), 13225 deletions(-) diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index 686904d792..b7af8420c0 100644 --- a/api/@ohos.data.preferences.d.ts +++ b/api/@ohos.data.preferences.d.ts @@ -1,1998 +1,2000 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkData - */ - -import { AsyncCallback, Callback } from './@ohos.base'; -import Context from './application/BaseContext'; - -/** - * Provides interfaces to obtain and modify preferences data. - * - * @namespace preferences - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - * @name preferences - */ -/** - * Provides interfaces to obtain and modify preferences data. - * - * @namespace preferences - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - * @name preferences - */ -/** - * Provides interfaces to obtain and modify preferences data. - * - * @namespace preferences - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - * @name preferences - */ -declare namespace preferences { - /** - * Indicates possible value types - * - * @typedef {number | string | boolean | Array | Array | Array} - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Indicates possible value types - * - * @typedef {number | string | boolean | Array | Array | Array} - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 10 - */ - /** - * Indicates possible value types - * - * @typedef {number | string | boolean | Array | Array | Array | Uint8Array} - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @atomicservice - * @since 11 - */ - /** - * Indicates possible value types - * - * @typedef {number | string | boolean | Array | Array | Array | Uint8Array | object | - * bigint} - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - type ValueType = number | string | boolean | Array | Array | Array | Uint8Array | object | bigint; - - /** - * Indicates the maximum length of a key (80 characters). - * - * @constant - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Indicates the maximum length of a key (80 characters). - * - * @constant - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Indicates the maximum length of a key (80 characters). - * - * @constant - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Maximum length of a key. - * - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since 12 - */ - const MAX_KEY_LENGTH: number; - - /** - * Indicates the maximum length of a string (8192 characters). - * - * @constant - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Indicates the maximum length of a string (8192 characters). - * - * @constant - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Indicates the maximum length of a string (8192 characters). - * - * @constant - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Maximum length of a value. - * - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since 12 - */ - const MAX_VALUE_LENGTH: number; - - /** - * the storage type - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @atomicservice - * @since 18 - */ - enum StorageType { - /** - * XML storage type - * - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @atomicservice - * @since 18 - */ - XML = 0, - - /** - * GSKV storage type - * - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @atomicservice - * @since 18 - */ - GSKV - } - - /** - * Manages preferences file configurations. - * - * @interface Options - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Manages preferences file configurations. - * - * @interface Options - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - interface Options { - /** - * The preferences file name. - * - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * The preferences file name. - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - name: string; - - /** - * Application Group Id. - * - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @StageModelOnly - * @since 10 - */ - /** - * Application Group Id. - * - * @type { ?(string | null | undefined) } - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @StageModelOnly - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - dataGroupId?: string | null | undefined; - - /** - * The preferences storage type. - * - * @type { ?(StorageType | null | undefined) } - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @atomicservice - * @since 18 - */ - storageType?: StorageType | null | undefined; - } - - /** - * Obtains a {@link Preferences} instance matching a specified preferences file name. - *

The {@link references} instance loads all data of the preferences file and - * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @param { AsyncCallback } callback - The {@link Preferences} instance matching the specified - * preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Obtains a {@link Preferences} instance matching a specified preferences file name. - *

The {@link references} instance loads all data of the preferences file and - * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @param { AsyncCallback } callback - The {@link Preferences} instance matching the specified - * preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains a {@link Preferences} instance matching a specified preferences file name. - *

The {@link references} instance loads all data of the preferences file and - * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @param { AsyncCallback } callback - The {@link Preferences} instance matching the specified - * preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function getPreferences(context: Context, name: string, callback: AsyncCallback): void; - - /** - * Obtains a {@link Preferences} instance matching a specified preferences file name. - *

The {@link references} instance loads all data of the preferences file and - * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @param { AsyncCallback } callback - The {@link Preferences} instance matching the specified - * preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains a {@link Preferences} instance matching a specified preferences file name. - *

The {@link references} instance loads all data of the preferences file and - * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @param { AsyncCallback } callback - The {@link Preferences} instance matching the specified - * preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15500000 - Inner error. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function getPreferences(context: Context, options: Options, callback: AsyncCallback): void; - - /** - * Obtains a {@link Preferences} instance matching a specified preferences file name. - *

The {@link references} instance loads all data of the preferences file and - * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @returns { Promise } The {@link Preferences} instance matching the specified preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Obtains a {@link Preferences} instance matching a specified preferences file name. - *

The {@link references} instance loads all data of the preferences file and - * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @returns { Promise } The {@link Preferences} instance matching the specified preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains a {@link Preferences} instance matching a specified preferences file name. - *

The {@link references} instance loads all data of the preferences file and - * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @returns { Promise } The {@link Preferences} instance matching the specified preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function getPreferences(context: Context, name: string): Promise; - - /** - * Obtains a {@link Preferences} instance matching a specified preferences file name. - *

The {@link references} instance loads all data of the preferences file and - * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @returns { Promise } The {@link Preferences} instance matching the specified preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains a {@link Preferences} instance matching a specified preferences file name. - *

The {@link references} instance loads all data of the preferences file and - * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @returns { Promise } The {@link Preferences} instance matching the specified preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15500000 - Inner error. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function getPreferences(context: Context, options: Options): Promise; - - /** - * Obtains a {@link Preferences} instance matching a specified preferences file name. - * This interface is executed synchronously. - *

The {@link references} instance loads all data of the preferences file and - * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @returns { Preferences } The {@link Preferences} instance matching the specified preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains a {@link Preferences} instance matching a specified preferences file name. - * This interface is executed synchronously. - *

The {@link references} instance loads all data of the preferences file and - * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @returns { Preferences } The {@link Preferences} instance matching the specified preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15500000 - Inner error. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function getPreferencesSync(context: Context, options: Options): Preferences; - - /** - * check the {@link StorageType} type is supported or not on current system. - * @param { StorageType } type - Indicates storage type which want to check. - * @returns { boolean } a boolean value indicates this system support the type or not. - * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @atomicservice - * @since 18 - */ - function isStorageTypeSupported(type: StorageType): boolean; - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache which is performed by removePreferencesFromCache and deletes the - * preferences file. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache which is performed by removePreferencesFromCache and deletes the - * preferences file. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache which is performed by removePreferencesFromCache and deletes the - * preferences file. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function deletePreferences(context: Context, name: string, callback: AsyncCallback): void; - - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache which is performed by removePreferencesFromCache and deletes the - * preferences file. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache which is performed by removePreferencesFromCache and deletes the - * preferences file. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15500000 - Inner error. - * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function deletePreferences(context: Context, options: Options, callback: AsyncCallback): void; - - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache which is performed by removePreferencesFromCache and deletes the - * preferences file. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache which is performed by removePreferencesFromCache and deletes the - * preferences file. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache which is performed by removePreferencesFromCache and deletes the - * preferences file. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function deletePreferences(context: Context, name: string): Promise; - - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache which is performed by removePreferencesFromCache and deletes the - * preferences file. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache which is performed by removePreferencesFromCache and deletes the - * preferences file. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15500000 - Inner error. - * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function deletePreferences(context: Context, options: Options): Promise; - - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback): void; - - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15500000 - Inner error. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function removePreferencesFromCache(context: Context, options: Options, callback: AsyncCallback): void; - - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function removePreferencesFromCache(context: Context, name: string): Promise; - - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15500000 - Inner error. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function removePreferencesFromCache(context: Context, options: Options): Promise; - - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. This interface is executed synchronously. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. This interface is executed synchronously. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the preferences file name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function removePreferencesFromCacheSync(context: Context, name: string): void; - - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. This interface is executed synchronously. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes a {@link Preferences} instance matching a specified preferences file name - * from the cache. This interface is executed synchronously. - *

When deleting the {@link Preferences} instance, you must release all references - * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency - * will occur. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { Options } options - Indicates the {@link Options} option of preferences file position. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 15500000 - Inner error. - * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. - * @throws { BusinessError } 15501002 - Invalid dataGroupId. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function removePreferencesFromCacheSync(context: Context, options: Options): void; - - /** - * Provides interfaces to obtain and modify preferences data. - *

The preferences data is stored in a file, which matches only one {@link Preferences} instance in the memory. - * You can use getPreferences to obtain the {@link Preferences} instance matching - * the file that stores preferences data, and use movePreferencesFromCache - * to remove the {@link Preferences} instance from the memory. - * - * @interface Preferences - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Provides interfaces to obtain and modify preferences data. - *

The preferences data is stored in a file, which matches only one {@link Preferences} instance in the memory. - * You can use getPreferences to obtain the {@link Preferences} instance matching - * the file that stores preferences data, and use movePreferencesFromCache - * to remove the {@link Preferences} instance from the memory. - * - * @interface Preferences - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Provides interfaces to obtain and modify preferences data. - *

The preferences data is stored in a file, which matches only one {@link Preferences} instance in the memory. - * You can use getPreferences to obtain the {@link Preferences} instance matching - * the file that stores preferences data, and use movePreferencesFromCache - * to remove the {@link Preferences} instance from the memory. - * - * @interface Preferences - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - interface Preferences { - /** - * Obtains the value of a preferences in the ValueType format. - *

If the value is {@code null} or not in the ValueType format, the default value is returned. - * - * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } defValue - Indicates the default value to return. - * @param { AsyncCallback } callback - The value matching the specified key if it is found; - * returns the default value otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Obtains the value of a preferences in the ValueType format. - *

If the value is {@code null} or not in the ValueType format, the default value is returned. - * - * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } defValue - Indicates the default value to return. - * @param { AsyncCallback } callback - The value matching the specified key if it is found; - * returns the default value otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains the value of a preferences in the ValueType format. - *

If the value is {@code null} or not in the ValueType format, the default value is returned. - * - * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } defValue - Indicates the default value to return. - * @param { AsyncCallback } callback - The value matching the specified key if it is found; - * returns the default value otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - get(key: string, defValue: ValueType, callback: AsyncCallback): void; - - /** - * Obtains the value of a preferences in the ValueType format. - *

If the value is {@code null} or not in the ValueType format, the default value is returned. - * - * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } defValue - Indicates the default value to return. - * @returns { Promise } The value matching the specified key if it is found; - * returns the default value otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Obtains the value of a preferences in the ValueType format. - *

If the value is {@code null} or not in the ValueType format, the default value is returned. - * - * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } defValue - Indicates the default value to return. - * @returns { Promise } The value matching the specified key if it is found; - * returns the default value otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains the value of a preferences in the ValueType format. - *

If the value is {@code null} or not in the ValueType format, the default value is returned. - * - * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } defValue - Indicates the default value to return. - * @returns { Promise } The value matching the specified key if it is found; - * returns the default value otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - get(key: string, defValue: ValueType): Promise; - - /** - * Obtains the value of a preferences in the ValueType format. This interface is executed synchronously. - *

If the value is {@code null} or not in the ValueType format, the default value is returned. - * - * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } defValue - Indicates the default value to return. - * @returns { ValueType } The value matching the specified key if it is found; - * returns the default value otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains the value of a preferences in the ValueType format. This interface is executed synchronously. - *

If the value is {@code null} or not in the ValueType format, the default value is returned. - * - * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } defValue - Indicates the default value to return. - * @returns { ValueType } The value matching the specified key if it is found; - * returns the default value otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - getSync(key: string, defValue: ValueType): ValueType; - - /** - * Obtains all the keys and values of a preferences in an object. - * - * @param { AsyncCallback } callback - The values and keys in an object. - * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Obtains all the keys and values of a preferences in an object. - * - * @param { AsyncCallback } callback - The values and keys in an object. - * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains all the keys and values of a preferences in an object. - * - * @param { AsyncCallback } callback - The values and keys in an object. - * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - getAll(callback: AsyncCallback): void; - - /** - * Obtains all the keys and values of a preferences in an object. - * - * @returns { Promise } The values and keys in an object. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Obtains all the keys and values of a preferences in an object. - * - * @returns { Promise } The values and keys in an object. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains all the keys and values of a preferences in an object. - * - * @returns { Promise } The values and keys in an object. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - getAll(): Promise; - - /** - * Obtains all the keys and values of a preferences in an object. This interface - * is executed synchronously. - * - * @returns { Object } The values and keys in an object. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains all the keys and values of a preferences in an object. This interface - * is executed synchronously. - * - * @returns { Object } The values and keys in an object. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - getAllSync(): Object; - - /** - * Checks whether the {@link Preferences} object contains a preferences matching a specified key. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { AsyncCallback } callback - {@code true} if the {@link Preferences} object contains a - * preferences with the specified key;returns {@code false} otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Checks whether the {@link Preferences} object contains a preferences matching a specified key. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { AsyncCallback } callback - {@code true} if the {@link Preferences} object contains a - * preferences with the specified key;returns {@code false} otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Checks whether the {@link Preferences} object contains a preferences matching a specified key. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { AsyncCallback } callback - {@code true} if the {@link Preferences} object contains a - * preferences with the specified key;returns {@code false} otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - has(key: string, callback: AsyncCallback): void; - - /** - * Checks whether the {@link Preferences} object contains a preferences matching a specified key. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @returns { Promise } {@code true} if the {@link Preferences} object contains - * a preferences with the specified key; returns {@code false} otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Checks whether the {@link Preferences} object contains a preferences matching a specified key. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @returns { Promise } {@code true} if the {@link Preferences} object contains - * a preferences with the specified key; returns {@code false} otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Checks whether the {@link Preferences} object contains a preferences matching a specified key. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @returns { Promise } {@code true} if the {@link Preferences} object contains - * a preferences with the specified key; returns {@code false} otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - has(key: string): Promise; - - /** - * Checks whether the {@link Preferences} object contains a preferences matching a specified key. This interface - * is executed synchronously. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @returns { boolean } {@code true} if the {@link Preferences} object contains - * a preferences with the specified key; returns {@code false} otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Checks whether the {@link Preferences} object contains a preferences matching a specified key. This interface - * is executed synchronously. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @returns { boolean } {@code true} if the {@link Preferences} object contains - * a preferences with the specified key; returns {@code false} otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - hasSync(key: string): boolean; - - /** - * Sets an int value for the key in the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the - * file. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } value - Indicates the value of the preferences. - * MAX_VALUE_LENGTH. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Sets an int value for the key in the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the - * file. - *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. - * Otherwise, the format of the persistent file is incorrect and the file is damaged. - *

If the corresponding key already exists, the {@link put} method will overwrite its value. - * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } value - Indicates the value of the preferences. - * MAX_VALUE_LENGTH. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Sets an int value for the key in the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the - * file. - *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. - * Otherwise, the format of the persistent file is incorrect and the file is damaged. - *

If the corresponding key already exists, the {@link put} method will overwrite its value. - * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } value - Indicates the value of the preferences. - * MAX_VALUE_LENGTH. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - put(key: string, value: ValueType, callback: AsyncCallback): void; - - /** - * Sets an int value for the key in the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the - * file. - *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. - * Otherwise, the format of the persistent file is incorrect and the file is damaged. - *

If the corresponding key already exists, the {@link put} method will overwrite its value. - * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } value - Indicates the value of the preferences. - * MAX_VALUE_LENGTH. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Sets an int value for the key in the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the - * file. - *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. - * Otherwise, the format of the persistent file is incorrect and the file is damaged. - *

If the corresponding key already exists, the {@link put} method will overwrite its value. - * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } value - Indicates the value of the preferences. - * MAX_VALUE_LENGTH. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Sets an int value for the key in the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the - * file. - *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. - * Otherwise, the format of the persistent file is incorrect and the file is damaged. - *

If the corresponding key already exists, the {@link put} method will overwrite its value. - * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } value - Indicates the value of the preferences. - * MAX_VALUE_LENGTH. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - put(key: string, value: ValueType): Promise; - - /** - * Sets an int value for the key in the {@link Preferences} object. This interface is executed synchronously. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the - * file. - *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. - * Otherwise, the format of the persistent file is incorrect and the file is damaged. - *

If the corresponding key already exists, the {@link put} method will overwrite its value. - * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } value - Indicates the value of the preferences. - * MAX_VALUE_LENGTH. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Sets an int value for the key in the {@link Preferences} object. This interface is executed synchronously. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the - * file. - *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. - * Otherwise, the format of the persistent file is incorrect and the file is damaged. - *

If the corresponding key already exists, the {@link put} method will overwrite its value. - * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. - * - * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { ValueType } value - Indicates the value of the preferences. - * MAX_VALUE_LENGTH. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - putSync(key: string, value: ValueType): void; - - /** - * Deletes the preferences with a specified key from the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Deletes the preferences with a specified key from the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes the preferences with a specified key from the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - delete(key: string, callback: AsyncCallback): void; - - /** - * Deletes the preferences with a specified key from the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Deletes the preferences with a specified key from the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes the preferences with a specified key from the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @returns { Promise } A promise object. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - delete(key: string): Promise; - - /** - * Deletes the preferences with a specified key from the {@link Preferences} object. This interface is - * executed synchronously.

You can call the {@link #flush} method to save the {@link Preferences} - * object to the file. - * - * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes the preferences with a specified key from the {@link Preferences} object. This interface is - * executed synchronously.

You can call the {@link #flush} method to save the {@link Preferences} - * object to the file. - * - * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. - * MAX_KEY_LENGTH. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - deleteSync(key: string): void; - - /** - * Clears all preferences from the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Clears all preferences from the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Clears all preferences from the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - clear(callback: AsyncCallback): void; - - /** - * Clears all preferences from the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @returns { Promise } A promise object. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Clears all preferences from the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @returns { Promise } A promise object. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Clears all preferences from the {@link Preferences} object. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @returns { Promise } A promise object. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - clear(): Promise; - - /** - * Clears all preferences from the {@link Preferences} object. This interface is executed synchronously. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Clears all preferences from the {@link Preferences} object. This interface is executed synchronously. - *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. - * - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - clearSync(): void; - - /** - * Asynchronously saves the {@link Preferences} object to the file. - * - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified; - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Asynchronously saves the {@link Preferences} object to the file. - * - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified; - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Asynchronously saves the {@link Preferences} object to the file. - * - * @param { AsyncCallback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - flush(callback: AsyncCallback): void; - - /** - * Asynchronously saves the {@link Preferences} object to the file. - * - * @returns { Promise } A promise object. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Asynchronously saves the {@link Preferences} object to the file. - * - * @returns { Promise } A promise object. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Asynchronously saves the {@link Preferences} object to the file. - * - * @returns { Promise } A promise object. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - flush(): Promise; - - /** - * Saves the {@link Preferences} object to the file. - * - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since 14 - */ - flushSync(): void; - - /** - * Registers an observer to listen for the change of a {@link Preferences} object. - * - * @param { 'change' } type - Indicates the callback when preferences changes. - * @param { Callback<{ key: string }> } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Registers an observer to listen for the change of a {@link Preferences} object. - * - * @param { 'change' } type - Indicates the callback when preferences changes. - * @param { Function } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Registers an observer to listen for the change of a {@link Preferences} object. - * - * @param { 'change' } type - Indicates the callback when preferences changes. - * @param { Callback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since 11 - */ - on(type: 'change', callback: Callback): void; - - /** - * Registers an observer to listen for the change of a {@link Preferences} object. - * - * @param { 'multiProcessChange' } type - Indicates the callback when preferences changed in multiple processes. - * @param { Function } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500019 - Failed to obtain the subscription service. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 10 - */ - /** - * Registers an observer to listen for the change of a {@link Preferences} object. - * - * @param { 'multiProcessChange' } type - Indicates the callback when preferences changed in multiple processes. - * @param { Callback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @throws { BusinessError } 15500019 - Failed to obtain the subscription service. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @atomicservice - * @since 11 - */ - on(type: 'multiProcessChange', callback: Callback): void; - - /** - * Registers an observer to listen for changes to the {@ link Preferences} object. - * - * @param { 'dataChange' } type - Indicates the type of the event to observe. - * @param { Array } keys - Indicates one or more keys to listen for. - * @param { Callback> } callback - Indicates the callback used to return the data change. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @atomicservice - * @since 12 - */ - on(type: 'dataChange', keys: Array, callback: Callback>): void; - - /** - * Unregisters an existing observer. - * - * @param { 'change' } type - Indicates the callback when preferences changes. - * @param { Callback<{ key: string }> } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 9 - */ - /** - * Unregisters an existing observer. - * - * @param { 'change' } type - Indicates the callback when preferences changes. - * @param { Function } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @since 10 - */ - /** - * Unregisters an existing observer. - * - * @param { 'change' } type - Indicates the callback when preferences changes. - * @param { Callback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @crossplatform - * @atomicservice - * @since 11 - */ - off(type: 'change', callback?: Callback): void; - - /** - * Unregisters an existing observer. - * - * @param { 'multiProcessChange' } type - Indicates the callback when preferences changed in multiple processes. - * @param { Function } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @since 10 - */ - /** - * Unregisters an existing observer. - * - * @param { 'multiProcessChange' } type - Indicates the callback when preferences changed in multiple processes. - * @param { Callback } callback - Indicates the callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @atomicservice - * @since 11 - */ - off(type: 'multiProcessChange', callback?: Callback): void; - - /** - * Unregisters an observer for changes to the {@ link Preferences} object. - * - * @param { 'dataChange' } type - Indicates the event type. - * @param { Array } keys - Indicates the data whose changes are not observed. - * @param { Callback> } callback - Indicates the callback to unregister. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; - *
3. Parameter verification failed. - * @throws { BusinessError } 15500000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.Preferences.Core - * @atomicservice - * @since 12 - */ - off(type: 'dataChange', keys: Array, callback?: Callback>): void; - } -} - -export default preferences; +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkData + */ + +import { AsyncCallback, Callback } from './@ohos.base'; +import Context from './application/BaseContext'; + +/** + * Provides interfaces to obtain and modify preferences data. + * + * @namespace preferences + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + * @name preferences + */ +/** + * Provides interfaces to obtain and modify preferences data. + * + * @namespace preferences + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + * @name preferences + */ +/** + * Provides interfaces to obtain and modify preferences data. + * + * @namespace preferences + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + * @name preferences + */ +declare namespace preferences { + /** + * Indicates possible value types + * + * @typedef {number | string | boolean | Array | Array | Array} + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Indicates possible value types + * + * @typedef {number | string | boolean | Array | Array | Array} + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 10 + */ + /** + * Indicates possible value types + * + * @typedef {number | string | boolean | Array | Array | Array | Uint8Array} + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates possible value types + * + * @typedef {number | string | boolean | Array | Array | Array | Uint8Array | object | + * bigint} + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @atomicservice + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + type ValueType = number | string | boolean | Array | Array | Array | Uint8Array | object | bigint; + + /** + * Indicates the maximum length of a key (80 characters). + * + * @constant + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Indicates the maximum length of a key (80 characters). + * + * @constant + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Indicates the maximum length of a key (80 characters). + * + * @constant + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Maximum length of a key. + * + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since 12 + */ + const MAX_KEY_LENGTH: number; + + /** + * Indicates the maximum length of a string (8192 characters). + * + * @constant + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Indicates the maximum length of a string (8192 characters). + * + * @constant + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Indicates the maximum length of a string (8192 characters). + * + * @constant + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Maximum length of a value. + * + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since 12 + */ + const MAX_VALUE_LENGTH: number; + + /** + * the storage type + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @atomicservice + * @since 18 + */ + enum StorageType { + /** + * XML storage type + * + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @atomicservice + * @since 18 + */ + XML = 0, + + /** + * GSKV storage type + * + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @atomicservice + * @since 18 + */ + GSKV + } + + /** + * Manages preferences file configurations. + * + * @interface Options + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Manages preferences file configurations. + * + * @interface Options + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + interface Options { + /** + * The preferences file name. + * + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * The preferences file name. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + name: string; + + /** + * Application Group Id. + * + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @StageModelOnly + * @since 10 + */ + /** + * Application Group Id. + * + * @type { ?(string | null | undefined) } + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @StageModelOnly + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + dataGroupId?: string | null | undefined; + + /** + * The preferences storage type. + * + * @type { ?(StorageType | null | undefined) } + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @atomicservice + * @since 18 + */ + storageType?: StorageType | null | undefined; + } + + /** + * Obtains a {@link Preferences} instance matching a specified preferences file name. + *

The {@link references} instance loads all data of the preferences file and + * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @param { AsyncCallback } callback - The {@link Preferences} instance matching the specified + * preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Obtains a {@link Preferences} instance matching a specified preferences file name. + *

The {@link references} instance loads all data of the preferences file and + * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @param { AsyncCallback } callback - The {@link Preferences} instance matching the specified + * preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains a {@link Preferences} instance matching a specified preferences file name. + *

The {@link references} instance loads all data of the preferences file and + * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @param { AsyncCallback } callback - The {@link Preferences} instance matching the specified + * preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function getPreferences(context: Context, name: string, callback: AsyncCallback): void; + + /** + * Obtains a {@link Preferences} instance matching a specified preferences file name. + *

The {@link references} instance loads all data of the preferences file and + * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @param { AsyncCallback } callback - The {@link Preferences} instance matching the specified + * preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains a {@link Preferences} instance matching a specified preferences file name. + *

The {@link references} instance loads all data of the preferences file and + * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @param { AsyncCallback } callback - The {@link Preferences} instance matching the specified + * preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15500000 - Inner error. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function getPreferences(context: Context, options: Options, callback: AsyncCallback): void; + + /** + * Obtains a {@link Preferences} instance matching a specified preferences file name. + *

The {@link references} instance loads all data of the preferences file and + * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @returns { Promise } The {@link Preferences} instance matching the specified preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Obtains a {@link Preferences} instance matching a specified preferences file name. + *

The {@link references} instance loads all data of the preferences file and + * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @returns { Promise } The {@link Preferences} instance matching the specified preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains a {@link Preferences} instance matching a specified preferences file name. + *

The {@link references} instance loads all data of the preferences file and + * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @returns { Promise } The {@link Preferences} instance matching the specified preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function getPreferences(context: Context, name: string): Promise; + + /** + * Obtains a {@link Preferences} instance matching a specified preferences file name. + *

The {@link references} instance loads all data of the preferences file and + * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @returns { Promise } The {@link Preferences} instance matching the specified preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains a {@link Preferences} instance matching a specified preferences file name. + *

The {@link references} instance loads all data of the preferences file and + * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @returns { Promise } The {@link Preferences} instance matching the specified preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15500000 - Inner error. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function getPreferences(context: Context, options: Options): Promise; + + /** + * Obtains a {@link Preferences} instance matching a specified preferences file name. + * This interface is executed synchronously. + *

The {@link references} instance loads all data of the preferences file and + * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @returns { Preferences } The {@link Preferences} instance matching the specified preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains a {@link Preferences} instance matching a specified preferences file name. + * This interface is executed synchronously. + *

The {@link references} instance loads all data of the preferences file and + * resides in the memory. You can use removePreferencesFromCache to remove the instance from the memory. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @returns { Preferences } The {@link Preferences} instance matching the specified preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15500000 - Inner error. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function getPreferencesSync(context: Context, options: Options): Preferences; + + /** + * check the {@link StorageType} type is supported or not on current system. + * @param { StorageType } type - Indicates storage type which want to check. + * @returns { boolean } a boolean value indicates this system support the type or not. + * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @atomicservice + * @since 18 + */ + function isStorageTypeSupported(type: StorageType): boolean; + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache which is performed by removePreferencesFromCache and deletes the + * preferences file. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache which is performed by removePreferencesFromCache and deletes the + * preferences file. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache which is performed by removePreferencesFromCache and deletes the + * preferences file. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function deletePreferences(context: Context, name: string, callback: AsyncCallback): void; + + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache which is performed by removePreferencesFromCache and deletes the + * preferences file. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache which is performed by removePreferencesFromCache and deletes the + * preferences file. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15500000 - Inner error. + * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function deletePreferences(context: Context, options: Options, callback: AsyncCallback): void; + + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache which is performed by removePreferencesFromCache and deletes the + * preferences file. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache which is performed by removePreferencesFromCache and deletes the + * preferences file. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache which is performed by removePreferencesFromCache and deletes the + * preferences file. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function deletePreferences(context: Context, name: string): Promise; + + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache which is performed by removePreferencesFromCache and deletes the + * preferences file. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache which is performed by removePreferencesFromCache and deletes the + * preferences file. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15500000 - Inner error. + * @throws { BusinessError } 15500010 - Failed to delete the user preferences persistence file. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function deletePreferences(context: Context, options: Options): Promise; + + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback): void; + + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15500000 - Inner error. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function removePreferencesFromCache(context: Context, options: Options, callback: AsyncCallback): void; + + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function removePreferencesFromCache(context: Context, name: string): Promise; + + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15500000 - Inner error. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function removePreferencesFromCache(context: Context, options: Options): Promise; + + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. This interface is executed synchronously. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. This interface is executed synchronously. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the preferences file name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function removePreferencesFromCacheSync(context: Context, name: string): void; + + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. This interface is executed synchronously. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes a {@link Preferences} instance matching a specified preferences file name + * from the cache. This interface is executed synchronously. + *

When deleting the {@link Preferences} instance, you must release all references + * of the instance. In addition, do not use the instance to perform data operations. Otherwise, data inconsistency + * will occur. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { Options } options - Indicates the {@link Options} option of preferences file position. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 15500000 - Inner error. + * @throws { BusinessError } 15501001 - The operations is supported in stage mode only. + * @throws { BusinessError } 15501002 - Invalid dataGroupId. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function removePreferencesFromCacheSync(context: Context, options: Options): void; + + /** + * Provides interfaces to obtain and modify preferences data. + *

The preferences data is stored in a file, which matches only one {@link Preferences} instance in the memory. + * You can use getPreferences to obtain the {@link Preferences} instance matching + * the file that stores preferences data, and use movePreferencesFromCache + * to remove the {@link Preferences} instance from the memory. + * + * @interface Preferences + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Provides interfaces to obtain and modify preferences data. + *

The preferences data is stored in a file, which matches only one {@link Preferences} instance in the memory. + * You can use getPreferences to obtain the {@link Preferences} instance matching + * the file that stores preferences data, and use movePreferencesFromCache + * to remove the {@link Preferences} instance from the memory. + * + * @interface Preferences + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Provides interfaces to obtain and modify preferences data. + *

The preferences data is stored in a file, which matches only one {@link Preferences} instance in the memory. + * You can use getPreferences to obtain the {@link Preferences} instance matching + * the file that stores preferences data, and use movePreferencesFromCache + * to remove the {@link Preferences} instance from the memory. + * + * @interface Preferences + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + interface Preferences { + /** + * Obtains the value of a preferences in the ValueType format. + *

If the value is {@code null} or not in the ValueType format, the default value is returned. + * + * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } defValue - Indicates the default value to return. + * @param { AsyncCallback } callback - The value matching the specified key if it is found; + * returns the default value otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Obtains the value of a preferences in the ValueType format. + *

If the value is {@code null} or not in the ValueType format, the default value is returned. + * + * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } defValue - Indicates the default value to return. + * @param { AsyncCallback } callback - The value matching the specified key if it is found; + * returns the default value otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains the value of a preferences in the ValueType format. + *

If the value is {@code null} or not in the ValueType format, the default value is returned. + * + * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } defValue - Indicates the default value to return. + * @param { AsyncCallback } callback - The value matching the specified key if it is found; + * returns the default value otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + get(key: string, defValue: ValueType, callback: AsyncCallback): void; + + /** + * Obtains the value of a preferences in the ValueType format. + *

If the value is {@code null} or not in the ValueType format, the default value is returned. + * + * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } defValue - Indicates the default value to return. + * @returns { Promise } The value matching the specified key if it is found; + * returns the default value otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Obtains the value of a preferences in the ValueType format. + *

If the value is {@code null} or not in the ValueType format, the default value is returned. + * + * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } defValue - Indicates the default value to return. + * @returns { Promise } The value matching the specified key if it is found; + * returns the default value otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains the value of a preferences in the ValueType format. + *

If the value is {@code null} or not in the ValueType format, the default value is returned. + * + * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } defValue - Indicates the default value to return. + * @returns { Promise } The value matching the specified key if it is found; + * returns the default value otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + get(key: string, defValue: ValueType): Promise; + + /** + * Obtains the value of a preferences in the ValueType format. This interface is executed synchronously. + *

If the value is {@code null} or not in the ValueType format, the default value is returned. + * + * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } defValue - Indicates the default value to return. + * @returns { ValueType } The value matching the specified key if it is found; + * returns the default value otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains the value of a preferences in the ValueType format. This interface is executed synchronously. + *

If the value is {@code null} or not in the ValueType format, the default value is returned. + * + * @param { string } key - Indicates the key of the preferences. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } defValue - Indicates the default value to return. + * @returns { ValueType } The value matching the specified key if it is found; + * returns the default value otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + getSync(key: string, defValue: ValueType): ValueType; + + /** + * Obtains all the keys and values of a preferences in an object. + * + * @param { AsyncCallback } callback - The values and keys in an object. + * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Obtains all the keys and values of a preferences in an object. + * + * @param { AsyncCallback } callback - The values and keys in an object. + * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains all the keys and values of a preferences in an object. + * + * @param { AsyncCallback } callback - The values and keys in an object. + * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + getAll(callback: AsyncCallback): void; + + /** + * Obtains all the keys and values of a preferences in an object. + * + * @returns { Promise } The values and keys in an object. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Obtains all the keys and values of a preferences in an object. + * + * @returns { Promise } The values and keys in an object. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains all the keys and values of a preferences in an object. + * + * @returns { Promise } The values and keys in an object. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + getAll(): Promise; + + /** + * Obtains all the keys and values of a preferences in an object. This interface + * is executed synchronously. + * + * @returns { Object } The values and keys in an object. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains all the keys and values of a preferences in an object. This interface + * is executed synchronously. + * + * @returns { Object } The values and keys in an object. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + getAllSync(): Object; + + /** + * Checks whether the {@link Preferences} object contains a preferences matching a specified key. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { AsyncCallback } callback - {@code true} if the {@link Preferences} object contains a + * preferences with the specified key;returns {@code false} otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Checks whether the {@link Preferences} object contains a preferences matching a specified key. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { AsyncCallback } callback - {@code true} if the {@link Preferences} object contains a + * preferences with the specified key;returns {@code false} otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Checks whether the {@link Preferences} object contains a preferences matching a specified key. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { AsyncCallback } callback - {@code true} if the {@link Preferences} object contains a + * preferences with the specified key;returns {@code false} otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + has(key: string, callback: AsyncCallback): void; + + /** + * Checks whether the {@link Preferences} object contains a preferences matching a specified key. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @returns { Promise } {@code true} if the {@link Preferences} object contains + * a preferences with the specified key; returns {@code false} otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Checks whether the {@link Preferences} object contains a preferences matching a specified key. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @returns { Promise } {@code true} if the {@link Preferences} object contains + * a preferences with the specified key; returns {@code false} otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Checks whether the {@link Preferences} object contains a preferences matching a specified key. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @returns { Promise } {@code true} if the {@link Preferences} object contains + * a preferences with the specified key; returns {@code false} otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + has(key: string): Promise; + + /** + * Checks whether the {@link Preferences} object contains a preferences matching a specified key. This interface + * is executed synchronously. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @returns { boolean } {@code true} if the {@link Preferences} object contains + * a preferences with the specified key; returns {@code false} otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Checks whether the {@link Preferences} object contains a preferences matching a specified key. This interface + * is executed synchronously. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @returns { boolean } {@code true} if the {@link Preferences} object contains + * a preferences with the specified key; returns {@code false} otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + hasSync(key: string): boolean; + + /** + * Sets an int value for the key in the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the + * file. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } value - Indicates the value of the preferences. + * MAX_VALUE_LENGTH. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Sets an int value for the key in the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the + * file. + *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. + * Otherwise, the format of the persistent file is incorrect and the file is damaged. + *

If the corresponding key already exists, the {@link put} method will overwrite its value. + * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } value - Indicates the value of the preferences. + * MAX_VALUE_LENGTH. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Sets an int value for the key in the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the + * file. + *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. + * Otherwise, the format of the persistent file is incorrect and the file is damaged. + *

If the corresponding key already exists, the {@link put} method will overwrite its value. + * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } value - Indicates the value of the preferences. + * MAX_VALUE_LENGTH. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + put(key: string, value: ValueType, callback: AsyncCallback): void; + + /** + * Sets an int value for the key in the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the + * file. + *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. + * Otherwise, the format of the persistent file is incorrect and the file is damaged. + *

If the corresponding key already exists, the {@link put} method will overwrite its value. + * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } value - Indicates the value of the preferences. + * MAX_VALUE_LENGTH. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Sets an int value for the key in the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the + * file. + *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. + * Otherwise, the format of the persistent file is incorrect and the file is damaged. + *

If the corresponding key already exists, the {@link put} method will overwrite its value. + * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } value - Indicates the value of the preferences. + * MAX_VALUE_LENGTH. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Sets an int value for the key in the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the + * file. + *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. + * Otherwise, the format of the persistent file is incorrect and the file is damaged. + *

If the corresponding key already exists, the {@link put} method will overwrite its value. + * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } value - Indicates the value of the preferences. + * MAX_VALUE_LENGTH. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + put(key: string, value: ValueType): Promise; + + /** + * Sets an int value for the key in the {@link Preferences} object. This interface is executed synchronously. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the + * file. + *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. + * Otherwise, the format of the persistent file is incorrect and the file is damaged. + *

If the corresponding key already exists, the {@link put} method will overwrite its value. + * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } value - Indicates the value of the preferences. + * MAX_VALUE_LENGTH. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Sets an int value for the key in the {@link Preferences} object. This interface is executed synchronously. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the + * file. + *

When the value contains strings in a non-UTF-8 format, use the Uint8Array type for storage. + * Otherwise, the format of the persistent file is incorrect and the file is damaged. + *

If the corresponding key already exists, the {@link put} method will overwrite its value. + * You can use the {@link #hasSync} method to check whether the corresponding key-value pair exists. + * + * @param { string } key - Indicates the key of the preferences to modify. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { ValueType } value - Indicates the value of the preferences. + * MAX_VALUE_LENGTH. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + putSync(key: string, value: ValueType): void; + + /** + * Deletes the preferences with a specified key from the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Deletes the preferences with a specified key from the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes the preferences with a specified key from the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + delete(key: string, callback: AsyncCallback): void; + + /** + * Deletes the preferences with a specified key from the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Deletes the preferences with a specified key from the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes the preferences with a specified key from the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @returns { Promise } A promise object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + delete(key: string): Promise; + + /** + * Deletes the preferences with a specified key from the {@link Preferences} object. This interface is + * executed synchronously.

You can call the {@link #flush} method to save the {@link Preferences} + * object to the file. + * + * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes the preferences with a specified key from the {@link Preferences} object. This interface is + * executed synchronously.

You can call the {@link #flush} method to save the {@link Preferences} + * object to the file. + * + * @param { string } key - Indicates the key of the preferences to delete. It cannot be {@code null} or empty. + * MAX_KEY_LENGTH. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + deleteSync(key: string): void; + + /** + * Clears all preferences from the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Clears all preferences from the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Clears all preferences from the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + clear(callback: AsyncCallback): void; + + /** + * Clears all preferences from the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @returns { Promise } A promise object. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Clears all preferences from the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @returns { Promise } A promise object. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Clears all preferences from the {@link Preferences} object. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @returns { Promise } A promise object. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + clear(): Promise; + + /** + * Clears all preferences from the {@link Preferences} object. This interface is executed synchronously. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Clears all preferences from the {@link Preferences} object. This interface is executed synchronously. + *

You can call the {@link #flush} method to save the {@link Preferences} object to the file. + * + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + clearSync(): void; + + /** + * Asynchronously saves the {@link Preferences} object to the file. + * + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified; + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Asynchronously saves the {@link Preferences} object to the file. + * + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified; + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Asynchronously saves the {@link Preferences} object to the file. + * + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Mandatory parameters are left unspecified. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + flush(callback: AsyncCallback): void; + + /** + * Asynchronously saves the {@link Preferences} object to the file. + * + * @returns { Promise } A promise object. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Asynchronously saves the {@link Preferences} object to the file. + * + * @returns { Promise } A promise object. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Asynchronously saves the {@link Preferences} object to the file. + * + * @returns { Promise } A promise object. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + flush(): Promise; + + /** + * Saves the {@link Preferences} object to the file. + * + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + flushSync(): void; + + /** + * Registers an observer to listen for the change of a {@link Preferences} object. + * + * @param { 'change' } type - Indicates the callback when preferences changes. + * @param { Callback<{ key: string }> } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Registers an observer to listen for the change of a {@link Preferences} object. + * + * @param { 'change' } type - Indicates the callback when preferences changes. + * @param { Function } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Registers an observer to listen for the change of a {@link Preferences} object. + * + * @param { 'change' } type - Indicates the callback when preferences changes. + * @param { Callback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since 11 + */ + on(type: 'change', callback: Callback): void; + + /** + * Registers an observer to listen for the change of a {@link Preferences} object. + * + * @param { 'multiProcessChange' } type - Indicates the callback when preferences changed in multiple processes. + * @param { Function } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500019 - Failed to obtain the subscription service. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 10 + */ + /** + * Registers an observer to listen for the change of a {@link Preferences} object. + * + * @param { 'multiProcessChange' } type - Indicates the callback when preferences changed in multiple processes. + * @param { Callback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @throws { BusinessError } 15500019 - Failed to obtain the subscription service. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @atomicservice + * @since 11 + */ + on(type: 'multiProcessChange', callback: Callback): void; + + /** + * Registers an observer to listen for changes to the {@ link Preferences} object. + * + * @param { 'dataChange' } type - Indicates the type of the event to observe. + * @param { Array } keys - Indicates one or more keys to listen for. + * @param { Callback> } callback - Indicates the callback used to return the data change. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since 12 + */ + on(type: 'dataChange', keys: Array, callback: Callback>): void; + + /** + * Unregisters an existing observer. + * + * @param { 'change' } type - Indicates the callback when preferences changes. + * @param { Callback<{ key: string }> } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 9 + */ + /** + * Unregisters an existing observer. + * + * @param { 'change' } type - Indicates the callback when preferences changes. + * @param { Function } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @since 10 + */ + /** + * Unregisters an existing observer. + * + * @param { 'change' } type - Indicates the callback when preferences changes. + * @param { Callback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since 11 + */ + off(type: 'change', callback?: Callback): void; + + /** + * Unregisters an existing observer. + * + * @param { 'multiProcessChange' } type - Indicates the callback when preferences changed in multiple processes. + * @param { Function } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @since 10 + */ + /** + * Unregisters an existing observer. + * + * @param { 'multiProcessChange' } type - Indicates the callback when preferences changed in multiple processes. + * @param { Callback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @atomicservice + * @since 11 + */ + off(type: 'multiProcessChange', callback?: Callback): void; + + /** + * Unregisters an observer for changes to the {@ link Preferences} object. + * + * @param { 'dataChange' } type - Indicates the event type. + * @param { Array } keys - Indicates the data whose changes are not observed. + * @param { Callback> } callback - Indicates the callback to unregister. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified;
2. Incorrect parameter types; + *
3. Parameter verification failed. + * @throws { BusinessError } 15500000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.Preferences.Core + * @crossplatform + * @atomicservice + * @since 12 + */ + off(type: 'dataChange', keys: Array, callback?: Callback>): void; + } +} + +export default preferences; diff --git a/api/@ohos.data.relationalStore.d.ts b/api/@ohos.data.relationalStore.d.ts index efb9c04611..b6cd0806fd 100644 --- a/api/@ohos.data.relationalStore.d.ts +++ b/api/@ohos.data.relationalStore.d.ts @@ -1,9189 +1,9220 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkData - */ - -import { AsyncCallback, Callback } from './@ohos.base'; -import Context from './application/BaseContext'; -import dataSharePredicates from './@ohos.data.dataSharePredicates'; -/*** if arkts 1.1 */ -import sendableRelationalStore from './@ohos.data.sendableRelationalStore'; -/*** endif */ -/** - * Provides methods for rdbStore create and delete. - * - * @namespace relationalStore - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ -/** - * Provides methods for rdbStore create and delete. - * - * @namespace relationalStore - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ -declare namespace relationalStore { - /** - * Describes the status of asset - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - enum AssetStatus { - /** - * ASSET_NORMAL: means the status of asset is normal. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ASSET_NORMAL, - - /** - * ASSET_ABNORMAL: means the asset needs to be inserted. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ASSET_INSERT, - - /** - * ASSET_ABNORMAL: means the asset needs to be updated. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ASSET_UPDATE, - - /** - * ASSET_ABNORMAL: means the asset needs to be deleted. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ASSET_DELETE, - - /** - * ASSET_ABNORMAL: means the status of asset is abnormal. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ASSET_ABNORMAL, - - /** - * ASSET_DOWNLOADING: means the status of asset is downloading. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ASSET_DOWNLOADING - } - - /** - * Records information of the asset. - * - * @interface Asset - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - interface Asset { - /** - * The name of asset. - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - name: string; - - /** - * The uri of asset. - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - uri: string; - - /** - * The path of asset. - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - path: string; - - /** - * The create time of asset. - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - createTime: string; - - /** - * The modify time of asset. - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - modifyTime: string; - - /** - * The size of asset. - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - size: string; - - /** - * The status of asset. - * - * @type { ?AssetStatus } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - status?: AssetStatus; - } - - /** - * Indicates several assets in one column - * - * @typedef { Asset[] } Assets - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - type Assets = Asset[]; - - /** - * Indicates possible value types - * - * @typedef { null | number | string | boolean | Uint8Array } ValueType - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Indicates possible value types - * - * @typedef { null | number | string | boolean | Uint8Array | Asset | Assets } ValueType - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Indicates possible value types - * - * @typedef { null | number | string | boolean | Uint8Array | Asset | Assets | Float32Array | bigint } ValueType - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - type ValueType = null | number | string | boolean | Uint8Array | Asset | Assets | Float32Array | bigint; - - /** - * Values in buckets are stored in key-value pairs - * - * @typedef { Record } ValuesBucket - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Values in buckets are stored in key-value pairs, move Uint8Array add to ValueType - * - * @typedef { Record } ValuesBucket - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Values in buckets are stored in key-value pairs, change {[key: string]: ValueType;} to Record - * - * @typedef { Record } ValuesBucket - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - type ValuesBucket = Record; - - /** - * The type of the priority key can be number or string - * - * @typedef { number | string } PRIKeyType - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - type PRIKeyType = number | string; - - /** - * The time is in UTC format. - * - * @typedef { Date } UTCTime - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - type UTCTime = Date; - - /** - * Indicates the primary key and UTC time of the modified rows. - * - * @typedef { Map } ModifyTime - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - type ModifyTime = Map; - - /** - * Manages relational database configurations. - * - * @interface StoreConfig - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Manages relational database configurations. - * - * @interface StoreConfig - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - interface StoreConfig { - /** - * The database name. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * The database name. - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - name: string; - - /** - * Specifies the security level of the database. - * - * @type { SecurityLevel } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 - */ - securityLevel: SecurityLevel; - - /** - * Specifies whether the database is encrypted. - * - * @type { ?boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 - */ - encrypt?: boolean; - - /** - * The data group id of application. - * - * @type { ?string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @StageModelOnly - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - dataGroupId?: string; - - /** - * Specifies the directory relative to the database directory obtained from context - * - * @type { ?string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - customDir?: string; - - /** - * Specifies the root directory relative to the database - * - * @type { ?string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - rootDir?: string; - - /** - * Specifies whether to clean up dirty data that is synchronized to - * the local but deleted in the cloud. - * - * @type { ?boolean } - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - autoCleanDirtyData?: boolean; - - /** - * Specifies whether data can be searched. - * - * @type { ?boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - isSearchable?: boolean; - - /** - * Specifies whether database allows rebuild. - * - * @type { ?boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - allowRebuild?: boolean; - - /** - * Specifies whether the vector type is supported. - * - * @type { ?boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 - */ - vector?: boolean; - - /** - * Specifies whether the database opened is read-only. - * If isReadOnly is true, other configuration items will become invalid. - * - * @type { ?boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - isReadOnly?: boolean; - - /** - * Indicates the names of the shared library containing fts etc. - * - * @type { ?Array } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - pluginLibs?: Array; - - /** - * Enumerates the high availability modes of the RDB store. - * - * @type { ?HAMode } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - haMode?: HAMode; - - /** - * Specifies the cryptographic parameters used when opening an encrypted database. - * - * @type { ?CryptoParam } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - cryptoParam?: CryptoParam; - - /** - * Specifies the tokenizer type when using fts capability. - * - * @type { ?Tokenizer } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 17 - */ - - tokenizer?: Tokenizer; - - /** - * Specifies whether the database need persistence. - * - * @type { ?boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 18 - */ - - persist?: boolean; - - /** - * Specifies whether the database enable the capabilities for semantic indexing processing. - * - * @type { ?boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 20 - */ - - enableSemanticIndex?: boolean; - } - - /** - * Enumerates the high availability modes of the RDB store. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - enum HAMode { - /** - * SINGLE: Data is written to a single RDB store. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SINGLE = 0, - - /** - * MAIN_REPLICA: Data is written to the main and replica RDB stores. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MAIN_REPLICA - } - - /** - * Specifies the cryptographic parameters used when opening an encrypted database. - * - * @typedef CryptoParam - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - interface CryptoParam { - /** - * Specifies the key used when opening an encrypted database. - * When finished passing the key to the database, its content should be set to all-zero. - * - * @type { Uint8Array } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - encryptionKey: Uint8Array; - - /** - * Specifies the number of KDF iterations used when opening an encrypted database. - * Default number is 10000. - * When the number is set to 0, use default iteration number and encryption algorithm. - * - * @type { ?number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - iterationCount?: number; - - /** - * Specifies the encryption algorithm when opening an encrypted database. - * Default encryption algorithm is AES_256_GCM. - * - * @type { ?EncryptionAlgo } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - encryptionAlgo?: EncryptionAlgo; - - /** - * Specifies the HMAC algorithm when opening an encrypted database. - * Default HMAC algorithm is SHA256. - * - * @type { ?HmacAlgo } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - hmacAlgo?: HmacAlgo; - - /** - * Specifies the KDF algorithm when opening an encrypted database. - * Default KDF SHA algorithm is the same as HMAC algorithm. - * - * @type { ?KdfAlgo } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - kdfAlgo?: KdfAlgo; - - /** - * Specifies the page size used when opening an encrypted database. - * Default crypto page size is 1024. - * - * @type { ?number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - cryptoPageSize?: number; - } - - /** - * Enumerates the supported encryption algorithm when opening a database. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - enum EncryptionAlgo { - /** - * AES_256_GCM: Database is encrypted using AES_256_GCM. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - AES_256_GCM = 0, - - /** - * AES_256_CBC: Database is encrypted using AES_256_CBC. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - AES_256_CBC - } - - /** - * Enumerates the supported HMAC algorithm when opening a database. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - enum HmacAlgo { - /** - * SHA1: HMAC_SHA1 algorithm. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SHA1 = 0, - - /** - * SHA256: HMAC_SHA256 algorithm. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SHA256, - - /** - * SHA512: HMAC_SHA512 algorithm. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SHA512 - } - - /** - * Enumerates the supported KDF algorithm when opening a database. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - enum KdfAlgo { - /** - * KDF_SHA1: PBKDF2_HMAC_SHA1 algorithm. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - KDF_SHA1 = 0, - - /** - * KDF_SHA256: PBKDF2_HMAC_SHA256 algorithm. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - KDF_SHA256, - - /** - * KDF_SHA512: PBKDF2_HMAC_SHA512 algorithm. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - KDF_SHA512 - } - - /** - * Enumerates the supported tokenizer when opening a database. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 17 - */ - enum Tokenizer { - /** - * NONE_TOKENIZER: not use tokenizer - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 17 - */ - NONE_TOKENIZER = 0, - /** - * ICU_TOKENIZER: native icu tokenizer. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 17 - */ - ICU_TOKENIZER, - /** - * CUSTOM_TOKENIZER: self-developed enhance tokenizer. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 18 - */ - CUSTOM_TOKENIZER - } - - /** - * The cloud sync progress - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - enum Progress { - /** - * SYNC_BEGIN: means the sync process begin. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - SYNC_BEGIN, - - /** - * SYNC_BEGIN: means the sync process is in progress - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - SYNC_IN_PROGRESS, - - /** - * SYNC_BEGIN: means the sync process is finished - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - SYNC_FINISH - } - - /** - * Describes the statistic of the cloud sync process. - * - * @interface Statistic - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - interface Statistic { - /** - * Describes the total number of data to sync. - * - * @type { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - total: number; - - /** - * Describes the number of successfully synced data. - * - * @type { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - successful: number; - - /** - * Describes the number of data failed to sync. - * - * @type { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - failed: number; - - /** - * Describes the number of data remained to sync. - * - * @type { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - remained: number; - } - - /** - * Describes the {@code Statistic} details of the table. - * - * @interface TableDetails - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - interface TableDetails { - /** - * Describes the {@code Statistic} details of the upload process. - * - * @type { Statistic } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - upload: Statistic; - - /** - * Describes the {@code Statistic} details of the download process. - * - * @type { Statistic } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - download: Statistic; - } - - /** - * Describes the status of {@code Progress}. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - enum ProgressCode { - /** - * SUCCESS: means the status of progress is success. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - SUCCESS, - - /** - * UNKNOWN_ERROR: means the progress meets unknown error. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - UNKNOWN_ERROR, - - /** - * NETWORK_ERROR: means the progress meets network error. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - NETWORK_ERROR, - - /** - * CLOUD_DISABLED: means cloud is disabled. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - CLOUD_DISABLED, - - /** - * LOCKED_BY_OTHERS: means the progress is locked by others. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - LOCKED_BY_OTHERS, - - /** - * RECORD_LIMIT_EXCEEDED: means the record exceeds the limit. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - RECORD_LIMIT_EXCEEDED, - - /** - * NO_SPACE_FOR_ASSET: means the cloud has no space for the asset. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - NO_SPACE_FOR_ASSET, - - /** - * BLOCKED_BY_NETWORK_STRATEGY: means the sync blocked by network strategy. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - BLOCKED_BY_NETWORK_STRATEGY - } - - /** - * Describes detail of the cloud sync {@code Progress}. - * - * @interface ProgressDetails - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - interface ProgressDetails { - /** - * Describes the status of data sync progress. - * - * @type { Progress } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - schedule: Progress; - - /** - * Describes the code of data sync progress. - * - * @type { ProgressCode } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - code: ProgressCode; - - /** - * The statistic details of the tables. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * The statistic details of the tables. - * - * @type { Record } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 11 - */ - details: Record; - } - - /** - * Defines information about the SQL statements executed. - * - * @interface SqlExecutionInfo - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - interface SqlExecutionInfo { - /** - * Array of SQL statements executed. When the args of batchInsert is too large, there may be more than one SQL. - * - * @type { Array } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - sql: Array; - - /** - * Total time used for executing the SQL statements, in μs. - * - * @type { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - totalTime: number; - - /** - * Maximum time allowed to obtain the SQL file handle, in μs. - * - * @type { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - waitTime: number; - - /** - * Time used to prepare SQL and args, in μs. - * - * @type { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - prepareTime: number; - - /** - * Time used to execute the SQL statements, in μs. - * - * @type { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - executeTime: number; - } - - /** - * Defines an exception message. - * - * @interface ExceptionMessage - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - interface ExceptionMessage { - /** - * Error code returned by SQLite, see {@link https://www.sqlite.org/rescode.html}. - * - * @type { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - code: number; - - /** - * Error message. - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - message: string; - - /** - * SQL statement executed when the exception occurs. - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - sql: string; - } - - /** - * Defines an SQL statement. - * - * @interface SqlInfo - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - interface SqlInfo { - /** - * SQL statement. - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - sql: string; - - /** - * Parameters of the SQL statement. - * - * @type { Array } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - args: Array; - } - - /** - * Describes the {@code RdbStore} type. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 - */ - enum SecurityLevel { - /** - * S1: means the db is low level security - * There are some low impact, when the data is leaked. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 - */ - S1 = 1, - - /** - * S2: means the db is middle level security - * There are some major impact, when the data is leaked. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 - */ - S2 = 2, - - /** - * S3: means the db is high level security - * There are some severity impact, when the data is leaked. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 - */ - S3 = 3, - - /** - * S4: means the db is critical level security - * There are some critical impact, when the data is leaked. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 - */ - S4 = 4 - } - - /** - * Indicates the database synchronization mode. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - enum SyncMode { - /** - * Indicates the data is pushed to remote device from local device. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - SYNC_MODE_PUSH = 0, - - /** - * Indicates the data is pulled from remote device to local device. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - SYNC_MODE_PULL = 1, - - /** - * Indicates the data is pulled from remote device to local device. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 10 - */ - SYNC_MODE_TIME_FIRST, - - /** - * Indicates force push the native data to the cloud. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 10 - */ - SYNC_MODE_NATIVE_FIRST, - - /** - * Indicates the data is pulled from cloud to local device. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 10 - */ - SYNC_MODE_CLOUD_FIRST - } - - /** - * Describes the subscription type. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - enum SubscribeType { - /** - * Subscription to remote data changes - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - SUBSCRIBE_TYPE_REMOTE = 0, - - /** - * Subscription to cloud data changes - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 10 - */ - /** - * Subscription to cloud data changes - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 - */ - SUBSCRIBE_TYPE_CLOUD, - - /** - * Subscription to cloud data changes details - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 10 - */ - /** - * Subscription to cloud data changes details - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 - */ - SUBSCRIBE_TYPE_CLOUD_DETAILS, - - /** - * Subscription to local data changes details - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - SUBSCRIBE_TYPE_LOCAL_DETAILS - } - - /** - * Describes the change type. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - enum ChangeType { - /** - * Means the change type is data change. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * Means the change type is data change. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - DATA_CHANGE, - - /** - * Means the change type is asset change. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * Means the change type is asset change. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - ASSET_CHANGE - } - - /** - * Indicates the notify info - * - * @interface ChangeInfo - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - interface ChangeInfo { - /** - * Indicates the changed table - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - table: string; - - /** - * Indicates the changed type - * - * @type { ChangeType } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - type: ChangeType; - - /** - * 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 } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - 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 } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - 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 } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - deleted: Array | Array; - } - - /** - * Describes the distribution type of the tables. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - enum DistributedType { - /** - * Indicates the table is distributed among the devices - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - DISTRIBUTED_DEVICE, - - /** - * Indicates the table is distributed between the cloud and the devices. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 10 - */ - /** - * Indicates the table is distributed between the cloud and the devices. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 - */ - DISTRIBUTED_CLOUD - } - - /** - * Indicates the reference between tables. - * - * @interface Reference - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @since 11 - */ - interface Reference { - /** - * Indicates the table that references another table. - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @since 11 - */ - sourceTable: string; - - /** - * Indicates the table to be referenced. - * - * @type { string } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @since 11 - */ - targetTable: string; - - /** - * Indicates the reference fields. - * - * @type { Record } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @since 11 - */ - refFields: Record - } - - /** - * Manages the distributed configuration of the table. - * - * @interface DistributedConfig - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - interface DistributedConfig { - /** - * Specifies whether the database auto sync. - * - * @type { boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - autoSync: boolean; - - /** - * Specifies the reference relationships between tables. - * - * @type { ?Array } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @since 11 - */ - references?: Array; - - /** - * Specifies whether async download assets. - * - * @type { ?boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 18 - */ - asyncDownloadAsset?: boolean; - - /** - * Specifies whether the cloud sync is enabled for the database. - * - * @type { ?boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 18 - */ - enableCloud?: boolean; - } - - /** - * Describes the conflict resolutions to insert data into the table. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - enum ConflictResolution { - /** - * Implements no action when conflict occurs. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - ON_CONFLICT_NONE = 0, - - /** - * Implements rollback operation when conflict occurs. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - ON_CONFLICT_ROLLBACK = 1, - - /** - * Implements abort operation when conflict occurs. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - ON_CONFLICT_ABORT = 2, - - /** - * Implements fail operation when conflict occurs. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - ON_CONFLICT_FAIL = 3, - - /** - * Implements ignore operation when conflict occurs. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - ON_CONFLICT_IGNORE = 4, - - /** - * Implements replace operation operator when conflict occurs. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - ON_CONFLICT_REPLACE = 5 - } - - /** - * Describes the data origin sources. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - enum Origin { - /** - * Indicates the data source is local. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - LOCAL, - - /** - * Indicates the data source is cloud. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - CLOUD, - - /** - * Indicates the data source is remote. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - REMOTE, - } - - /** - * Enumerates the field. - * - * @enum { string } - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - enum Field { - /** - * Cursor field. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - CURSOR_FIELD = '#_cursor', - - /** - * Origin field. For details, see {@link Origin}. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - ORIGIN_FIELD = '#_origin', - - /** - * Deleted flag field. - * Indicates whether data has deleted in cloud. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - DELETED_FLAG_FIELD = '#_deleted_flag', - - /** - * Data status field. - * Indicates data status. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 - */ - DATA_STATUS_FIELD = '#_data_status', - - /** - * Owner field. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - OWNER_FIELD = '#_cloud_owner', - - /** - * Privilege field. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - PRIVILEGE_FIELD = '#_cloud_privilege', - - /** - * Sharing resource field. - * - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - SHARING_RESOURCE_FIELD = '#_sharing_resource_field' - } - - /** - * Enumerates the type of rebuild. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - enum RebuildType { - /** - * The database is not rebuilt or repaired. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - NONE, - - /** - * The database is rebuilt. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - REBUILT, - - /** - * The database is repaired. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - REPAIRED - } - - /** - * Enumerates the type of transaction. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 14 - */ - enum TransactionType { - /** - * The DEFERRED transaction. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 14 - */ - DEFERRED, - - /** - * The IMMEDIATE transaction. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 14 - */ - IMMEDIATE, - - /** - * The EXCLUSIVE transaction. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 14 - */ - EXCLUSIVE - } - - /** - * Create transaction options. - * - * @interface TransactionOptions - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 14 - */ - interface TransactionOptions { - /** - * The type of transaction. - * - * @type { TransactionType } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 14 - */ - transactionType?: TransactionType; - } - - /** - * Enumerates the data types of a column. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - enum ColumnType { - /** - * The value in the column is null. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - NULL, - - /** - * The value in the column is a 64-bit integer. It can be used to hold an 8-bit (including Boolean values), 16-bit, - * 32-bit, or 64-bit integer.if the 64-bit integer is greater than 2^53 or less than -2^53, you can use getString - * to convert the 64-bit integer into a string. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - INTEGER, - - /** - * The value in the column is a floating point number. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - REAL, - - /** - * The value in the column is a string. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - TEXT, - - /** - * The value in the column is a Uint8Array. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - BLOB, - - /** - * The value in the column is an asset. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - ASSET, - - /** - * The value in the column is an array of assets. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - ASSETS, - - /** - * The value in the column is a Float32Array. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - FLOAT_VECTOR, - - /** - * The value in the column is a bigint. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - UNLIMITED_INT, - } - - /** - * Manages relational database configurations. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Manages relational database configurations. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - class RdbPredicates { - /** - * A parameterized constructor used to create a RdbPredicates instance. - * - * @param { string } name - Indicates the table name of the database. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * A parameterized constructor used to create a RdbPredicates instance. - * - * @param { string } name - Indicates the table name of the database. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(name: string); - - /** - * Specifies remote devices which connect to local device when syncing distributed database. - * When query database, this function should not be called. - * - * @param { Array } devices - Indicates specified remote devices. - * @returns { RdbPredicates } - The {@link RdbPredicates} self. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - inDevices(devices: Array): RdbPredicates; - - /** - * Specifies all remote devices which connect to local device when syncing distributed database. - * When query database, this function should not be called. - * - * @returns { RdbPredicates } - The {@link RdbPredicates} self. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - inAllDevices(): RdbPredicates; - - /** - * Configure the RdbPredicates to match the field whose data type is ValueType and value is equal - * to a specified value. - * 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. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure the RdbPredicates to match the field whose data type is ValueType and value is equal - * to a specified value. - * 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. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - equalTo(field: string, value: ValueType): RdbPredicates; - - /** - * Configure the RdbPredicates to match the field whose data type is ValueType and value is not equal to - * a specified value. - * 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. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure the RdbPredicates to match the field whose data type is ValueType and value is not equal to - * a specified value. - * 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. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - notEqualTo(field: string, value: ValueType): RdbPredicates; - - /** - * Adds a left parenthesis to the RdbPredicates. - * 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 9 - */ - /** - * Adds a left parenthesis to the RdbPredicates. - * 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 - * @crossplatform - * @since 10 - */ - beginWrap(): RdbPredicates; - - /** - * Adds a right parenthesis to the RdbPredicates. - * 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 9 - */ - /** - * Adds a right parenthesis to the RdbPredicates. - * 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 - * @crossplatform - * @since 10 - */ - endWrap(): RdbPredicates; - - /** - * Adds an or condition to the RdbPredicates. - * This method is similar to or of the SQL statement. - * - * @returns { RdbPredicates } - The {@link RdbPredicates} with the or condition. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Adds an or condition to the RdbPredicates. - * This method is similar to or of the SQL statement. - * - * @returns { RdbPredicates } - The {@link RdbPredicates} with the or condition. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - or(): RdbPredicates; - - /** - * Adds an and condition to the RdbPredicates. - * This method is similar to and of the SQL statement. - * - * @returns { RdbPredicates } - The {@link RdbPredicates} with the and condition. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Adds an and condition to the RdbPredicates. - * This method is similar to and of the SQL statement. - * - * @returns { RdbPredicates } - The {@link RdbPredicates} with the and condition. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - and(): RdbPredicates; - - /** - * Configure the RdbPredicates to match the field whose data type is string and value - * contains a specified value. - * This method is similar to contains of the SQL statement. - * - * @param { string } field - Indicates the column name in the database table. - * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. - * @returns { RdbPredicates } - The {@link RdbPredicates} self. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure the RdbPredicates to match the field whose data type is string and value - * contains a specified value. - * This method is similar to contains of the SQL statement. - * - * @param { string } field - Indicates the column name in the database table. - * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. - * @returns { RdbPredicates } - The {@link RdbPredicates} self. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - contains(field: string, value: string): RdbPredicates; - - /** - * Configure the RdbPredicates to match the field whose data type is string and value starts - * with a specified string. - * This method is similar to value% of the SQL statement. - * - * @param { string } field - Indicates the column name in the database table. - * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. - * @returns { RdbPredicates } - The {@link RdbPredicates} self. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure the RdbPredicates to match the field whose data type is string and value starts - * with a specified string. - * This method is similar to value% of the SQL statement. - * - * @param { string } field - Indicates the column name in the database table. - * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. - * @returns { RdbPredicates } - The {@link RdbPredicates} self. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - beginsWith(field: string, value: string): RdbPredicates; - - /** - * Configure the RdbPredicates to match the field whose data type is string and value - * ends with a specified string. - * This method is similar to %value of the SQL statement. - * - * @param { string } field - Indicates the column name in the database table. - * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. - * @returns { RdbPredicates } - The {@link RdbPredicates} self. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure the RdbPredicates to match the field whose data type is string and value - * ends with a specified string. - * This method is similar to %value of the SQL statement. - * - * @param { string } field - Indicates the column name in the database table. - * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. - * @returns { RdbPredicates } - The {@link RdbPredicates} self. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - endsWith(field: string, value: string): RdbPredicates; - - /** - * Configure the RdbPredicates to match the fields whose value is null. - * 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. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure the RdbPredicates to match the fields whose value is null. - * 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. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - isNull(field: string): RdbPredicates; - - /** - * Configure the RdbPredicates to match the specified fields whose value is not null. - * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure the RdbPredicates to match the specified fields whose value is not null. - * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - isNotNull(field: string): RdbPredicates; - - /** - * Configure the RdbPredicates to match the fields whose data type is string and value is - * similar to a specified string. - * This method is similar to like of the SQL statement. - * - * @param { string } field - Indicates the column name in the database table. - * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. - * @returns { RdbPredicates } - The {@link RdbPredicates} that match the specified field. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure the RdbPredicates to match the fields whose data type is string and value is - * similar to a specified string. - * This method is similar to like of the SQL statement. - * - * @param { string } field - Indicates the column name in the database table. - * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. - * @returns { RdbPredicates } - The {@link RdbPredicates} that match the specified field. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - like(field: string, value: string): RdbPredicates; - - /** - * Configure RdbPredicates to match the specified field whose data type is string and the value contains - * a wildcard. - * Different from like, the input parameters of this method are case-sensitive. - * - * @param { string } field - Indicates the column name in the database table. - * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. - * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure RdbPredicates to match the specified field whose data type is string and the value contains - * a wildcard. - * Different from like, the input parameters of this method are case-sensitive. - * - * @param { string } field - Indicates the column name in the database table. - * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. - * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - glob(field: string, value: string): RdbPredicates; - - /** - * Configure RdbPredicates to match the specified field whose value is within a given range. - * - * @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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure RdbPredicates to match the specified field whose value is within a given range. - * - * @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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - between(field: string, low: ValueType, high: ValueType): RdbPredicates; - - /** - * Configure RdbPredicates to match the specified field whose 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. - * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure RdbPredicates to match the specified field whose 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. - * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - 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 9 - */ - /** - * 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 - * @crossplatform - * @since 10 - */ - 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - limitAs(value: number): RdbPredicates; - - /** - * Configure RdbPredicates to specify the start position of the returned result. - * Use this method together with limit(number). - * - * @param { number } rowOffset - Indicates the start position of the returned result. - * The value is a positive integer. - * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure RdbPredicates to specify the start position of the returned result. - * Use this method together with limit(number). - * - * @param { number } rowOffset - Indicates the start position of the returned result. - * The value is a positive integer. - * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - offsetAs(rowOffset: number): RdbPredicates; - - /** - * Configure RdbPredicates to group query results by specified columns. - * - * @param { Array } fields - Indicates the specified columns by which query results are grouped. - * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure RdbPredicates to group query results by specified columns. - * - * @param { Array } fields - Indicates the specified columns by which query results are grouped. - * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - groupBy(fields: Array): RdbPredicates; - - /** - * Configure RdbPredicates to specify the index column. - * Before using this method, you need to create an index column. - * - * @param { string } field - Indicates the name of the index column. - * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure RdbPredicates to specify the index column. - * Before using this method, you need to create an index column. - * - * @param { string } field - Indicates the name of the index column. - * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - indexedBy(field: string): RdbPredicates; - - /** - * Configure RdbPredicates 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 RdbPredicates}. - * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure RdbPredicates 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 RdbPredicates}. - * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - in(field: string, value: Array): RdbPredicates; - - /** - * Configure RdbPredicates 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 RdbPredicates}. - * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Configure RdbPredicates 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 RdbPredicates}. - * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - notIn(field: string, value: Array): RdbPredicates; - - /** - * Sets the RdbPredicates to match the field whose data type is string and value - * does not contain the specified value. - * This method is similar to "Not like %value%" of the SQL statement. - * - * @param { string } field - Indicates the column name in the database table. - * @param { string } value - Indicates the value that is not contained. - * @returns { RdbPredicates } - The {@Link RdbPredicates} set. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - notContains(field: string, value: string): RdbPredicates; - - /** - * Sets the RdbPredicates to match the field whose data type is string and value - * is not like the specified value. - * This method is similar to "Not like" of the SQL statement. - * - * @param { string } field - Indicates the column name in the database table. - * @param { string } value - Indicates the value to compare against. - * @returns { RdbPredicates } - The {@Link RdbPredicates} set. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - notLike(field: string, value: string): RdbPredicates; - - /** - * Filters the grouped data that meets the specified conditions. - * - * @param { string } conditions - Conditions used to filter the data obtained using GROUP BY. - * @param { Array } args - Parameters to be used in the conditions. - * @returns { RdbPredicates } - Returns the RdbPredicates object. - * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; - *
2. Missing GROUP BY clause. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - having(conditions:string, args?: Array): RdbPredicates; - } - - /** - * Provides methods for accessing a database result set generated by querying the database. - * - * @interface ResultSet - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Provides methods for accessing a database result set generated by querying the database. - * - * @interface ResultSet - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - interface ResultSet { - /** - * Obtains the names of all columns in a result set. - * The column names are returned as a string array, in which the strings are in the same order - * as the columns in the result set. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Obtains the names of all columns in a result set. - * The column names are returned as a string array, in which the strings are in the same order - * as the columns in the result set. - * - * @type { Array } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - columnNames: Array; - - /** - * Obtains the number of columns in the result set. - * The returned number is equal to the length of the string array returned by the - * columnNames method. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Obtains the number of columns in the result set. - * The returned number is equal to the length of the string array returned by the - * columnNames method. - * - * @type { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - columnCount: number; - - /** - * Obtains the number of rows in the result set. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Obtains the number of rows in the result set. - * - * @type { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - rowCount: number; - - /** - * Obtains the current index of the result set. - * The result set index starts from 0. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Obtains the current index of the result set. - * The result set index starts from 0. - * - * @type { number } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - rowIndex: number; - - /** - * Checks whether the cursor is positioned at the first row. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Checks whether the cursor is positioned at the first row. - * - * @type { boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - isAtFirstRow: boolean; - - /** - * Checks whether the cursor is positioned at the last row. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Checks whether the cursor is positioned at the last row. - * - * @type { boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - isAtLastRow: boolean; - - /** - * Checks whether the cursor is positioned after the last row. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Checks whether the cursor is positioned after the last row. - * - * @type { boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - isEnded: boolean; - - /** - * Checks whether the cursor is positioned before the first row. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Checks whether the cursor is positioned before the first row. - * - * @type { boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - isStarted: boolean; - - /** - * Checks whether the current result set is closed. - * If the result set is closed by calling the close method, true will be returned. - * - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Checks whether the current result set is closed. - * If the result set is closed by calling the close method, true will be returned. - * - * @type { boolean } - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - isClosed: boolean; - - /** - * Obtains the column index based on the specified column name. - * The column name is passed as an input parameter. - * - * @param { string } columnName - Indicates the name of the specified column in the result set. - * @returns { number } The index of the specified column. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Obtains the column index based on the specified column name. - * The column name is passed as an input parameter. - * - * @param { string } columnName - Indicates the name of the specified column in the result set. - * @returns { number } The index of the specified column. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains the column index based on the specified column name. - * The column name is passed as an input parameter. - * - * @param { string } columnName - Indicates the name of the specified column in the result set. - * @returns { number } The index of the specified column. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800019 - The SQL must be a query statement. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - getColumnIndex(columnName: string): number; - - /** - * Obtains the column name based on the specified column index. - * The column index is passed as an input parameter. - * - * @param { number } columnIndex - Indicates the index of the specified column in the result set. - * @returns { string } The name of the specified column. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Obtains the column name based on the specified column index. - * The column index is passed as an input parameter. - * - * @param { number } columnIndex - Indicates the index of the specified column in the result set. - * @returns { string } The name of the specified column. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains the column name based on the specified column index. - * The column index is passed as an input parameter. - * - * @param { number } columnIndex - Indicates the index of the specified column in the result set. - * @returns { string } The name of the specified column. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800019 - The SQL must be a query statement. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - getColumnName(columnIndex: number): string; - - /** - * Obtains the column data type based on the specified column index. - * The column index is passed as an input parameter. - * - * @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; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800019 - The SQL must be a query statement. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - getColumnType(columnIdentifier: number | string): Promise; - - /** - * Obtains the column data type based on the specified column index. This API returns the result synchronously. - * - * @param { number | string } columnIdentifier - Index or name of the column. - * @returns { ColumnType } Column data type obtained. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800019 - The SQL must be a query statement. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - 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. - * A positive offset indicates moving backwards, and a negative offset indicates moving forwards. - * - * @param { number } offset - Indicates the offset relative to the current position. - * @returns { boolean } True if the result set is moved successfully and does not go beyond the range; - * Returns false otherwise. - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Go to the specified row of the result set forwards or backwards by an offset relative to its current position. - * A positive offset indicates moving backwards, and a negative offset indicates moving forwards. - * - * @param { number } offset - Indicates the offset relative to the current position. - * @returns { boolean } True if the result set is moved successfully and does not go beyond the range; - * Returns false otherwise. - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Go to the specified row of the result set forwards or backwards by an offset relative to its current position. - * A positive offset indicates moving backwards, and a negative offset indicates moving forwards. - * - * @param { number } offset - Indicates the offset relative to the current position. - * @returns { boolean } True if the result set is moved successfully and does not go beyond the range; - * Returns false otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800019 - The SQL must be a query statement. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - goTo(offset: number): boolean; - - /** - * Go to the specified row of the result set. - * - * @param { number } position - Indicates the index of the specified row, which starts from 0. - * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Go to the specified row of the result set. - * - * @param { number } position - Indicates the index of the specified row, which starts from 0. - * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Go to the specified row of the result set. - * - * @param { number } position - Indicates the index of the specified row, which starts from 0. - * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800019 - The SQL must be a query statement. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - goToRow(position: number): boolean; - - /** - * Go to the first row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; - * Returns false otherwise, for example, if the result set is empty. - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Go to the first row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; - * Returns false otherwise, for example, if the result set is empty. - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Go to the first row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; - * Returns false otherwise, for example, if the result set is empty. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800019 - The SQL must be a query statement. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - goToFirstRow(): boolean; - - /** - * Go to the last row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; - * Returns false otherwise, for example, if the result set is empty. - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Go to the last row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; - * Returns false otherwise, for example, if the result set is empty. - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Go to the last row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; - * Returns false otherwise, for example, if the result set is empty. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800019 - The SQL must be a query statement. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - goToLastRow(): boolean; - - /** - * Go to the next row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; - * Returns false otherwise, for example, if the result set is already in the last row. - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Go to the next row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; - * Returns false otherwise, for example, if the result set is already in the last row. - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Go to the next row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; - * Returns false otherwise, for example, if the result set is already in the last row. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800019 - The SQL must be a query statement. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - goToNextRow(): boolean; - - /** - * Go to the previous row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; - * Returns false otherwise, for example, if the result set is already in the first row. - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Go to the previous row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; - * Returns false otherwise, for example, if the result set is already in the first row. - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Go to the previous row of the result set. - * - * @returns { boolean } True if the result set is moved successfully; - * Returns false otherwise, for example, if the result set is already in the first row. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800019 - The SQL must be a query statement. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - goToPreviousRow(): boolean; - - /** - * Obtains the value of the specified column in the current row as a byte array. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the Blob type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { Uint8Array } The value of the specified column as a byte array. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Obtains the value of the specified column in the current row as a byte array. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the Blob type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { Uint8Array } The value of the specified column as a byte array. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains the value of the specified column in the current row as a byte array. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the Blob type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { Uint8Array } The value of the specified column as a byte array. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - getBlob(columnIndex: number): Uint8Array; - - /** - * Obtains the value of the specified column in the current row as string. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the string type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { string } The value of the specified column as a string. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Obtains the value of the specified column in the current row as string. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the string type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { string } The value of the specified column as a string. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains the value of the specified column in the current row as string. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the string type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { string } The value of the specified column as a string. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - getString(columnIndex: number): string; - - /** - * Obtains the value of the specified column in the current row as long. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null, the specified column is not of the integer type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { number } The value of the specified column as a long. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Obtains the value of the specified column in the current row as long. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null, the specified column is not of the integer type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { number } The value of the specified column as a long. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains the value of the specified column in the current row as long. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null, the specified column is not of the integer type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { number } The value of the specified column as a long. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - getLong(columnIndex: number): number; - - /** - * Obtains the value of the specified column in the current row as double. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null, the specified column is not of the double type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { number } The value of the specified column as a double. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Obtains the value of the specified column in the current row as double. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null, the specified column is not of the double type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { number } The value of the specified column as a double. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains the value of the specified column in the current row as double. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null, the specified column is not of the double type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { number } The value of the specified column as a double. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - getDouble(columnIndex: number): number; - - /** - * Obtains the value of the specified column in the current row as an asset. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the Asset type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { Asset } The value of the specified column as an asset. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains the value of the specified column in the current row as an asset. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the Asset type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { Asset } The value of the specified column as an asset. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - getAsset(columnIndex: number): Asset; - - /** - * Obtains the value of the specified column in the current row as assets. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the Assets type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { Assets } The value of the specified column as assets. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains the value of the specified column in the current row as assets. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the Assets type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { Assets } The value of the specified column as assets. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - getAssets(columnIndex: number): Assets; - - /** - * Obtains the value of the specified column in the current row. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the Assets type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { ValueType } The value of the specified column. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - /** - * Obtains the value of the specified column in the current row. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the Assets type. - * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, - * the obtained value was null. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { ValueType } The value of the specified column. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 14 - */ - getValue(columnIndex: number): ValueType; - - /** - * Obtains the value of the specified column in the current row. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the Assets type. - * If the value of the specified column in the current row exceeds the value range of number, return a string type. - * Only for flutter - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { ValueType } The value of the specified column. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 20 - */ - getValueForFlutter(columnIndex: number): ValueType - - /** - * Obtains the value of the specified column in the current row as a float array. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the float array type. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { Float32Array } The value of the specified column as a float array. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - The capability is not supported because the database is not a vector DB. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @since 12 - */ - getFloat32Array(columnIndex: number): Float32Array; - - /** - * Obtains the values of all columns in the specified row. - * - * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 11 - */ - /** - * Obtains the values of all columns in the specified row. - * - * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - /** - * Obtains the values of all columns in the specified row. - * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, - * the obtained value was null. - * - * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - getRow(): ValuesBucket; - - /** - * Obtains the values of all columns in the specified row. - * If the value of a column in the current row exceeds the value range of number, return a string type. - * Only for flutter - * - * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - getRowForFlutter(): ValuesBucket - - /** - * Obtains the values of all columns in the specified rows. - * @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; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - getRows(maxCount: number, position?: number): Promise>; - - /** - * Obtains the values of all columns in the specified row. - * - * @returns { sendableRelationalStore.ValuesBucket } Indicates the row of data - * {@link sendableRelationalStore.ValuesBucket} to be inserted into the table. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - getSendableRow(): sendableRelationalStore.ValuesBucket; - - /** - * Checks whether the value of the specified column in the current row is null. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { boolean } True if the value of the specified column in the current row is null; - * Returns false otherwise. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Checks whether the value of the specified column in the current row is null. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { boolean } True if the value of the specified column in the current row is null; - * Returns false otherwise. - * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Checks whether the value of the specified column in the current row is null. - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { boolean } True if the value of the specified column in the current row is null; - * Returns false otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - isColumnNull(columnIndex: number): boolean; - - /** - * Closes the result set. - * Calling this method on the result set will release all of its resources and makes it ineffective. - * - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Closes the result set. - * Calling this method on the result set will release all of its resources and makes it ineffective. - * - * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Closes the result set. - * Calling this method on the result set will release all of its resources and makes it ineffective. - * - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - close(): void; - } - - /** - * Provides methods for managing the relational database (RDB). - * This class provides methods for creating, querying, updating, and deleting RDBs. - * - * @interface RdbStore - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Provides methods for managing the relational database (RDB). - * This class provides methods for creating, querying, updating, and deleting RDBs. - * - * @interface RdbStore - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 - */ - interface RdbStore { - /** - * Set RdbStore version. The version number must be an integer greater than 0. - * Obtains the RdbStore version. - * - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * Set RdbStore version. The version number must be an integer greater than 0. - * Obtains the RdbStore version. - * - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Set RdbStore version. The version number must be an integer greater than 0. - * Obtains the RdbStore version. - * - * @type { number } - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - version: number; - - /** - * Set whether the database is rebuilt. - * - * @type {RebuildType} - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - rebuilt: RebuildType; - - /** - * Inserts a row of data into the target table. - * - * @param { string } table - Indicates the target 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Inserts a row of data into the target table. - * - * @param { string } table - Indicates the target 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 } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Inserts a row of data into the target table. - * - * @param { string } table - Indicates the target 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - insert(table: string, values: ValuesBucket, callback: AsyncCallback): void; - - /** - * Inserts a row of data into the target table. - * - * @param { string } table - Indicates the target table. - * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @param { AsyncCallback } callback - The row ID if the operation is successful. returns -1 otherwise. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Inserts a row of data into the target table. - * - * @param { string } table - Indicates the target table. - * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @param { AsyncCallback } callback - The row ID 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. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - insert(table: string, values: ValuesBucket, conflict: ConflictResolution, callback: AsyncCallback): void; - - /** - * Inserts a row of data into the target table. - * - * @param { string } table - Indicates the target table. - * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @returns { Promise } The row ID if the operation is successful. return -1 otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Inserts a row of data into the target table. - * - * @param { string } table - Indicates the target table. - * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @returns { Promise } The row ID if the operation is successful. return -1 otherwise. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Inserts a row of data into the target table. - * - * @param { string } table - Indicates the target table. - * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @returns { Promise } The row ID if the operation is successful. return -1 otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - insert(table: string, values: ValuesBucket): Promise; - - /** - * Inserts a row of data into the target table. - * - * @param { string } table - Indicates the target table. - * @param { ValuesBucket } values - Indicates the row 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 row ID if the operation is successful. return -1 otherwise. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Inserts a row of data into the target table. - * - * @param { string } table - Indicates the target table. - * @param { ValuesBucket } values - Indicates the row 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 row ID if the operation is successful. return -1 otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - insert(table: string, values: ValuesBucket, conflict: ConflictResolution): Promise; - - /** - * Inserts a row of data into the target table with sync interface. - * - * @param { string } table - Indicates the target table. - * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { number } The row ID if the operation is successful. return -1 otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - insertSync(table: string, values: ValuesBucket, conflict?: ConflictResolution): number; - - /** - * Inserts a row of data into the target table with sync interface. - * - * @param { string } table - Indicates the target table. - * @param { sendableRelationalStore.ValuesBucket } values - Indicates the row of data - * {@link sendableRelationalStore.ValuesBucket} to be inserted into the table. - * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { number } The row ID if the operation is successful. return -1 otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - insertSync(table: string, values: sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; - - /** - * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @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. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 } 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. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @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 } The number of values that were inserted if the operation is successful. - * returns -1 otherwise. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * 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 } 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. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - batchInsert(table: string, values: Array): 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 { 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. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - batchInsertSync(table: string, values: Array): number; - - /** - * 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 { 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 -1 otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - batchInsertWithConflictResolution(table: string, values: Array, conflict: ConflictResolution): 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 { 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. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - batchInsertWithConflictResolutionSync(table: string, values: Array, conflict: ConflictResolution): number; - - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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 { RdbPredicates } predicates - - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @param { AsyncCallback } callback - The number of affected rows. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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 { RdbPredicates } predicates - - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @param { AsyncCallback } callback - The number of affected rows. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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 { RdbPredicates } predicates - - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @param { AsyncCallback } callback - The number of affected rows. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback): void; - - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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 { RdbPredicates } predicates - - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @param { AsyncCallback } callback - The number of affected rows. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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 { RdbPredicates } predicates - - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @param { AsyncCallback } callback - The number of affected rows. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - update( - values: ValuesBucket, - predicates: RdbPredicates, - conflict: ConflictResolution, - callback: AsyncCallback - ): void; - - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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 { RdbPredicates } predicates - - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @returns { Promise } The number of affected rows. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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 { RdbPredicates } predicates - - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @returns { Promise } The number of affected rows. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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 { RdbPredicates } predicates - - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @returns { Promise } The number of affected rows. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - update(values: ValuesBucket, predicates: RdbPredicates): Promise; - - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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 { RdbPredicates } predicates - - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { Promise } The number of affected rows. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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 { RdbPredicates } predicates - - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { Promise } The number of affected rows. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise; - - /** - * Updates data in the database based on a specified instance object of RdbPredicates with sync interface. - * - * @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 { RdbPredicates } predicates - - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { number } The number of affected rows. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - updateSync(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): number; - - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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.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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 9 - */ - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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.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 } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 10 - */ - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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.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 } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 12 - */ - update( - table: string, - values: ValuesBucket, - predicates: dataSharePredicates.DataSharePredicates, - callback: AsyncCallback - ): void; - - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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.DataSharePredicates } predicates - Indicates the specified update condition by - * the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @returns { Promise } The number of affected rows. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 9 - */ - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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.DataSharePredicates } predicates - Indicates the specified update condition by - * the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @returns { Promise } The number of affected rows. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 10 - */ - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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.DataSharePredicates } predicates - Indicates the specified update condition by - * the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @returns { Promise } The number of affected rows. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 12 - */ - update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): 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. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @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}. - * @param { AsyncCallback } callback - The number of affected rows. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * 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. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 } The number of affected rows. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @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. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * 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. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - delete(predicates: RdbPredicates): Promise; - - /** - * Deletes data from the database based on a specified instance object of RdbPredicates with sync interface. - * - * @param { RdbPredicates } predicates - - * The specified delete condition by the instance object of {@link RdbPredicates}. - * @returns { number } return the number of rows deleted. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - deleteSync(predicates: RdbPredicates): number; - /** - * Deletes data from the database based on a specified instance object of RdbPredicates. - * - * @param { string } table - Indicates the target table. - * @param { dataSharePredicates.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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 9 - */ - /** - * Deletes data from the database based on a specified instance object of RdbPredicates. - * - * @param { string } table - Indicates the target table. - * @param { dataSharePredicates.DataSharePredicates } predicates - - * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @param { AsyncCallback } callback - The number of affected rows. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 10 - */ - /** - * Deletes data from the database based on a specified instance object of RdbPredicates. - * - * @param { string } table - Indicates the target table. - * @param { dataSharePredicates.DataSharePredicates } predicates - - * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @param { AsyncCallback } callback - The number of affected rows. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - delete(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback): void; - - /** - * Deletes data from the database based on a specified instance object of RdbPredicates. - * - * @param { string } table - Indicates the target table. - * @param { dataSharePredicates.DataSharePredicates } predicates - - * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @returns { Promise } The number of affected rows. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 9 - */ - /** - * Deletes data from the database based on a specified instance object of RdbPredicates. - * - * @param { string } table - Indicates the target table. - * @param { dataSharePredicates.DataSharePredicates } predicates - - * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @returns { Promise } The number of affected rows. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 10 - */ - /** - * Deletes data from the database based on a specified instance object of RdbPredicates. - * - * @param { string } table - Indicates the target table. - * @param { dataSharePredicates.DataSharePredicates } predicates - - * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @returns { Promise } The number of affected rows. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - delete(table: string, predicates: dataSharePredicates.DataSharePredicates): 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 { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Queries data in the database based on specified conditions. - * - * @param { RdbPredicates } predicates - - * The specified query condition by the instance object of {@link RdbPredicates}. - * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - query(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. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @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 empty array, the query applies to all columns. - * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * 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. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - 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 } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @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 } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * 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 } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - query(predicates: RdbPredicates, 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 { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 10 - */ - /** - * 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 { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 12 - */ - query(table: string, predicates: dataSharePredicates.DataSharePredicates, 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 empty array, the query applies to all columns. - * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 9 - */ - /** - * 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 ResultSet} object if the operation is successful. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 12 - */ - 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 } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 9 - */ - /** - * 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 } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @StageModelOnly - * @since 12 - */ - query( - table: string, - predicates: dataSharePredicates.DataSharePredicates, - columns?: Array - ): Promise; - - /** - * Queries data in the database based on specified conditions with sync function. - * - * @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. - * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - querySync(predicates: RdbPredicates, columns?: Array): ResultSet; - - /** - * Queries data in the database based on SQL statement. - * - * @param { string } sql - Indicates the SQL statement to execute. - * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Queries data in the database based on SQL statement. - * - * @param { string } sql - Indicates the SQL statement to execute. - * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - querySql(sql: string, callback: AsyncCallback): void; - - /** - * 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 ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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 ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * 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 ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - querySql(sql: string, bindArgs: Array, callback: AsyncCallback): void; - - /** - * 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. - * @returns { Promise } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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. - * @returns { Promise } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * 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. - * @returns { Promise } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - querySql(sql: string, bindArgs?: Array): Promise; - - /** - * Queries data in the database based on SQL statement with sync interface. - * - * @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 { ResultSet } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - querySqlSync(sql: string, bindArgs?: Array): ResultSet; - - /** - * Obtains the modify time of rows corresponding to the primary keys. - * - * @param { string } table - Indicates the name of the table to check. - * @param { string } columnName - Indicates the name of the column to check. - * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. - * @returns { Promise } - - * The promise returned by the function. ModifyTime indicates the modify time of current row. - * If this table does not support cloud, the {@link ModifyTime} will be empty. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. - * 5. The PRIKey must be number or string. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * Obtains the modify time of rows corresponding to the primary keys. - * - * @param { string } table - Indicates the name of the table to check. - * @param { string } columnName - Indicates the name of the column to check. - * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. - * @returns { Promise } - - * The promise returned by the function. ModifyTime indicates the modify time of current row. - * If this table does not support cloud, the {@link ModifyTime} will be empty. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. - * 5. The PRIKey must be number or string. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - getModifyTime(table: string, columnName: string, primaryKeys: PRIKeyType[]): Promise; - - /** - * Obtains the modify time of rows corresponding to the primary keys. - * - * @param { string } table - Indicates the name of the table to check. - * @param { string } columnName - Indicates the name of the column to check. - * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. - * @param { AsyncCallback } callback - - * The callback of getModifyTime. ModifyTime indicates the modify time of current row. - * If this table does not support cloud, the {@link ModifyTime} will be empty. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. - * 5. The PRIKey must be number or string. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * Obtains the modify time of rows corresponding to the primary keys. - * - * @param { string } table - Indicates the name of the table to check. - * @param { string } columnName - Indicates the name of the column to check. - * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. - * @param { AsyncCallback } callback - - * The callback of getModifyTime. ModifyTime indicates the modify time of current row. - * If this table does not support cloud, the {@link ModifyTime} will be empty. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. - * 5. The PRIKey must be number or string. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - getModifyTime( - table: string, - columnName: string, - primaryKeys: PRIKeyType[], - callback: AsyncCallback - ): void; - - /** - * Cleans the dirty data, which is the data deleted in the cloud. - * - * Data with a cursor smaller than the specified cursor will be cleaned up. - * - * @param { string } table - Indicates the name of the table to check. - * @param { number } cursor - Indicates the position of the data to be cleaned up. - * @param { AsyncCallback } callback - Indicates the callback invoked to return the result. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - /** - * Cleans the dirty data, which is the data deleted in the cloud. - * - * Data with a cursor smaller than the specified cursor will be cleaned up. - * - * @param { string } table - Indicates the name of the table to check. - * @param { number } cursor - Indicates the position of the data to be cleaned up. - * @param { AsyncCallback } callback - Indicates the callback invoked to return the result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 - */ - cleanDirtyData(table: string, cursor: number, callback: AsyncCallback): void; - - /** - * Cleans all dirty data deleted in the cloud. - * - * @param { string } table - Indicates the name of the table to check. - * @param { AsyncCallback } callback - The callback of clean. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The tablesNames must be not empty string. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - /** - * Cleans all dirty data deleted in the cloud. - * - * @param { string } table - Indicates the name of the table to check. - * @param { AsyncCallback } callback - The callback of clean. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 1 - 3 parameter(s). 2. The RdbStore must be not nullptr. - * 3. The tablesNames must be not empty string. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 - */ - cleanDirtyData(table: string, callback: AsyncCallback): void; - - /** - * Cleans dirty data deleted in the cloud. - * - * If a cursor is specified, data with a cursor smaller than the specified cursor will be cleaned up. - * otherwise clean all. - * - * @param { string } table - Indicates the name of the table to check. - * @param { number } [cursor] - Indicates the cursor. - * @returns { Promise } -The promise returned by the function. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 11 - */ - /** - * Cleans dirty data deleted in the cloud. - * - * If a cursor is specified, data with a cursor smaller than the specified cursor will be cleaned up. - * otherwise clean all. - * - * @param { string } table - Indicates the name of the table to check. - * @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. - * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 - */ - cleanDirtyData(table: string, cursor?: number): Promise; - - /** - * Obtains sharing resource of rows corresponding to the predicates. - * - * @param { RdbPredicates } predicates - - * The specified query condition by the instance object of {@link RdbPredicates}. - * @param { Array } [columns] - The specified columns to query. - * @returns { Promise } -The promise returned by the function. - * {@link ResultSet} is query result. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @systemapi - * @since 11 - */ - /** - * Obtains sharing resource of rows corresponding to the predicates. - * - * @param { RdbPredicates } predicates - - * The specified query condition by the instance object of {@link RdbPredicates}. - * @param { Array } [columns] - The specified columns to query. - * @returns { Promise } -The promise returned by the function. - * {@link ResultSet} is query result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @systemapi - * @since 12 - */ - querySharingResource(predicates: RdbPredicates, columns?: Array): Promise; - - /** - * Obtains sharing resource of rows corresponding to the predicates. - * - * @param { RdbPredicates } predicates - - * The specified query condition by the instance object of {@link RdbPredicates}. - * @param { AsyncCallback } callback - The callback of querySharingResource. - * {@link ResultSet} is query result. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The predicates must be an RdbPredicates. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @systemapi - * @since 11 - */ - /** - * Obtains sharing resource of rows corresponding to the predicates. - * - * @param { RdbPredicates } predicates - - * The specified query condition by the instance object of {@link RdbPredicates}. - * @param { AsyncCallback } callback - The callback of querySharingResource. - * {@link ResultSet} is query result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The predicates must be an RdbPredicates. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @systemapi - * @since 12 - */ - querySharingResource(predicates: RdbPredicates, callback: AsyncCallback): void; - - /** - * Obtains sharing resource of rows corresponding to the predicates. - * - * @param { RdbPredicates } predicates - - * The specified query condition by the instance object of {@link RdbPredicates}. - * @param { Array } columns - The specified columns to query. - * @param { AsyncCallback } callback - The callback of querySharingResource. - * {@link ResultSet} is query result. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @systemapi - * @since 11 - */ - /** - * Obtains sharing resource of rows corresponding to the predicates. - * - * @param { RdbPredicates } predicates - - * The specified query condition by the instance object of {@link RdbPredicates}. - * @param { Array } columns - The specified columns to query. - * @param { AsyncCallback } callback - The callback of querySharingResource. - * {@link ResultSet} is query result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. - * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @systemapi - * @since 12 - */ - querySharingResource(predicates: RdbPredicates, columns: Array, callback: AsyncCallback): void; - - /** - * Executes a SQL statement that contains specified parameters but returns no value. - * - * @param { string } sql - Indicates the SQL statement to execute. - * @param { AsyncCallback } callback - The callback of executeSql. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Executes a SQL statement that contains specified parameters but returns no value. - * - * @param { string } sql - Indicates the SQL statement to execute. - * @param { AsyncCallback } callback - The callback of executeSql. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - executeSql(sql: string, callback: AsyncCallback): void; - - /** - * Executes a 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Executes a 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 } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Executes a 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - executeSql(sql: string, bindArgs: Array, callback: AsyncCallback): void; - - /** - * Executes a 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Executes a 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 } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Executes a 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - executeSql(sql: string, bindArgs?: Array): Promise; - - /** - * Executes a SQL statement that contains specified parameters and returns a value of ValueType. - * - * @param { string } sql - Indicates the SQL statement to execute. - * @param { Array } args - 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - execute(sql: string, args?: Array): Promise; - - /** - * Executes a SQL statement that contains specified parameters and returns a value of ValueType. - * - * @param { string } sql - Indicates the SQL statement to execute. - * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans or 0. - * @param { Array } args - 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - execute(sql: string, txId: number, args?: Array): Promise; - - /** - * Executes a SQL statement that contains specified parameters and returns a value of ValueType with sync interface. - * - * @param { string } sql - Indicates the SQL statement to execute. - * @param { Array } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. - * The values are strings. - * @returns { ValueType } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - executeSync(sql: string, args?: Array): ValueType; - - /** - * BeginTransaction before execute your sql. - * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * BeginTransaction before execute your sql. - * - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * BeginTransaction before execute your sql. - * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - beginTransaction(): void; - - /** - * Begins a transaction before executing the SQL statement. - * - * @returns { Promise } Returns the transaction ID. - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. - * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - beginTrans(): Promise; - - /** - * Commit the the sql you have executed. - * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Commit the the sql you have executed. - * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Commit the the sql you have executed. - * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - commit(): void; - - /** - * Commits the SQL statement executed. - * - * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans. - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - commit(txId : number): Promise; - - /** - * Roll back the sql you have already executed. - * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Roll back the sql you have already executed. - * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Roll back the sql you have already executed. - * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - rollBack(): void; - - /** - * Rolls back the SQL statement executed. - * - * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans. - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - rollback(txId : number): 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * 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 - Parameter error. The store must not be nullptr. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - restore(srcName: string): Promise; - - /** - * Restores a database from a specified database file. - * - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @since 12 - */ - restore(): Promise; - - /** - * Set table to be distributed table. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param { Array } tables - Indicates the table names you want to set. - * @param { AsyncCallback } callback - The callback of setDistributedTables. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Set table to be distributed table. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param { Array } tables - Indicates the table names you want to set. - * @param { AsyncCallback } callback - The callback of setDistributedTables. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - setDistributedTables(tables: Array, callback: AsyncCallback): void; - - /** - * Set table to be distributed table. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param { Array } tables - Indicates the table names you want to set. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Set table to be distributed table. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param { Array } tables - Indicates the table names you want to set. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - setDistributedTables(tables: Array): Promise; - - /** - * Set table to be distributed table. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param { Array } tables - Indicates the table names you want to set. - * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. - * This method only works when type equals to DistributedType.DISTRIBUTED_CLOUD - * @param { AsyncCallback } callback - The callback of setDistributedTables. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800051 - The type of the distributed table does not match. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * Set table to be distributed table. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param { Array } tables - Indicates the table names you want to set. - * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. - * ohos.permission.DISTRIBUTED_DATASYNC is required only when type is DISTRIBUTED_DEVICE. - * @param { AsyncCallback } callback - The callback of setDistributedTables. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800051 - The type of the distributed table does not match. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - setDistributedTables(tables: Array, type: DistributedType, callback: AsyncCallback): void; - - /** - * Set table to be distributed table. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param { Array } tables - Indicates the table names you want to set. - * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. - * This method only works when type equals to DistributedType.DISTRIBUTED_CLOUD - * @param { DistributedConfig } config - - * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. - * @param { AsyncCallback } callback - The callback of setDistributedTables. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800051 - The type of the distributed table does not match. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * Set table to be distributed table. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param { Array } tables - Indicates the table names you want to set. - * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. - * ohos.permission.DISTRIBUTED_DATASYNC is required only when type is DISTRIBUTED_DEVICE. - * @param { DistributedConfig } config - - * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. - * @param { AsyncCallback } callback - The callback of setDistributedTables. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800051 - The type of the distributed table does not match. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - setDistributedTables( - tables: Array, - type: DistributedType, - config: DistributedConfig, - callback: AsyncCallback - ): void; - - /** - * Set table to be a distributed table. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param { Array } tables - Indicates the table names you want to set. - * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. - * This method only works when type equals to DistributedType.DISTRIBUTED_CLOUD - * @param { DistributedConfig } config - - * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800051 - The type of the distributed table does not match. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * Set table to be a distributed table. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param { Array } tables - Indicates the table names you want to set. - * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. - * ohos.permission.DISTRIBUTED_DATASYNC is required only when type is DISTRIBUTED_DEVICE. - * @param { DistributedConfig } config - - * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800051 - The type of the distributed table does not match. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - setDistributedTables(tables: Array, type?: DistributedType, config?: DistributedConfig): Promise; - - /** - * 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 { string } table - {string}: the distributed table name. - * @param { AsyncCallback } callback - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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 { string } table - {string}: the distributed table name. - * @param { AsyncCallback } callback - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - obtainDistributedTableName(device: string, table: string, callback: AsyncCallback): void; - - /** - * 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 { string } table - * @returns { Promise } {string}: the distributed table name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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 { string } table - * @returns { Promise } {string}: the distributed table name. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - obtainDistributedTableName(device: string, table: string): Promise; - - /** - * Sync data between devices. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param { SyncMode } mode - Indicates the database synchronization mode. - * @param { RdbPredicates } predicates - - * The specified sync condition by the instance object of {@link RdbPredicates}. - * @param { AsyncCallback> } callback - - * {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 } 14800000 - Inner error. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Sync data between devices. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @param { SyncMode } mode - Indicates the database synchronization mode. - * @param { RdbPredicates } predicates - - * The specified sync condition by the instance object of {@link RdbPredicates}. - * @param { AsyncCallback> } callback - - * {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. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - sync(mode: SyncMode, predicates: RdbPredicates, callback: AsyncCallback>): void; - - /** - * Sync data between devices. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @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, 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 } 14800000 - Inner error. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Sync data between devices. - * - * @permission ohos.permission.DISTRIBUTED_DATASYNC - * @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, 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. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - sync(mode: SyncMode, predicates: RdbPredicates): Promise>; - - /** - * Sync data to cloud. - * - * @param { SyncMode } mode - indicates the database synchronization mode. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @param { AsyncCallback } callback - - * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. - * @throws { BusinessError } 401 - Parameter error. - * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. - * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. - * 5. The callback must be a function. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 10 - */ - /** - * Sync data to cloud. - * - * @param { SyncMode } mode - indicates the database synchronization mode. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @param { AsyncCallback } callback - - * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. - * @throws { BusinessError } 401 - Parameter error. - * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. - * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. - * 5. The callback must be a function. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 - */ - cloudSync(mode: SyncMode, progress: Callback, callback: AsyncCallback): void; - - /** - * Sync data to cloud. - * - * @param { SyncMode } mode - indicates the database synchronization mode. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @returns { Promise } : devices sync status array, {string}: device id, {number}: device sync status. - * @throws { BusinessError } 401 - Parameter error. - * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. - * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 10 - */ - /** - * Sync data to cloud. - * - * @param { SyncMode } mode - indicates the database synchronization mode. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @returns { Promise } : devices sync status array, {string}: device id, {number}: device sync status. - * @throws { BusinessError } 401 - Parameter error. - * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. - * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 - */ - cloudSync(mode: SyncMode, progress: Callback): Promise; - - /** - * Sync data to cloud. - * - * @param { SyncMode } mode - indicates the database synchronization mode. - * @param { string[] } tables - indicates the database synchronization mode. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @param { AsyncCallback } callback - - * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. - * @throws { BusinessError } 401 - Parameter error. - * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. - * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. - * 5. The progress must be a callback type. 6. The callback must be a function. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 10 - */ - /** - * Sync data to cloud. - * - * @param { SyncMode } mode - indicates the database synchronization mode. - * @param { string[] } tables - indicates the database synchronization mode. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @param { AsyncCallback } callback - - * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. - * @throws { BusinessError } 401 - Parameter error. - * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. - * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. - * 5. The progress must be a callback type. 6. The callback must be a function. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 - */ - cloudSync( - mode: SyncMode, - tables: string[], - progress: Callback, - callback: AsyncCallback - ): void; - - /** - * Sync data to cloud. - * - * @param { SyncMode } mode - indicates the database synchronization mode. - * @param { string[] } tables - indicates the database synchronization mode. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @returns { Promise } : devices sync status array, {string}: device id, {number}: device sync status. - * @throws { BusinessError } 401 - Parameter error. - * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. - * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. - * 5. The progress must be a callback type. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 10 - */ - /** - * Sync data to cloud. - * - * @param { SyncMode } mode - indicates the database synchronization mode. - * @param { string[] } tables - indicates the database synchronization mode. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @returns { Promise } : devices sync status array, {string}: device id, {number}: device sync status. - * @throws { BusinessError } 401 - Parameter error. - * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. - * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. - * 5. The progress must be a callback type. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 - */ - cloudSync(mode: SyncMode, tables: string[], progress: Callback): Promise; - - /** - * Sync data to cloud. - * - * @param { SyncMode } mode - indicates the database synchronization mode. - * @param { RdbPredicates } predicates - - * The specified sync condition by the instance object of {@link RdbPredicates}. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @param { AsyncCallback } callback - The callback of cloudSync. - * @throws { BusinessError } 401 - Parameter error. - * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. - * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. - * 5. The progress must be a callback type. 6. The callback must be a function. - * @throws { BusinessError } 202 - - * if permission verification failed, application which is not a system application uses system API. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @systemapi - * @since 11 - */ - /** - * Sync data to cloud. - * - * @param { SyncMode } mode - indicates the database synchronization mode. - * @param { RdbPredicates } predicates - - * The specified sync condition by the instance object of {@link RdbPredicates}. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @param { AsyncCallback } callback - The callback of cloudSync. - * @throws { BusinessError } 202 - - * if permission verification failed, application which is not a system application uses system API. - * @throws { BusinessError } 401 - Parameter error. - * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. - * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. - * 5. The progress must be a callback type. 6. The callback must be a function. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @systemapi - * @since 12 - */ - cloudSync( - mode: SyncMode, - predicates: RdbPredicates, - progress: Callback, - callback: AsyncCallback - ): void; - - /** - * Sync data to cloud. - * - * @param { SyncMode } mode - indicates the database synchronization mode. - * @param { RdbPredicates } predicates - - * The specified sync condition by the instance object of {@link RdbPredicates}. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @returns { Promise } : The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. - * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. - * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. - * 5. The progress must be a callback type. - * @throws { BusinessError } 202 - if permission verification failed, application which is not a system - * application uses system API. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @systemapi - * @since 11 - */ - /** - * Sync data to cloud. - * - * @param { SyncMode } mode - indicates the database synchronization mode. - * @param { RdbPredicates } predicates - - * The specified sync condition by the instance object of {@link RdbPredicates}. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @returns { Promise } : The promise returned by the function. - * @throws { BusinessError } 202 - if permission verification failed, application which is not a system - * application uses system API. - * @throws { BusinessError } 401 - Parameter error. - * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. - * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. - * 5. The progress must be a callback type. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @systemapi - * @since 12 - */ - cloudSync(mode: SyncMode, predicates: RdbPredicates, progress: Callback): 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 { RdbPredicates } predicates - - * The specified remote remote query condition by the instance object of {@link RdbPredicates}. - * @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 ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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 { RdbPredicates } predicates - - * The specified remote remote query condition by the instance object of {@link RdbPredicates}. - * @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 ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - remoteQuery( - device: string, - table: string, - predicates: RdbPredicates, - 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 { RdbPredicates } predicates - - * The specified remote remote query condition by the instance object of {@link RdbPredicates}. - * @param { Array } columns - The columns to remote query. - * If the value is empty array, the remote query applies to all columns. - * @returns { Promise } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * 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 { RdbPredicates } predicates - - * The specified remote remote query condition by the instance object of {@link RdbPredicates}. - * @param { Array } columns - The columns to remote query. - * If the value is empty array, the remote query applies to all columns. - * @returns { Promise } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - remoteQuery(device: string, table: string, predicates: RdbPredicates, columns: Array): Promise; - - /** - * Subscribes to data changes of this RDB store. - * The registered callback will be called when data in a distributed RDB store changes. - * - * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. - * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. - * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. - * @param { Callback> } observer - - * {Array}: the observer of data change events in the distributed database. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Subscribes to data changes of this RDB store. - * The registered callback will be called when data in a distributed RDB store changes. - * the callback will be invoked. - * - * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. - * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. - * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. - * @param { Callback> } observer - - * {Array}: the observer of data change events in the distributed database. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - on(event: 'dataChange', type: SubscribeType, observer: Callback>): void; - - /** - * Subscribes to data changes of this RDB store. - * The registered callback will be called when data in a distributed RDB store changes. - * - * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. - * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. - * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. - * If its value is SUBSCRIBE_TYPE_LOCAL_DETAILS, - * the callback will be invoked for data changes in the local database. - * @param { Callback> | Callback> } observer - * {Array}: The observer of data change events in the distributed database. - * {Array}: The change info of data change events in the distributed database or the local database. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * Subscribes to data changes of this RDB store. - * The registered callback will be called when data in a distributed RDB store changes. - * - * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. - * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. - * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. - * @param { Callback> | Callback> } observer - * {Array}: The observer of data change events in the distributed database. - * {Array}: The change info of data change events in the distributed database. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - on(event: 'dataChange', type: SubscribeType, observer: Callback> | Callback>): void; - - /** - * Registers an observer for the database. - * - * @param { string } event - Event type, which must match the event type in {@link emit}. - * @param { boolean } interProcess - - * Indicates whether it is an interprocess subscription or an in-process subscription. - * @param { Callback } observer - The observer of data change events in the database. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * Registers an observer for the database. - * - * @param { string } event - Event type, which must match the event type in {@link emit}. - * @param { boolean } interProcess - - * Indicates whether it is an interprocess subscription or an in-process subscription. - * @param { Callback } observer - The observer of data change events in the database. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - on(event: string, interProcess: boolean, observer: Callback): void; - - /** - * Register an automatic synchronization callback to the database. - * - * @param { 'autoSyncProgress' } event - Indicates the event must be string 'autoSyncProgress'. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 2 - 3 parameter(s)! 2. The RdbStore must be valid. - * 3. The event must be a not empty string. 4. The progress must be function. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 11 - */ - /** - * Register an automatic synchronization callback to the database. - * - * @param { 'autoSyncProgress' } event - Indicates the event must be string 'autoSyncProgress'. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 2 - 3 parameter(s)! 2. The RdbStore must be valid. - * 3. The event must be a not empty string. 4. The progress must be function. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - on(event: 'autoSyncProgress', progress: Callback): void; - - /** - * Subscribes to the SQL statistics. - * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. - * @param { Callback } observer - - * Indicates the callback used to return the SQL execution statistics {@link SqlExeInfo} in the database. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - on(event: 'statistics', observer: Callback ): void; - - /** - * Subscribes to the SQL execution error logs. - * @param { 'sqliteErrorOccurred' } event - Event type, which must be 'sqliteErrorOccurred'. - * @param { Callback } observer - Callback used to return the SQL execution error log {@link ExceptionMessage}. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - on(event: 'sqliteErrorOccurred', observer: Callback ): void; - - /** - * Subscribes to the SQL performance statistics. - * @param { 'perfStat' } event - Event type, which must be 'perfStat'. - * @param { Callback } observer - Callback used to return the SQL execution statistics {@link SqlExecutionInfo}. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - on(event: 'perfStat', observer: Callback): void; - - /** - * Remove specified observer of specified type from the database. - * - * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. - * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. - * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. - * @param { Callback> } observer - {Array}: the data change observer already registered. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Remove specified observer of specified type from the database. - * - * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. - * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. - * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. - * @param { Callback> } observer - {Array}: the data change observer already registered. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - off(event: 'dataChange', type: SubscribeType, observer: Callback>): void; - - /** - * Remove specified observer of specified type from the database. - * - * @param { 'dataChange' } event - indicates the event must be string 'dataChange'. - * @param { SubscribeType } type - indicates the subscription type, which is defined in {@link SubscribeType}. - * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. - * @param { Callback> | Callback> } observer - - * {Array}: the data change observer already registered. - * {Array}: the change info already registered. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * Remove specified observer of specified type from the database. - * - * @param { 'dataChange' } event - indicates the event must be string 'dataChange'. - * @param { SubscribeType } type - indicates the subscription type, which is defined in {@link SubscribeType}. - * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. - * @param { Callback> | Callback> } observer - - * {Array}: the data change observer already registered. - * {Array}: the change info already registered. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - off( - event: 'dataChange', - type: SubscribeType, - observer?: Callback> | Callback> - ): void; - - /** - * Remove specified observer of specified type from the database. - * - * @param { string } event - Indicates the subscription event. - * @param { boolean } interProcess - - * Indicates whether it is an interprocess subscription or an in-process subscription. - * @param { Callback } observer - The data change observer already registered. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * Remove specified observer of specified type from the database. - * - * @param { string } event - Indicates the subscription event. - * @param { boolean } interProcess - - * Indicates whether it is an interprocess subscription or an in-process subscription. - * @param { Callback } observer - The data change observer already registered. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - off(event: string, interProcess: boolean, observer?: Callback): void; - - /** - * Unregister the database auto synchronization callback. - * - * @param { 'autoSyncProgress' } event - indicates the event must be string 'autoSyncProgress'. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be valid. - * 3. The event must be a not empty string. 4. The progress must be function. - * @throws { BusinessError } 801 - Capability not supported. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 11 - */ - /** - * Unregister the database auto synchronization callback. - * - * @param { 'autoSyncProgress' } event - indicates the event must be string 'autoSyncProgress'. - * @param { Callback } progress - - * Callback used to return the {@link ProgressDetails} result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be valid. - * 3. The event must be a not empty string. 4. The progress must be function. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - off(event: 'autoSyncProgress', progress?: Callback): void; - - /** - * Unsubscribes from the SQL statistics. - * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. - * @param { Callback } observer - Indicates the callback to unregister. - * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - off(event: 'statistics', observer?: Callback ): void; - - /** - * Unsubscribes from the SQL execution error logs. - * @param { 'sqliteErrorOccurred' } event - Indicates the event type, which must be 'sqliteErrorOccurred'. - * @param { Callback } observer - Callback to unregister. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - off(event: 'sqliteErrorOccurred', observer?: Callback ): void; - - /** - * Unsubscribes from the SQL performance statistics. - * @param { 'perfStat' } event - Event type, which must be 'perfStat'. - * @param { Callback } observer - Callback to unregister. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - off(event: 'perfStat', observer?: Callback): void; - - /** - * Notifies the registered observers of a change to the data resource specified by Uri. - * - * @param { string } event - Indicates the subscription event. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 - */ - /** - * Notifies the registered observers of a change to the data resource specified by Uri. - * - * @param { string } event - Indicates the subscription event. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - emit(event: string): void; - - /** - * Close the RdbStore and all resultSets. - * - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. - * @throws { BusinessError } 14800000 - Inner error. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - close(): Promise; - - /** - * Attaches a database file to the currently linked database. - * - * @param { string } fullPath - Indicates the path of the database file to attach. - * @param { string } attachName - Indicates the alias of the database. - * @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. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800016 - The database alias already exists. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - attach(fullPath: string, attachName: string, waitTime?: number) : Promise; - - /** - * Attaches a database file to the currently linked database. - * - * @param { Context } context - Indicates the context of an application or ability. - * @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 { 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. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800016 - The database alias already exists. - * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. - * @throws { BusinessError } 14801002 - Invalid data group ID. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - 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 { 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. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 - */ - detach(attachName: string, waitTime?: number) : Promise; - - /** - * Locks data from the database based on a specified instance object of RdbPredicates. - * - * @param { RdbPredicates } predicates - - * The specified lock condition by the instance object of {@link RdbPredicates}. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800018 - No data meets the condition. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - lockRow(predicates: RdbPredicates): Promise; - - /** - * Unlocks data from the database based on a specified instance object of RdbPredicates. - * - * @param { RdbPredicates } predicates - - * The specified Unlock condition by the instance object of {@link RdbPredicates}. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800018 - No data meets the condition. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - unlockRow(predicates: RdbPredicates): Promise; - - /** - * Queries locked 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 } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - queryLockedRow(predicates: RdbPredicates, columns?: Array): Promise; - - /** - * Lock cloud container before non-auto cloud sync. - * - * @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; - - /** - * Unlock cloud container. - * - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 202 - Permission verification failed, - * application which is not a system application uses system API. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @systemapi - * @since 12 - */ - unlockCloudContainer(): Promise; - - /** - * create a transaction instance and begin. - * - * @param { TransactionOptions } options - The option for creating transactions. - * @returns { Promise } The {@link Transaction} object if the operation is successful. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database is busy. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - createTransaction(options?: TransactionOptions): Promise; - - /** - * Changes the key used to encrypt the database. - * - * @param { CryptoParam } cryptoParam - Specifies the crypto parameters used to rekey. - * If valid cryptoParam passed, the cryptoParam is used to rekey. - * If cryptoParam is null or not passed, the default cryptoParam is used. - * @returns { Promise } - Promise that returns no value. - * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). - * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; - *
2. Missing GROUP BY clause. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800015 - The database does not respond. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - rekey(cryptoParam?: CryptoParam): Promise; - } - - /** - * Provides transactional methods for managing the relational database (RDB). - * - * @interface Transaction - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - interface Transaction { - /** - * commit the transaction. - * - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - commit(): Promise; - - /** - * rollback the transaction. - * - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - rollback(): Promise; - - /** - * Inserts a row of data into the target table. - * - * @param { string } table - Indicates the target table. - * @param { ValuesBucket } values - Indicates the row 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 row ID if the operation is successful. return -1 otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - insert(table: string, values: ValuesBucket, conflict?: ConflictResolution): Promise; - - /** - * Inserts a row of data into the target table with sync interface, just use in TaskPool or Worker. - * - * @param { string } table - Indicates the target table. - * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { number } The row ID if the operation is successful. return -1 otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - insertSync(table: string, values: ValuesBucket | sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; - - /** - * 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 } 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. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - batchInsert(table: string, values: Array): 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 { 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. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - batchInsertSync(table: string, values: Array): number; - - /** - * 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 { 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 -1 otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - batchInsertWithConflictResolution(table: string, values: Array, conflict: ConflictResolution): 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 { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @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. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 18 - */ - batchInsertWithConflictResolutionSync(table: string, values: Array, conflict: ConflictResolution): number; - - /** - * Updates data in the database based on a specified instance object of RdbPredicates. - * - * @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 { RdbPredicates } predicates - - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { Promise } The number of affected rows. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - update(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): Promise; - - /** - * Updates data in the database based on a specified instance object of RdbPredicates with sync interface. - * - * @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 { RdbPredicates } predicates - - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { number } The number of affected rows. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - updateSync(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): number; - - /** - * 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. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - delete(predicates: RdbPredicates): Promise; - - /** - * Deletes data from the database based on a specified instance object of RdbPredicates with sync interface. - * - * @param { RdbPredicates } predicates - - * The specified delete condition by the instance object of {@link RdbPredicates}. - * @returns { number } return the number of rows deleted. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - deleteSync(predicates: RdbPredicates): number; - - /** - * 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 } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - query(predicates: RdbPredicates, columns?: Array): Promise; - - /** - * Queries data in the database based on specified conditions with sync function. - * - * @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. - * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - querySync(predicates: RdbPredicates, columns?: Array): ResultSet; - - /** - * Queries data in the database based on SQL statement. - * - * @param { string } sql - Indicates the SQL statement to execute. - * @param { Array } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. - * The values are strings. - * @returns { Promise } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - querySql(sql: string, args?: Array): Promise; - - /** - * Queries data in the database based on SQL statement with sync interface. - * - * @param { string } sql - Indicates the SQL statement to execute. - * @param { Array } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. - * The values are strings. - * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - querySqlSync(sql: string, args?: Array): ResultSet; - - /** - * Executes a SQL statement that contains specified parameters and returns a value of ValueType. - * - * @param { string } sql - Indicates the SQL statement to execute. - * @param { Array } args - 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 14 - */ - execute(sql: string, args?: Array): Promise; - - /** - * Executes a SQL statement that contains specified parameters and returns a value of ValueType with sync interface. - * - * @param { string } sql - Indicates the SQL statement to execute. - * @param { Array } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. - * The values are strings. - * @returns { ValueType } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. - * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 14 - */ - executeSync(sql: string, args?: Array): ValueType; - } - - /** - * Obtains a RDB store. - * You can set parameters of the RDB store as required. In general, this method is recommended - * to obtain a rdb store. - * - * @param { Context } context - Indicates the context of an application or ability. - * @param { StoreConfig } config - - * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. - * @param { AsyncCallback } callback - The RDB store {@link RdbStore}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Obtains a RDB store. - * You can set parameters of the RDB store as required. In general, this method is recommended - * to obtain a rdb store. - * - * @param { Context } context - Indicates the context of an application or ability. - * @param { StoreConfig } config - - * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. - * @param { AsyncCallback } callback - The RDB store {@link RdbStore}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. - * @throws { BusinessError } 14801002 - Invalid data group ID. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains a RDB store. - * You can set parameters of the RDB store as required. In general, this method is recommended - * to obtain a rdb store. - * - * @param { Context } context - Indicates the context of an application or ability. - * @param { StoreConfig } config - - * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. - * @param { AsyncCallback } callback - The RDB store {@link RdbStore}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. - * @throws { BusinessError } 14801002 - Invalid data group ID. - * @throws { BusinessError } 14800017 - StoreConfig is changed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - /** - * Obtains a RDB store. - * You can set parameters of the RDB store as required. In general, this method is recommended - * to obtain a rdb store. - * - * @param { Context } context - Indicates the context of an application or ability. - * @param { StoreConfig } config - - * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. - * @param { AsyncCallback } callback - The RDB store {@link RdbStore}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. - * @throws { BusinessError } 14801002 - Invalid data group ID. - * @throws { BusinessError } 14800017 - StoreConfig is changed. - * @throws { BusinessError } 14800020 - The secret key is corrupted or lost. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback): void; - - /** - * Obtains a RDB store. - * You can set parameters of the RDB store as required. In general, this method is recommended - * to obtain a rdb store. - * - * @param { Context } context - Indicates the context of an application or ability. - * @param { StoreConfig } config - - * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. - * @returns { Promise } The RDB store {@link RdbStore}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Obtains a RDB store. - * You can set parameters of the RDB store as required. In general, this method is recommended - * to obtain a rdb store. - * - * @param { Context } context - Indicates the context of an application or ability. - * @param { StoreConfig } config - - * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. - * @returns { Promise } The RDB store {@link RdbStore}. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. - * @throws { BusinessError } 14801002 - Invalid data group ID. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Obtains a RDB store. - * You can set parameters of the RDB store as required. In general, this method is recommended - * to obtain a rdb store. - * - * @param { Context } context - Indicates the context of an application or ability. - * @param { StoreConfig } config - - * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. - * @returns { Promise } Promise used to return the **RdbStore** object obtained. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. - * @throws { BusinessError } 14801002 - Invalid data group ID. - * @throws { BusinessError } 14800017 - StoreConfig is changed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - /** - * Obtains a RDB store. - * You can set parameters of the RDB store as required. In general, this method is recommended - * to obtain a rdb store. - * - * @param { Context } context - Indicates the context of an application or ability. - * @param { StoreConfig } config - - * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. - * @returns { Promise } Promise used to return the **RdbStore** object obtained. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. - * @throws { BusinessError } 14801002 - Invalid data group ID. - * @throws { BusinessError } 14800017 - StoreConfig is changed. - * @throws { BusinessError } 14800020 - The secret key is corrupted or lost. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800029 - SQLite: The database is full. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function getRdbStore(context: Context, config: StoreConfig): Promise; - - /** - * Deletes the database with a specified name. - * When specify custom directory, this function should not be called. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the database name. - * @param { AsyncCallback } callback - The callback of deleteRdbStore. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Deletes the database with a specified name. - * When specify custom directory, this function should not be called. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the database name. - * @param { AsyncCallback } callback - The callback of deleteRdbStore. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - function deleteRdbStore(context: Context, name: string, callback: AsyncCallback): void; - - /** - * Deletes the database with a specified store config. - * When specify custom directory, this function should be called. - * - * @param { Context } context - Indicates the context of an application or ability. - * @param { StoreConfig } config - - * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. - * @param { AsyncCallback } callback - The callback of deleteRdbStore. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. - * @throws { BusinessError } 14801002 - Invalid data group ID. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - function deleteRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback): void; - - /** - * Deletes the database with a specified name. - * When specify custom directory, this function should not be called. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the database name. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 - */ - /** - * Deletes the database with a specified name. - * When specify custom directory, this function should not be called. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the database name. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes the database with a specified name. - * When specify custom directory, this function should not be called. - * - * @param { Context } context - Indicates the context of application or capability. - * @param { string } name - Indicates the database name. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - function deleteRdbStore(context: Context, name: string): Promise; - - /** - * Deletes the database with a specified store config. - * When specify custom directory, this function should be called. - * - * @param { Context } context - Indicates the context of an application or ability. - * @param { StoreConfig } config - - * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. - * @throws { BusinessError } 14801002 - Invalid data group ID. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 10 - */ - /** - * Deletes the database with a specified store config. - * When specify custom directory, this function should be called. - * - * @param { Context } context - Indicates the context of an application or ability. - * @param { StoreConfig } config - - * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800000 - Inner error. - * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. - * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. - * @throws { BusinessError } 14801002 - Invalid data group ID. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 12 - */ - function deleteRdbStore(context: Context, config: StoreConfig): Promise; - - /** - * Checks whether the vector database is supported. - * - * @returns { boolean } Returns {@code true} if the vector database is supported; returns {@code false} otherwise. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 18 - */ - function isVectorSupported(): boolean; - - /** - * check the {@link Tokenizer} tokenizer type is supported or not on current system. - * @param { tokenizer } type - Indicates Tokenizer which want to check. - * @returns { boolean } Returns {@code true} if the tokenizer is supported; returns {@code false} otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 18 - */ - function isTokenizerSupported(tokenizer: Tokenizer): boolean; - - /** - * Obtains an SQL statement used for inserting data. - * - * @param { string } table - Name of the target table. - * @param { ValuesBucket } values - Row of data {@link ValuesBucket} to be inserted into the table. - * @param { ConflictResolution } conflict - {@link ConflictResolution} to be used if conflicts occur. - * @returns { SqlInfo } - Returns an SQL insert statement including parameters. - * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; - *
2. Missing GROUP BY clause. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - function getInsertSqlInfo(table: string, values: ValuesBucket, conflict?: ConflictResolution):SqlInfo; - - /** - * Obtains an SQL statement used for updating data. - * - * @param { RdbPredicates } predicates - Conditions for updating data. For details, see {@link RdbPredicates}. - * @param { ValuesBucket } values - Row of data to be updated in the database. - * @param { ConflictResolution } conflict - {@link ConflictResolution} to be used if conflicts occur. - * @returns { SqlInfo } - Returns an SQL update statement including parameters. - * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; - *
2. Missing GROUP BY clause. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - function getUpdateSqlInfo(predicates: RdbPredicates, values: ValuesBucket, conflict?: ConflictResolution):SqlInfo; - - /** - * Obtains an SQL statement used for deleting data. - * - * @param { RdbPredicates } predicates - Conditions for deleting data. For details, see {@link RdbPredicates}. - * @returns { SqlInfo } - Returns an SQL delete statement including parameters. - * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; - *
2. Missing GROUP BY clause. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - function getDeleteSqlInfo(predicates: RdbPredicates):SqlInfo; - - /** - * Obtains an SQL statement used for querying data. - * - * @param { RdbPredicates } predicates - Conditions for querying data. For details, see {@link RdbPredicates}. - * @param { Array } columns - Columns to query. If this parameter is not specified, the query applies to all columns. - * @returns { SqlInfo } - Returns an SQL query statement including parameters. - * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; - *
2. Missing GROUP BY clause. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - function getQuerySqlInfo(predicates: RdbPredicates, columns?: Array):SqlInfo; -} - -export default relationalStore; +/* + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkData + */ + +import { AsyncCallback, Callback } from './@ohos.base'; +import Context from './application/BaseContext'; +import dataSharePredicates from './@ohos.data.dataSharePredicates'; +/*** if arkts 1.1 */ +import sendableRelationalStore from './@ohos.data.sendableRelationalStore'; +/*** endif */ +/** + * Provides methods for rdbStore create and delete. + * + * @namespace relationalStore + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ +/** + * Provides methods for rdbStore create and delete. + * + * @namespace relationalStore + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ +declare namespace relationalStore { + /** + * Describes the status of asset + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + enum AssetStatus { + /** + * ASSET_NORMAL: means the status of asset is normal. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ASSET_NORMAL, + + /** + * ASSET_ABNORMAL: means the asset needs to be inserted. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ASSET_INSERT, + + /** + * ASSET_ABNORMAL: means the asset needs to be updated. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ASSET_UPDATE, + + /** + * ASSET_ABNORMAL: means the asset needs to be deleted. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ASSET_DELETE, + + /** + * ASSET_ABNORMAL: means the status of asset is abnormal. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ASSET_ABNORMAL, + + /** + * ASSET_DOWNLOADING: means the status of asset is downloading. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ASSET_DOWNLOADING + } + + /** + * Records information of the asset. + * + * @interface Asset + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + interface Asset { + /** + * The name of asset. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + name: string; + + /** + * The uri of asset. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + uri: string; + + /** + * The path of asset. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + path: string; + + /** + * The create time of asset. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + createTime: string; + + /** + * The modify time of asset. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + modifyTime: string; + + /** + * The size of asset. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + size: string; + + /** + * The status of asset. + * + * @type { ?AssetStatus } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + status?: AssetStatus; + } + + /** + * Indicates several assets in one column + * + * @typedef { Asset[] } Assets + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + type Assets = Asset[]; + + /** + * Indicates possible value types + * + * @typedef { null | number | string | boolean | Uint8Array } ValueType + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Indicates possible value types + * + * @typedef { null | number | string | boolean | Uint8Array | Asset | Assets } ValueType + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Indicates possible value types + * + * @typedef { null | number | string | boolean | Uint8Array | Asset | Assets | Float32Array | bigint } ValueType + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + type ValueType = null | number | string | boolean | Uint8Array | Asset | Assets | Float32Array | bigint; + + /** + * Values in buckets are stored in key-value pairs + * + * @typedef { Record } ValuesBucket + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Values in buckets are stored in key-value pairs, move Uint8Array add to ValueType + * + * @typedef { Record } ValuesBucket + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Values in buckets are stored in key-value pairs, change {[key: string]: ValueType;} to Record + * + * @typedef { Record } ValuesBucket + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + type ValuesBucket = Record; + + /** + * The type of the priority key can be number or string + * + * @typedef { number | string } PRIKeyType + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + type PRIKeyType = number | string; + + /** + * The time is in UTC format. + * + * @typedef { Date } UTCTime + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + type UTCTime = Date; + + /** + * Indicates the primary key and UTC time of the modified rows. + * + * @typedef { Map } ModifyTime + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + type ModifyTime = Map; + + /** + * Manages relational database configurations. + * + * @interface StoreConfig + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Manages relational database configurations. + * + * @interface StoreConfig + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + interface StoreConfig { + /** + * The database name. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * The database name. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + name: string; + + /** + * Specifies the security level of the database. + * + * @type { SecurityLevel } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 + */ + securityLevel: SecurityLevel; + + /** + * Specifies whether the database is encrypted. + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 + */ + encrypt?: boolean; + + /** + * The data group id of application. + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @StageModelOnly + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + dataGroupId?: string; + + /** + * Specifies the directory relative to the database directory obtained from context + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + customDir?: string; + + /** + * Specifies the root directory relative to the database + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + rootDir?: string; + + /** + * Specifies whether to clean up dirty data that is synchronized to + * the local but deleted in the cloud. + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + autoCleanDirtyData?: boolean; + + /** + * Specifies whether data can be searched. + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + isSearchable?: boolean; + + /** + * Specifies whether database allows rebuild. + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + allowRebuild?: boolean; + + /** + * Specifies whether the vector type is supported. + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + vector?: boolean; + + /** + * Specifies whether the database opened is read-only. + * If isReadOnly is true, other configuration items will become invalid. + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + isReadOnly?: boolean; + + /** + * Indicates the names of the shared library containing fts etc. + * + * @type { ?Array } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + pluginLibs?: Array; + + /** + * Enumerates the high availability modes of the RDB store. + * + * @type { ?HAMode } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + haMode?: HAMode; + + /** + * Specifies the cryptographic parameters used when opening an encrypted database. + * + * @type { ?CryptoParam } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + cryptoParam?: CryptoParam; + + /** + * Specifies the tokenizer type when using fts capability. + * + * @type { ?Tokenizer } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 17 + */ + + tokenizer?: Tokenizer; + + /** + * Specifies whether the database need persistence. + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 18 + */ + + persist?: boolean; + + /** + * Specifies whether the database enable the capabilities for semantic indexing processing. + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 20 + */ + + enableSemanticIndex?: boolean; + } + + /** + * Enumerates the high availability modes of the RDB store. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + enum HAMode { + /** + * SINGLE: Data is written to a single RDB store. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SINGLE = 0, + + /** + * MAIN_REPLICA: Data is written to the main and replica RDB stores. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MAIN_REPLICA + } + + /** + * Specifies the cryptographic parameters used when opening an encrypted database. + * + * @typedef CryptoParam + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + interface CryptoParam { + /** + * Specifies the key used when opening an encrypted database. + * When finished passing the key to the database, its content should be set to all-zero. + * + * @type { Uint8Array } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + encryptionKey: Uint8Array; + + /** + * Specifies the number of KDF iterations used when opening an encrypted database. + * Default number is 10000. + * When the number is set to 0, use default iteration number and encryption algorithm. + * + * @type { ?number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + iterationCount?: number; + + /** + * Specifies the encryption algorithm when opening an encrypted database. + * Default encryption algorithm is AES_256_GCM. + * + * @type { ?EncryptionAlgo } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + encryptionAlgo?: EncryptionAlgo; + + /** + * Specifies the HMAC algorithm when opening an encrypted database. + * Default HMAC algorithm is SHA256. + * + * @type { ?HmacAlgo } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + hmacAlgo?: HmacAlgo; + + /** + * Specifies the KDF algorithm when opening an encrypted database. + * Default KDF SHA algorithm is the same as HMAC algorithm. + * + * @type { ?KdfAlgo } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + kdfAlgo?: KdfAlgo; + + /** + * Specifies the page size used when opening an encrypted database. + * Default crypto page size is 1024. + * + * @type { ?number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + cryptoPageSize?: number; + } + + /** + * Enumerates the supported encryption algorithm when opening a database. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + enum EncryptionAlgo { + /** + * AES_256_GCM: Database is encrypted using AES_256_GCM. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AES_256_GCM = 0, + + /** + * AES_256_CBC: Database is encrypted using AES_256_CBC. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AES_256_CBC + } + + /** + * Enumerates the supported HMAC algorithm when opening a database. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + enum HmacAlgo { + /** + * SHA1: HMAC_SHA1 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SHA1 = 0, + + /** + * SHA256: HMAC_SHA256 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SHA256, + + /** + * SHA512: HMAC_SHA512 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SHA512 + } + + /** + * Enumerates the supported KDF algorithm when opening a database. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + enum KdfAlgo { + /** + * KDF_SHA1: PBKDF2_HMAC_SHA1 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + KDF_SHA1 = 0, + + /** + * KDF_SHA256: PBKDF2_HMAC_SHA256 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + KDF_SHA256, + + /** + * KDF_SHA512: PBKDF2_HMAC_SHA512 algorithm. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + KDF_SHA512 + } + + /** + * Enumerates the supported tokenizer when opening a database. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 17 + */ + enum Tokenizer { + /** + * NONE_TOKENIZER: not use tokenizer + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 17 + */ + NONE_TOKENIZER = 0, + /** + * ICU_TOKENIZER: native icu tokenizer. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 17 + */ + ICU_TOKENIZER, + /** + * CUSTOM_TOKENIZER: self-developed enhance tokenizer. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 18 + */ + CUSTOM_TOKENIZER + } + + /** + * The cloud sync progress + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + enum Progress { + /** + * SYNC_BEGIN: means the sync process begin. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + SYNC_BEGIN, + + /** + * SYNC_BEGIN: means the sync process is in progress + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + SYNC_IN_PROGRESS, + + /** + * SYNC_BEGIN: means the sync process is finished + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + SYNC_FINISH + } + + /** + * Describes the statistic of the cloud sync process. + * + * @interface Statistic + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + interface Statistic { + /** + * Describes the total number of data to sync. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + total: number; + + /** + * Describes the number of successfully synced data. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + successful: number; + + /** + * Describes the number of data failed to sync. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + failed: number; + + /** + * Describes the number of data remained to sync. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + remained: number; + } + + /** + * Describes the {@code Statistic} details of the table. + * + * @interface TableDetails + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + interface TableDetails { + /** + * Describes the {@code Statistic} details of the upload process. + * + * @type { Statistic } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + upload: Statistic; + + /** + * Describes the {@code Statistic} details of the download process. + * + * @type { Statistic } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + download: Statistic; + } + + /** + * Describes the status of {@code Progress}. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + enum ProgressCode { + /** + * SUCCESS: means the status of progress is success. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + SUCCESS, + + /** + * UNKNOWN_ERROR: means the progress meets unknown error. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + UNKNOWN_ERROR, + + /** + * NETWORK_ERROR: means the progress meets network error. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + NETWORK_ERROR, + + /** + * CLOUD_DISABLED: means cloud is disabled. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + CLOUD_DISABLED, + + /** + * LOCKED_BY_OTHERS: means the progress is locked by others. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + LOCKED_BY_OTHERS, + + /** + * RECORD_LIMIT_EXCEEDED: means the record exceeds the limit. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + RECORD_LIMIT_EXCEEDED, + + /** + * NO_SPACE_FOR_ASSET: means the cloud has no space for the asset. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + NO_SPACE_FOR_ASSET, + + /** + * BLOCKED_BY_NETWORK_STRATEGY: means the sync blocked by network strategy. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + BLOCKED_BY_NETWORK_STRATEGY + } + + /** + * Describes detail of the cloud sync {@code Progress}. + * + * @interface ProgressDetails + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + interface ProgressDetails { + /** + * Describes the status of data sync progress. + * + * @type { Progress } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + schedule: Progress; + + /** + * Describes the code of data sync progress. + * + * @type { ProgressCode } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + code: ProgressCode; + + /** + * The statistic details of the tables. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * The statistic details of the tables. + * + * @type { Record } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 11 + */ + details: Record; + } + + /** + * Defines information about the SQL statements executed. + * + * @interface SqlExecutionInfo + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + interface SqlExecutionInfo { + /** + * Array of SQL statements executed. When the args of batchInsert is too large, there may be more than one SQL. + * + * @type { Array } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + sql: Array; + + /** + * Total time used for executing the SQL statements, in μs. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + totalTime: number; + + /** + * Maximum time allowed to obtain the SQL file handle, in μs. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + waitTime: number; + + /** + * Time used to prepare SQL and args, in μs. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + prepareTime: number; + + /** + * Time used to execute the SQL statements, in μs. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + executeTime: number; + } + + /** + * Defines an exception message. + * + * @interface ExceptionMessage + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + interface ExceptionMessage { + /** + * Error code returned by SQLite, see {@link https://www.sqlite.org/rescode.html}. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + code: number; + + /** + * Error message. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + message: string; + + /** + * SQL statement executed when the exception occurs. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + sql: string; + } + + /** + * Defines an SQL statement. + * + * @interface SqlInfo + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + interface SqlInfo { + /** + * SQL statement. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + sql: string; + + /** + * Parameters of the SQL statement. + * + * @type { Array } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + args: Array; + } + + /** + * Describes the {@code RdbStore} type. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 + */ + enum SecurityLevel { + /** + * S1: means the db is low level security + * There are some low impact, when the data is leaked. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 + */ + S1 = 1, + + /** + * S2: means the db is middle level security + * There are some major impact, when the data is leaked. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 + */ + S2 = 2, + + /** + * S3: means the db is high level security + * There are some severity impact, when the data is leaked. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 + */ + S3 = 3, + + /** + * S4: means the db is critical level security + * There are some critical impact, when the data is leaked. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 + */ + S4 = 4 + } + + /** + * Indicates the database synchronization mode. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + enum SyncMode { + /** + * Indicates the data is pushed to remote device from local device. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + SYNC_MODE_PUSH = 0, + + /** + * Indicates the data is pulled from remote device to local device. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + SYNC_MODE_PULL = 1, + + /** + * Indicates the data is pulled from remote device to local device. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 10 + */ + SYNC_MODE_TIME_FIRST, + + /** + * Indicates force push the native data to the cloud. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 10 + */ + SYNC_MODE_NATIVE_FIRST, + + /** + * Indicates the data is pulled from cloud to local device. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 10 + */ + SYNC_MODE_CLOUD_FIRST + } + + /** + * Describes the subscription type. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + enum SubscribeType { + /** + * Subscription to remote data changes + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + SUBSCRIBE_TYPE_REMOTE = 0, + + /** + * Subscription to cloud data changes + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 10 + */ + /** + * Subscription to cloud data changes + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 12 + */ + SUBSCRIBE_TYPE_CLOUD, + + /** + * Subscription to cloud data changes details + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 10 + */ + /** + * Subscription to cloud data changes details + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 12 + */ + SUBSCRIBE_TYPE_CLOUD_DETAILS, + + /** + * Subscription to local data changes details + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + SUBSCRIBE_TYPE_LOCAL_DETAILS + } + + /** + * Describes the change type. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + enum ChangeType { + /** + * Means the change type is data change. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * Means the change type is data change. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + DATA_CHANGE, + + /** + * Means the change type is asset change. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * Means the change type is asset change. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + ASSET_CHANGE + } + + /** + * Indicates the notify info + * + * @interface ChangeInfo + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + interface ChangeInfo { + /** + * Indicates the changed table + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + table: string; + + /** + * Indicates the changed type + * + * @type { ChangeType } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + type: ChangeType; + + /** + * 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 } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + 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 } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + 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 } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + deleted: Array | Array; + } + + /** + * Describes the distribution type of the tables. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + enum DistributedType { + /** + * Indicates the table is distributed among the devices + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + DISTRIBUTED_DEVICE, + + /** + * Indicates the table is distributed between the cloud and the devices. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 10 + */ + /** + * Indicates the table is distributed between the cloud and the devices. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 12 + */ + DISTRIBUTED_CLOUD + } + + /** + * Indicates the reference between tables. + * + * @interface Reference + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @since 11 + */ + interface Reference { + /** + * Indicates the table that references another table. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @since 11 + */ + sourceTable: string; + + /** + * Indicates the table to be referenced. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @since 11 + */ + targetTable: string; + + /** + * Indicates the reference fields. + * + * @type { Record } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @since 11 + */ + refFields: Record + } + + /** + * Manages the distributed configuration of the table. + * + * @interface DistributedConfig + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + interface DistributedConfig { + /** + * Specifies whether the database auto sync. + * + * @type { boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + autoSync: boolean; + + /** + * Specifies the reference relationships between tables. + * + * @type { ?Array } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @since 11 + */ + references?: Array; + + /** + * Specifies whether async download assets. + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 18 + */ + asyncDownloadAsset?: boolean; + + /** + * Specifies whether the cloud sync is enabled for the database. + * + * @type { ?boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 18 + */ + enableCloud?: boolean; + } + + /** + * Describes the conflict resolutions to insert data into the table. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + enum ConflictResolution { + /** + * Implements no action when conflict occurs. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + ON_CONFLICT_NONE = 0, + + /** + * Implements rollback operation when conflict occurs. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + ON_CONFLICT_ROLLBACK = 1, + + /** + * Implements abort operation when conflict occurs. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + ON_CONFLICT_ABORT = 2, + + /** + * Implements fail operation when conflict occurs. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + ON_CONFLICT_FAIL = 3, + + /** + * Implements ignore operation when conflict occurs. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + ON_CONFLICT_IGNORE = 4, + + /** + * Implements replace operation operator when conflict occurs. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + ON_CONFLICT_REPLACE = 5 + } + + /** + * Describes the data origin sources. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 11 + */ + enum Origin { + /** + * Indicates the data source is local. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 11 + */ + LOCAL, + + /** + * Indicates the data source is cloud. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 11 + */ + CLOUD, + + /** + * Indicates the data source is remote. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 11 + */ + REMOTE, + } + + /** + * Enumerates the field. + * + * @enum { string } + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 11 + */ + enum Field { + /** + * Cursor field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 11 + */ + CURSOR_FIELD = '#_cursor', + + /** + * Origin field. For details, see {@link Origin}. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 11 + */ + ORIGIN_FIELD = '#_origin', + + /** + * Deleted flag field. + * Indicates whether data has deleted in cloud. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 11 + */ + DELETED_FLAG_FIELD = '#_deleted_flag', + + /** + * Data status field. + * Indicates data status. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 12 + */ + DATA_STATUS_FIELD = '#_data_status', + + /** + * Owner field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 11 + */ + OWNER_FIELD = '#_cloud_owner', + + /** + * Privilege field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 11 + */ + PRIVILEGE_FIELD = '#_cloud_privilege', + + /** + * Sharing resource field. + * + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @crossplatform + * @since 11 + */ + SHARING_RESOURCE_FIELD = '#_sharing_resource_field' + } + + /** + * Enumerates the type of rebuild. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + enum RebuildType { + /** + * The database is not rebuilt or repaired. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + NONE, + + /** + * The database is rebuilt. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + REBUILT, + + /** + * The database is repaired. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + REPAIRED + } + + /** + * Enumerates the type of transaction. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ + enum TransactionType { + /** + * The DEFERRED transaction. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ + DEFERRED, + + /** + * The IMMEDIATE transaction. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ + IMMEDIATE, + + /** + * The EXCLUSIVE transaction. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ + EXCLUSIVE + } + + /** + * Create transaction options. + * + * @interface TransactionOptions + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ + interface TransactionOptions { + /** + * The type of transaction. + * + * @type { TransactionType } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 14 + */ + transactionType?: TransactionType; + } + + /** + * Enumerates the data types of a column. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + enum ColumnType { + /** + * The value in the column is null. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + NULL, + + /** + * The value in the column is a 64-bit integer. It can be used to hold an 8-bit (including Boolean values), 16-bit, + * 32-bit, or 64-bit integer.if the 64-bit integer is greater than 2^53 or less than -2^53, you can use getString + * to convert the 64-bit integer into a string. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + INTEGER, + + /** + * The value in the column is a floating point number. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + REAL, + + /** + * The value in the column is a string. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + TEXT, + + /** + * The value in the column is a Uint8Array. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + BLOB, + + /** + * The value in the column is an asset. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + ASSET, + + /** + * The value in the column is an array of assets. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + ASSETS, + + /** + * The value in the column is a Float32Array. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + FLOAT_VECTOR, + + /** + * The value in the column is a bigint. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + UNLIMITED_INT, + } + + /** + * Manages relational database configurations. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Manages relational database configurations. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + class RdbPredicates { + /** + * A parameterized constructor used to create a RdbPredicates instance. + * + * @param { string } name - Indicates the table name of the database. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * A parameterized constructor used to create a RdbPredicates instance. + * + * @param { string } name - Indicates the table name of the database. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + constructor(name: string); + + /** + * Specifies remote devices which connect to local device when syncing distributed database. + * When query database, this function should not be called. + * + * @param { Array } devices - Indicates specified remote devices. + * @returns { RdbPredicates } - The {@link RdbPredicates} self. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + inDevices(devices: Array): RdbPredicates; + + /** + * Specifies all remote devices which connect to local device when syncing distributed database. + * When query database, this function should not be called. + * + * @returns { RdbPredicates } - The {@link RdbPredicates} self. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + inAllDevices(): RdbPredicates; + + /** + * Configure the RdbPredicates to match the field whose data type is ValueType and value is equal + * to a specified value. + * 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. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure the RdbPredicates to match the field whose data type is ValueType and value is equal + * to a specified value. + * 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. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + equalTo(field: string, value: ValueType): RdbPredicates; + + /** + * Configure the RdbPredicates to match the field whose data type is ValueType and value is not equal to + * a specified value. + * 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. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure the RdbPredicates to match the field whose data type is ValueType and value is not equal to + * a specified value. + * 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. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + notEqualTo(field: string, value: ValueType): RdbPredicates; + + /** + * Adds a left parenthesis to the RdbPredicates. + * 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 9 + */ + /** + * Adds a left parenthesis to the RdbPredicates. + * 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 + * @crossplatform + * @since 10 + */ + beginWrap(): RdbPredicates; + + /** + * Adds a right parenthesis to the RdbPredicates. + * 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 9 + */ + /** + * Adds a right parenthesis to the RdbPredicates. + * 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 + * @crossplatform + * @since 10 + */ + endWrap(): RdbPredicates; + + /** + * Adds an or condition to the RdbPredicates. + * This method is similar to or of the SQL statement. + * + * @returns { RdbPredicates } - The {@link RdbPredicates} with the or condition. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Adds an or condition to the RdbPredicates. + * This method is similar to or of the SQL statement. + * + * @returns { RdbPredicates } - The {@link RdbPredicates} with the or condition. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + or(): RdbPredicates; + + /** + * Adds an and condition to the RdbPredicates. + * This method is similar to and of the SQL statement. + * + * @returns { RdbPredicates } - The {@link RdbPredicates} with the and condition. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Adds an and condition to the RdbPredicates. + * This method is similar to and of the SQL statement. + * + * @returns { RdbPredicates } - The {@link RdbPredicates} with the and condition. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + and(): RdbPredicates; + + /** + * Configure the RdbPredicates to match the field whose data type is string and value + * contains a specified value. + * This method is similar to contains of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. + * @returns { RdbPredicates } - The {@link RdbPredicates} self. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure the RdbPredicates to match the field whose data type is string and value + * contains a specified value. + * This method is similar to contains of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. + * @returns { RdbPredicates } - The {@link RdbPredicates} self. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + contains(field: string, value: string): RdbPredicates; + + /** + * Configure the RdbPredicates to match the field whose data type is string and value starts + * with a specified string. + * This method is similar to value% of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. + * @returns { RdbPredicates } - The {@link RdbPredicates} self. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure the RdbPredicates to match the field whose data type is string and value starts + * with a specified string. + * This method is similar to value% of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. + * @returns { RdbPredicates } - The {@link RdbPredicates} self. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + beginsWith(field: string, value: string): RdbPredicates; + + /** + * Configure the RdbPredicates to match the field whose data type is string and value + * ends with a specified string. + * This method is similar to %value of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. + * @returns { RdbPredicates } - The {@link RdbPredicates} self. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure the RdbPredicates to match the field whose data type is string and value + * ends with a specified string. + * This method is similar to %value of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. + * @returns { RdbPredicates } - The {@link RdbPredicates} self. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + endsWith(field: string, value: string): RdbPredicates; + + /** + * Configure the RdbPredicates to match the fields whose value is null. + * 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. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure the RdbPredicates to match the fields whose value is null. + * 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. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + isNull(field: string): RdbPredicates; + + /** + * Configure the RdbPredicates to match the specified fields whose value is not null. + * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure the RdbPredicates to match the specified fields whose value is not null. + * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + isNotNull(field: string): RdbPredicates; + + /** + * Configure the RdbPredicates to match the fields whose data type is string and value is + * similar to a specified string. + * This method is similar to like of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. + * @returns { RdbPredicates } - The {@link RdbPredicates} that match the specified field. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure the RdbPredicates to match the fields whose data type is string and value is + * similar to a specified string. + * This method is similar to like of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. + * @returns { RdbPredicates } - The {@link RdbPredicates} that match the specified field. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + like(field: string, value: string): RdbPredicates; + + /** + * Configure RdbPredicates to match the specified field whose data type is string and the value contains + * a wildcard. + * Different from like, the input parameters of this method are case-sensitive. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. + * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure RdbPredicates to match the specified field whose data type is string and the value contains + * a wildcard. + * Different from like, the input parameters of this method are case-sensitive. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. + * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + glob(field: string, value: string): RdbPredicates; + + /** + * Configure RdbPredicates to match the specified field whose value is within a given range. + * + * @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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure RdbPredicates to match the specified field whose value is within a given range. + * + * @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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + between(field: string, low: ValueType, high: ValueType): RdbPredicates; + + /** + * Configure RdbPredicates to match the specified field whose 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. + * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure RdbPredicates to match the specified field whose 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. + * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + 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 9 + */ + /** + * 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 + * @crossplatform + * @since 10 + */ + 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + limitAs(value: number): RdbPredicates; + + /** + * Configure RdbPredicates to specify the start position of the returned result. + * Use this method together with limit(number). + * + * @param { number } rowOffset - Indicates the start position of the returned result. + * The value is a positive integer. + * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure RdbPredicates to specify the start position of the returned result. + * Use this method together with limit(number). + * + * @param { number } rowOffset - Indicates the start position of the returned result. + * The value is a positive integer. + * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + offsetAs(rowOffset: number): RdbPredicates; + + /** + * Configure RdbPredicates to group query results by specified columns. + * + * @param { Array } fields - Indicates the specified columns by which query results are grouped. + * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure RdbPredicates to group query results by specified columns. + * + * @param { Array } fields - Indicates the specified columns by which query results are grouped. + * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + groupBy(fields: Array): RdbPredicates; + + /** + * Configure RdbPredicates to specify the index column. + * Before using this method, you need to create an index column. + * + * @param { string } field - Indicates the name of the index column. + * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure RdbPredicates to specify the index column. + * Before using this method, you need to create an index column. + * + * @param { string } field - Indicates the name of the index column. + * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + indexedBy(field: string): RdbPredicates; + + /** + * Configure RdbPredicates 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 RdbPredicates}. + * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure RdbPredicates 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 RdbPredicates}. + * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + in(field: string, value: Array): RdbPredicates; + + /** + * Configure RdbPredicates 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 RdbPredicates}. + * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Configure RdbPredicates 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 RdbPredicates}. + * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + notIn(field: string, value: Array): RdbPredicates; + + /** + * Sets the RdbPredicates to match the field whose data type is string and value + * does not contain the specified value. + * This method is similar to "Not like %value%" of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value that is not contained. + * @returns { RdbPredicates } - The {@Link RdbPredicates} set. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + notContains(field: string, value: string): RdbPredicates; + + /** + * Sets the RdbPredicates to match the field whose data type is string and value + * is not like the specified value. + * This method is similar to "Not like" of the SQL statement. + * + * @param { string } field - Indicates the column name in the database table. + * @param { string } value - Indicates the value to compare against. + * @returns { RdbPredicates } - The {@Link RdbPredicates} set. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + notLike(field: string, value: string): RdbPredicates; + + /** + * Filters the grouped data that meets the specified conditions. + * + * @param { string } conditions - Conditions used to filter the data obtained using GROUP BY. + * @param { Array } args - Parameters to be used in the conditions. + * @returns { RdbPredicates } - Returns the RdbPredicates object. + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; + *
2. Missing GROUP BY clause. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + having(conditions:string, args?: Array): RdbPredicates; + } + + /** + * Provides methods for accessing a database result set generated by querying the database. + * + * @interface ResultSet + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Provides methods for accessing a database result set generated by querying the database. + * + * @interface ResultSet + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + interface ResultSet { + /** + * Obtains the names of all columns in a result set. + * The column names are returned as a string array, in which the strings are in the same order + * as the columns in the result set. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Obtains the names of all columns in a result set. + * The column names are returned as a string array, in which the strings are in the same order + * as the columns in the result set. + * + * @type { Array } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + columnNames: Array; + + /** + * Obtains the number of columns in the result set. + * The returned number is equal to the length of the string array returned by the + * columnNames method. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Obtains the number of columns in the result set. + * The returned number is equal to the length of the string array returned by the + * columnNames method. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + columnCount: number; + + /** + * Obtains the number of rows in the result set. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Obtains the number of rows in the result set. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + rowCount: number; + + /** + * Obtains the current index of the result set. + * The result set index starts from 0. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Obtains the current index of the result set. + * The result set index starts from 0. + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + rowIndex: number; + + /** + * Checks whether the cursor is positioned at the first row. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Checks whether the cursor is positioned at the first row. + * + * @type { boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + isAtFirstRow: boolean; + + /** + * Checks whether the cursor is positioned at the last row. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Checks whether the cursor is positioned at the last row. + * + * @type { boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + isAtLastRow: boolean; + + /** + * Checks whether the cursor is positioned after the last row. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Checks whether the cursor is positioned after the last row. + * + * @type { boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + isEnded: boolean; + + /** + * Checks whether the cursor is positioned before the first row. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Checks whether the cursor is positioned before the first row. + * + * @type { boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + isStarted: boolean; + + /** + * Checks whether the current result set is closed. + * If the result set is closed by calling the close method, true will be returned. + * + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Checks whether the current result set is closed. + * If the result set is closed by calling the close method, true will be returned. + * + * @type { boolean } + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + isClosed: boolean; + + /** + * Obtains the column index based on the specified column name. + * The column name is passed as an input parameter. + * + * @param { string } columnName - Indicates the name of the specified column in the result set. + * @returns { number } The index of the specified column. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Obtains the column index based on the specified column name. + * The column name is passed as an input parameter. + * + * @param { string } columnName - Indicates the name of the specified column in the result set. + * @returns { number } The index of the specified column. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains the column index based on the specified column name. + * The column name is passed as an input parameter. + * + * @param { string } columnName - Indicates the name of the specified column in the result set. + * @returns { number } The index of the specified column. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800019 - The SQL must be a query statement. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + getColumnIndex(columnName: string): number; + + /** + * Obtains the column name based on the specified column index. + * The column index is passed as an input parameter. + * + * @param { number } columnIndex - Indicates the index of the specified column in the result set. + * @returns { string } The name of the specified column. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Obtains the column name based on the specified column index. + * The column index is passed as an input parameter. + * + * @param { number } columnIndex - Indicates the index of the specified column in the result set. + * @returns { string } The name of the specified column. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains the column name based on the specified column index. + * The column index is passed as an input parameter. + * + * @param { number } columnIndex - Indicates the index of the specified column in the result set. + * @returns { string } The name of the specified column. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800019 - The SQL must be a query statement. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + getColumnName(columnIndex: number): string; + + /** + * Obtains the column data type based on the specified column index. + * The column index is passed as an input parameter. + * + * @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; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800019 - The SQL must be a query statement. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + getColumnType(columnIdentifier: number | string): Promise; + + /** + * Obtains the column data type based on the specified column index. This API returns the result synchronously. + * + * @param { number | string } columnIdentifier - Index or name of the column. + * @returns { ColumnType } Column data type obtained. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800019 - The SQL must be a query statement. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + 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. + * A positive offset indicates moving backwards, and a negative offset indicates moving forwards. + * + * @param { number } offset - Indicates the offset relative to the current position. + * @returns { boolean } True if the result set is moved successfully and does not go beyond the range; + * Returns false otherwise. + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Go to the specified row of the result set forwards or backwards by an offset relative to its current position. + * A positive offset indicates moving backwards, and a negative offset indicates moving forwards. + * + * @param { number } offset - Indicates the offset relative to the current position. + * @returns { boolean } True if the result set is moved successfully and does not go beyond the range; + * Returns false otherwise. + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Go to the specified row of the result set forwards or backwards by an offset relative to its current position. + * A positive offset indicates moving backwards, and a negative offset indicates moving forwards. + * + * @param { number } offset - Indicates the offset relative to the current position. + * @returns { boolean } True if the result set is moved successfully and does not go beyond the range; + * Returns false otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800019 - The SQL must be a query statement. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + goTo(offset: number): boolean; + + /** + * Go to the specified row of the result set. + * + * @param { number } position - Indicates the index of the specified row, which starts from 0. + * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Go to the specified row of the result set. + * + * @param { number } position - Indicates the index of the specified row, which starts from 0. + * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Go to the specified row of the result set. + * + * @param { number } position - Indicates the index of the specified row, which starts from 0. + * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800019 - The SQL must be a query statement. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + goToRow(position: number): boolean; + + /** + * Go to the first row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; + * Returns false otherwise, for example, if the result set is empty. + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Go to the first row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; + * Returns false otherwise, for example, if the result set is empty. + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Go to the first row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; + * Returns false otherwise, for example, if the result set is empty. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800019 - The SQL must be a query statement. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + goToFirstRow(): boolean; + + /** + * Go to the last row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; + * Returns false otherwise, for example, if the result set is empty. + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Go to the last row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; + * Returns false otherwise, for example, if the result set is empty. + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Go to the last row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; + * Returns false otherwise, for example, if the result set is empty. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800019 - The SQL must be a query statement. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + goToLastRow(): boolean; + + /** + * Go to the next row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; + * Returns false otherwise, for example, if the result set is already in the last row. + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Go to the next row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; + * Returns false otherwise, for example, if the result set is already in the last row. + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Go to the next row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; + * Returns false otherwise, for example, if the result set is already in the last row. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800019 - The SQL must be a query statement. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + goToNextRow(): boolean; + + /** + * Go to the previous row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; + * Returns false otherwise, for example, if the result set is already in the first row. + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Go to the previous row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; + * Returns false otherwise, for example, if the result set is already in the first row. + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Go to the previous row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; + * Returns false otherwise, for example, if the result set is already in the first row. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800019 - The SQL must be a query statement. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + goToPreviousRow(): boolean; + + /** + * Obtains the value of the specified column in the current row as a byte array. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the Blob type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { Uint8Array } The value of the specified column as a byte array. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Obtains the value of the specified column in the current row as a byte array. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the Blob type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { Uint8Array } The value of the specified column as a byte array. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains the value of the specified column in the current row as a byte array. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the Blob type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { Uint8Array } The value of the specified column as a byte array. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + getBlob(columnIndex: number): Uint8Array; + + /** + * Obtains the value of the specified column in the current row as string. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the string type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { string } The value of the specified column as a string. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Obtains the value of the specified column in the current row as string. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the string type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { string } The value of the specified column as a string. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains the value of the specified column in the current row as string. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the string type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { string } The value of the specified column as a string. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + getString(columnIndex: number): string; + + /** + * Obtains the value of the specified column in the current row as long. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null, the specified column is not of the integer type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { number } The value of the specified column as a long. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Obtains the value of the specified column in the current row as long. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null, the specified column is not of the integer type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { number } The value of the specified column as a long. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains the value of the specified column in the current row as long. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null, the specified column is not of the integer type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { number } The value of the specified column as a long. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + getLong(columnIndex: number): number; + + /** + * Obtains the value of the specified column in the current row as double. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null, the specified column is not of the double type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { number } The value of the specified column as a double. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Obtains the value of the specified column in the current row as double. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null, the specified column is not of the double type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { number } The value of the specified column as a double. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains the value of the specified column in the current row as double. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null, the specified column is not of the double type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { number } The value of the specified column as a double. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + getDouble(columnIndex: number): number; + + /** + * Obtains the value of the specified column in the current row as an asset. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the Asset type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { Asset } The value of the specified column as an asset. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains the value of the specified column in the current row as an asset. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the Asset type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { Asset } The value of the specified column as an asset. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + getAsset(columnIndex: number): Asset; + + /** + * Obtains the value of the specified column in the current row as assets. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the Assets type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { Assets } The value of the specified column as assets. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains the value of the specified column in the current row as assets. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the Assets type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { Assets } The value of the specified column as assets. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + getAssets(columnIndex: number): Assets; + + /** + * Obtains the value of the specified column in the current row. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the Assets type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { ValueType } The value of the specified column. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + /** + * Obtains the value of the specified column in the current row. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the Assets type. + * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, + * the obtained value was null. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { ValueType } The value of the specified column. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + getValue(columnIndex: number): ValueType; + + /** + * Obtains the value of the specified column in the current row. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the Assets type. + * If the value of the specified column in the current row exceeds the value range of number, return a string type. + * Only for flutter + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { ValueType } The value of the specified column. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 20 + */ + getValueForFlutter(columnIndex: number): ValueType + + /** + * Obtains the value of the specified column in the current row as a float array. + * The implementation class determines whether to throw an exception if the value of the specified column + * in the current row is null or the specified column is not of the float array type. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { Float32Array } The value of the specified column as a float array. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - The capability is not supported because the database is not a vector DB. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @since 12 + */ + getFloat32Array(columnIndex: number): Float32Array; + + /** + * Obtains the values of all columns in the specified row. + * + * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 11 + */ + /** + * Obtains the values of all columns in the specified row. + * + * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + /** + * Obtains the values of all columns in the specified row. + * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, + * the obtained value was null. + * + * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + getRow(): ValuesBucket; + + /** + * Obtains the values of all columns in the specified row. + * If the value of a column in the current row exceeds the value range of number, return a string type. + * Only for flutter + * + * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + getRowForFlutter(): ValuesBucket + + /** + * Obtains the values of all columns in the specified rows. + * @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; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + getRows(maxCount: number, position?: number): Promise>; + + /** + * Obtains the values of all columns in the specified row. + * + * @returns { sendableRelationalStore.ValuesBucket } Indicates the row of data + * {@link sendableRelationalStore.ValuesBucket} to be inserted into the table. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + getSendableRow(): sendableRelationalStore.ValuesBucket; + + /** + * Checks whether the value of the specified column in the current row is null. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { boolean } True if the value of the specified column in the current row is null; + * Returns false otherwise. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Checks whether the value of the specified column in the current row is null. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { boolean } True if the value of the specified column in the current row is null; + * Returns false otherwise. + * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Checks whether the value of the specified column in the current row is null. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { boolean } True if the value of the specified column in the current row is null; + * Returns false otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + isColumnNull(columnIndex: number): boolean; + + /** + * Closes the result set. + * Calling this method on the result set will release all of its resources and makes it ineffective. + * + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Closes the result set. + * Calling this method on the result set will release all of its resources and makes it ineffective. + * + * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Closes the result set. + * Calling this method on the result set will release all of its resources and makes it ineffective. + * + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + close(): void; + } + + /** + * Provides methods for managing the relational database (RDB). + * This class provides methods for creating, querying, updating, and deleting RDBs. + * + * @interface RdbStore + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Provides methods for managing the relational database (RDB). + * This class provides methods for creating, querying, updating, and deleting RDBs. + * + * @interface RdbStore + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ + interface RdbStore { + /** + * Set RdbStore version. The version number must be an integer greater than 0. + * Obtains the RdbStore version. + * + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * Set RdbStore version. The version number must be an integer greater than 0. + * Obtains the RdbStore version. + * + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Set RdbStore version. The version number must be an integer greater than 0. + * Obtains the RdbStore version. + * + * @type { number } + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + version: number; + + /** + * Set whether the database is rebuilt. + * + * @type {RebuildType} + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + rebuilt: RebuildType; + + /** + * Inserts a row of data into the target table. + * + * @param { string } table - Indicates the target 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Inserts a row of data into the target table. + * + * @param { string } table - Indicates the target 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 } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Inserts a row of data into the target table. + * + * @param { string } table - Indicates the target 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + insert(table: string, values: ValuesBucket, callback: AsyncCallback): void; + + /** + * Inserts a row of data into the target table. + * + * @param { string } table - Indicates the target table. + * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @param { AsyncCallback } callback - The row ID if the operation is successful. returns -1 otherwise. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Inserts a row of data into the target table. + * + * @param { string } table - Indicates the target table. + * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @param { AsyncCallback } callback - The row ID 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. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + insert(table: string, values: ValuesBucket, conflict: ConflictResolution, callback: AsyncCallback): void; + + /** + * Inserts a row of data into the target table. + * + * @param { string } table - Indicates the target table. + * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @returns { Promise } The row ID if the operation is successful. return -1 otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Inserts a row of data into the target table. + * + * @param { string } table - Indicates the target table. + * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @returns { Promise } The row ID if the operation is successful. return -1 otherwise. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Inserts a row of data into the target table. + * + * @param { string } table - Indicates the target table. + * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @returns { Promise } The row ID if the operation is successful. return -1 otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + insert(table: string, values: ValuesBucket): Promise; + + /** + * Inserts a row of data into the target table. + * + * @param { string } table - Indicates the target table. + * @param { ValuesBucket } values - Indicates the row 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 row ID if the operation is successful. return -1 otherwise. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Inserts a row of data into the target table. + * + * @param { string } table - Indicates the target table. + * @param { ValuesBucket } values - Indicates the row 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 row ID if the operation is successful. return -1 otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + insert(table: string, values: ValuesBucket, conflict: ConflictResolution): Promise; + + /** + * Inserts a row of data into the target table with sync interface. + * + * @param { string } table - Indicates the target table. + * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @returns { number } The row ID if the operation is successful. return -1 otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + insertSync(table: string, values: ValuesBucket, conflict?: ConflictResolution): number; + + /** + * Inserts a row of data into the target table with sync interface. + * + * @param { string } table - Indicates the target table. + * @param { sendableRelationalStore.ValuesBucket } values - Indicates the row of data + * {@link sendableRelationalStore.ValuesBucket} to be inserted into the table. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @returns { number } The row ID if the operation is successful. return -1 otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + insertSync(table: string, values: sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; + + /** + * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @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. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + 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 } 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. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @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 } The number of values that were inserted if the operation is successful. + * returns -1 otherwise. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * 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 } 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. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + batchInsert(table: string, values: Array): 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 { 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. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + batchInsertSync(table: string, values: Array): number; + + /** + * 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 { 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 -1 otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + batchInsertWithConflictResolution(table: string, values: Array, conflict: ConflictResolution): 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 { 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. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + batchInsertWithConflictResolutionSync(table: string, values: Array, conflict: ConflictResolution): number; + + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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 { RdbPredicates } predicates - + * Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @param { AsyncCallback } callback - The number of affected rows. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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 { RdbPredicates } predicates - + * Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @param { AsyncCallback } callback - The number of affected rows. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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 { RdbPredicates } predicates - + * Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @param { AsyncCallback } callback - The number of affected rows. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback): void; + + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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 { RdbPredicates } predicates - + * Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @param { AsyncCallback } callback - The number of affected rows. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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 { RdbPredicates } predicates - + * Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @param { AsyncCallback } callback - The number of affected rows. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + update( + values: ValuesBucket, + predicates: RdbPredicates, + conflict: ConflictResolution, + callback: AsyncCallback + ): void; + + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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 { RdbPredicates } predicates - + * Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @returns { Promise } The number of affected rows. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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 { RdbPredicates } predicates - + * Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @returns { Promise } The number of affected rows. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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 { RdbPredicates } predicates - + * Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @returns { Promise } The number of affected rows. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + update(values: ValuesBucket, predicates: RdbPredicates): Promise; + + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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 { RdbPredicates } predicates - + * Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @returns { Promise } The number of affected rows. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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 { RdbPredicates } predicates - + * Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @returns { Promise } The number of affected rows. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise; + + /** + * Updates data in the database based on a specified instance object of RdbPredicates with sync interface. + * + * @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 { RdbPredicates } predicates - + * Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @returns { number } The number of affected rows. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + updateSync(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): number; + + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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.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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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.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 } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 10 + */ + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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.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 } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 12 + */ + update( + table: string, + values: ValuesBucket, + predicates: dataSharePredicates.DataSharePredicates, + callback: AsyncCallback + ): void; + + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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.DataSharePredicates } predicates - Indicates the specified update condition by + * the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @returns { Promise } The number of affected rows. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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.DataSharePredicates } predicates - Indicates the specified update condition by + * the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @returns { Promise } The number of affected rows. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 10 + */ + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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.DataSharePredicates } predicates - Indicates the specified update condition by + * the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @returns { Promise } The number of affected rows. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 12 + */ + update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): 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. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @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}. + * @param { AsyncCallback } callback - The number of affected rows. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * 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. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + 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 } The number of affected rows. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @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. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * 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. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + delete(predicates: RdbPredicates): Promise; + + /** + * Deletes data from the database based on a specified instance object of RdbPredicates with sync interface. + * + * @param { RdbPredicates } predicates - + * The specified delete condition by the instance object of {@link RdbPredicates}. + * @returns { number } return the number of rows deleted. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + deleteSync(predicates: RdbPredicates): number; + /** + * Deletes data from the database based on a specified instance object of RdbPredicates. + * + * @param { string } table - Indicates the target table. + * @param { dataSharePredicates.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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Deletes data from the database based on a specified instance object of RdbPredicates. + * + * @param { string } table - Indicates the target table. + * @param { dataSharePredicates.DataSharePredicates } predicates - + * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @param { AsyncCallback } callback - The number of affected rows. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 10 + */ + /** + * Deletes data from the database based on a specified instance object of RdbPredicates. + * + * @param { string } table - Indicates the target table. + * @param { dataSharePredicates.DataSharePredicates } predicates - + * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @param { AsyncCallback } callback - The number of affected rows. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + delete(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback): void; + + /** + * Deletes data from the database based on a specified instance object of RdbPredicates. + * + * @param { string } table - Indicates the target table. + * @param { dataSharePredicates.DataSharePredicates } predicates - + * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @returns { Promise } The number of affected rows. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * Deletes data from the database based on a specified instance object of RdbPredicates. + * + * @param { string } table - Indicates the target table. + * @param { dataSharePredicates.DataSharePredicates } predicates - + * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @returns { Promise } The number of affected rows. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 10 + */ + /** + * Deletes data from the database based on a specified instance object of RdbPredicates. + * + * @param { string } table - Indicates the target table. + * @param { dataSharePredicates.DataSharePredicates } predicates - + * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. + * @returns { Promise } The number of affected rows. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + delete(table: string, predicates: dataSharePredicates.DataSharePredicates): 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 { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Queries data in the database based on specified conditions. + * + * @param { RdbPredicates } predicates - + * The specified query condition by the instance object of {@link RdbPredicates}. + * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + query(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. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @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 empty array, the query applies to all columns. + * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * 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. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + 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 } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @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 } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * 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 } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + query(predicates: RdbPredicates, 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 { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 10 + */ + /** + * 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 { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 12 + */ + query(table: string, predicates: dataSharePredicates.DataSharePredicates, 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 empty array, the query applies to all columns. + * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * 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 ResultSet} object if the operation is successful. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 12 + */ + 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 } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 9 + */ + /** + * 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 } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @StageModelOnly + * @since 12 + */ + query( + table: string, + predicates: dataSharePredicates.DataSharePredicates, + columns?: Array + ): Promise; + + /** + * Queries data in the database based on specified conditions with sync function. + * + * @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. + * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + querySync(predicates: RdbPredicates, columns?: Array): ResultSet; + + /** + * Queries data in the database based on SQL statement. + * + * @param { string } sql - Indicates the SQL statement to execute. + * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Queries data in the database based on SQL statement. + * + * @param { string } sql - Indicates the SQL statement to execute. + * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + querySql(sql: string, callback: AsyncCallback): void; + + /** + * 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 ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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 ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * 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 ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + querySql(sql: string, bindArgs: Array, callback: AsyncCallback): void; + + /** + * 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. + * @returns { Promise } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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. + * @returns { Promise } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * 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. + * @returns { Promise } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + querySql(sql: string, bindArgs?: Array): Promise; + + /** + * Queries data in the database based on SQL statement with sync interface. + * + * @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 { ResultSet } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + querySqlSync(sql: string, bindArgs?: Array): ResultSet; + + /** + * Obtains the modify time of rows corresponding to the primary keys. + * + * @param { string } table - Indicates the name of the table to check. + * @param { string } columnName - Indicates the name of the column to check. + * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. + * @returns { Promise } - + * The promise returned by the function. ModifyTime indicates the modify time of current row. + * If this table does not support cloud, the {@link ModifyTime} will be empty. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. + * 5. The PRIKey must be number or string. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * Obtains the modify time of rows corresponding to the primary keys. + * + * @param { string } table - Indicates the name of the table to check. + * @param { string } columnName - Indicates the name of the column to check. + * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. + * @returns { Promise } - + * The promise returned by the function. ModifyTime indicates the modify time of current row. + * If this table does not support cloud, the {@link ModifyTime} will be empty. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. + * 5. The PRIKey must be number or string. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + getModifyTime(table: string, columnName: string, primaryKeys: PRIKeyType[]): Promise; + + /** + * Obtains the modify time of rows corresponding to the primary keys. + * + * @param { string } table - Indicates the name of the table to check. + * @param { string } columnName - Indicates the name of the column to check. + * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. + * @param { AsyncCallback } callback - + * The callback of getModifyTime. ModifyTime indicates the modify time of current row. + * If this table does not support cloud, the {@link ModifyTime} will be empty. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. + * 5. The PRIKey must be number or string. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * Obtains the modify time of rows corresponding to the primary keys. + * + * @param { string } table - Indicates the name of the table to check. + * @param { string } columnName - Indicates the name of the column to check. + * @param { PRIKeyType[] } primaryKeys - Indicates the primary keys of the rows to check. + * @param { AsyncCallback } callback - + * The callback of getModifyTime. ModifyTime indicates the modify time of current row. + * If this table does not support cloud, the {@link ModifyTime} will be empty. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 3 - 4 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The tablesNames must be not empty string. 4. The columnName must be not empty string. + * 5. The PRIKey must be number or string. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + getModifyTime( + table: string, + columnName: string, + primaryKeys: PRIKeyType[], + callback: AsyncCallback + ): void; + + /** + * Cleans the dirty data, which is the data deleted in the cloud. + * + * Data with a cursor smaller than the specified cursor will be cleaned up. + * + * @param { string } table - Indicates the name of the table to check. + * @param { number } cursor - Indicates the position of the data to be cleaned up. + * @param { AsyncCallback } callback - Indicates the callback invoked to return the result. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 11 + */ + /** + * Cleans the dirty data, which is the data deleted in the cloud. + * + * Data with a cursor smaller than the specified cursor will be cleaned up. + * + * @param { string } table - Indicates the name of the table to check. + * @param { number } cursor - Indicates the position of the data to be cleaned up. + * @param { AsyncCallback } callback - Indicates the callback invoked to return the result. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 12 + */ + cleanDirtyData(table: string, cursor: number, callback: AsyncCallback): void; + + /** + * Cleans all dirty data deleted in the cloud. + * + * @param { string } table - Indicates the name of the table to check. + * @param { AsyncCallback } callback - The callback of clean. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The tablesNames must be not empty string. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 11 + */ + /** + * Cleans all dirty data deleted in the cloud. + * + * @param { string } table - Indicates the name of the table to check. + * @param { AsyncCallback } callback - The callback of clean. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 1 - 3 parameter(s). 2. The RdbStore must be not nullptr. + * 3. The tablesNames must be not empty string. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 12 + */ + cleanDirtyData(table: string, callback: AsyncCallback): void; + + /** + * Cleans dirty data deleted in the cloud. + * + * If a cursor is specified, data with a cursor smaller than the specified cursor will be cleaned up. + * otherwise clean all. + * + * @param { string } table - Indicates the name of the table to check. + * @param { number } [cursor] - Indicates the cursor. + * @returns { Promise } -The promise returned by the function. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 11 + */ + /** + * Cleans dirty data deleted in the cloud. + * + * If a cursor is specified, data with a cursor smaller than the specified cursor will be cleaned up. + * otherwise clean all. + * + * @param { string } table - Indicates the name of the table to check. + * @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. + * 3. The tablesNames must be not empty string. 4. The cursor must be valid cursor. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 12 + */ + cleanDirtyData(table: string, cursor?: number): Promise; + + /** + * Obtains sharing resource of rows corresponding to the predicates. + * + * @param { RdbPredicates } predicates - + * The specified query condition by the instance object of {@link RdbPredicates}. + * @param { Array } [columns] - The specified columns to query. + * @returns { Promise } -The promise returned by the function. + * {@link ResultSet} is query result. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @systemapi + * @since 11 + */ + /** + * Obtains sharing resource of rows corresponding to the predicates. + * + * @param { RdbPredicates } predicates - + * The specified query condition by the instance object of {@link RdbPredicates}. + * @param { Array } [columns] - The specified columns to query. + * @returns { Promise } -The promise returned by the function. + * {@link ResultSet} is query result. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @systemapi + * @since 12 + */ + querySharingResource(predicates: RdbPredicates, columns?: Array): Promise; + + /** + * Obtains sharing resource of rows corresponding to the predicates. + * + * @param { RdbPredicates } predicates - + * The specified query condition by the instance object of {@link RdbPredicates}. + * @param { AsyncCallback } callback - The callback of querySharingResource. + * {@link ResultSet} is query result. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The predicates must be an RdbPredicates. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @systemapi + * @since 11 + */ + /** + * Obtains sharing resource of rows corresponding to the predicates. + * + * @param { RdbPredicates } predicates - + * The specified query condition by the instance object of {@link RdbPredicates}. + * @param { AsyncCallback } callback - The callback of querySharingResource. + * {@link ResultSet} is query result. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The predicates must be an RdbPredicates. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @systemapi + * @since 12 + */ + querySharingResource(predicates: RdbPredicates, callback: AsyncCallback): void; + + /** + * Obtains sharing resource of rows corresponding to the predicates. + * + * @param { RdbPredicates } predicates - + * The specified query condition by the instance object of {@link RdbPredicates}. + * @param { Array } columns - The specified columns to query. + * @param { AsyncCallback } callback - The callback of querySharingResource. + * {@link ResultSet} is query result. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @systemapi + * @since 11 + */ + /** + * Obtains sharing resource of rows corresponding to the predicates. + * + * @param { RdbPredicates } predicates - + * The specified query condition by the instance object of {@link RdbPredicates}. + * @param { Array } columns - The specified columns to query. + * @param { AsyncCallback } callback - The callback of querySharingResource. + * {@link ResultSet} is query result. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. + * 3. The predicates must be an RdbPredicates. 4. The columns must be a string array. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @systemapi + * @since 12 + */ + querySharingResource(predicates: RdbPredicates, columns: Array, callback: AsyncCallback): void; + + /** + * Executes a SQL statement that contains specified parameters but returns no value. + * + * @param { string } sql - Indicates the SQL statement to execute. + * @param { AsyncCallback } callback - The callback of executeSql. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Executes a SQL statement that contains specified parameters but returns no value. + * + * @param { string } sql - Indicates the SQL statement to execute. + * @param { AsyncCallback } callback - The callback of executeSql. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + executeSql(sql: string, callback: AsyncCallback): void; + + /** + * Executes a 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Executes a 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 } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Executes a 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + executeSql(sql: string, bindArgs: Array, callback: AsyncCallback): void; + + /** + * Executes a 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Executes a 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 } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Executes a 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + executeSql(sql: string, bindArgs?: Array): Promise; + + /** + * Executes a SQL statement that contains specified parameters and returns a value of ValueType. + * + * @param { string } sql - Indicates the SQL statement to execute. + * @param { Array } args - 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + execute(sql: string, args?: Array): Promise; + + /** + * Executes a SQL statement that contains specified parameters and returns a value of ValueType. + * + * @param { string } sql - Indicates the SQL statement to execute. + * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans or 0. + * @param { Array } args - 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + execute(sql: string, txId: number, args?: Array): Promise; + + /** + * Executes a SQL statement that contains specified parameters and returns a value of ValueType with sync interface. + * + * @param { string } sql - Indicates the SQL statement to execute. + * @param { Array } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. + * The values are strings. + * @returns { ValueType } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + executeSync(sql: string, args?: Array): ValueType; + + /** + * BeginTransaction before execute your sql. + * + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * BeginTransaction before execute your sql. + * + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * BeginTransaction before execute your sql. + * + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + beginTransaction(): void; + + /** + * Begins a transaction before executing the SQL statement. + * + * @returns { Promise } Returns the transaction ID. + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + beginTrans(): Promise; + + /** + * Commit the the sql you have executed. + * + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Commit the the sql you have executed. + * + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Commit the the sql you have executed. + * + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + commit(): void; + + /** + * Commits the SQL statement executed. + * + * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + commit(txId : number): Promise; + + /** + * Roll back the sql you have already executed. + * + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Roll back the sql you have already executed. + * + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Roll back the sql you have already executed. + * + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + rollBack(): void; + + /** + * Rolls back the SQL statement executed. + * + * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + rollback(txId : number): 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * 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 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + restore(srcName: string): Promise; + + /** + * Restores a database from a specified database file. + * + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @since 12 + */ + restore(): Promise; + + /** + * Set table to be distributed table. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { Array } tables - Indicates the table names you want to set. + * @param { AsyncCallback } callback - The callback of setDistributedTables. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Set table to be distributed table. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { Array } tables - Indicates the table names you want to set. + * @param { AsyncCallback } callback - The callback of setDistributedTables. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + setDistributedTables(tables: Array, callback: AsyncCallback): void; + + /** + * Set table to be distributed table. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { Array } tables - Indicates the table names you want to set. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Set table to be distributed table. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { Array } tables - Indicates the table names you want to set. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + setDistributedTables(tables: Array): Promise; + + /** + * Set table to be distributed table. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { Array } tables - Indicates the table names you want to set. + * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. + * This method only works when type equals to DistributedType.DISTRIBUTED_CLOUD + * @param { AsyncCallback } callback - The callback of setDistributedTables. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800051 - The type of the distributed table does not match. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * Set table to be distributed table. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { Array } tables - Indicates the table names you want to set. + * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. + * ohos.permission.DISTRIBUTED_DATASYNC is required only when type is DISTRIBUTED_DEVICE. + * @param { AsyncCallback } callback - The callback of setDistributedTables. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800051 - The type of the distributed table does not match. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + setDistributedTables(tables: Array, type: DistributedType, callback: AsyncCallback): void; + + /** + * Set table to be distributed table. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { Array } tables - Indicates the table names you want to set. + * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. + * This method only works when type equals to DistributedType.DISTRIBUTED_CLOUD + * @param { DistributedConfig } config - + * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. + * @param { AsyncCallback } callback - The callback of setDistributedTables. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800051 - The type of the distributed table does not match. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * Set table to be distributed table. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { Array } tables - Indicates the table names you want to set. + * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. + * ohos.permission.DISTRIBUTED_DATASYNC is required only when type is DISTRIBUTED_DEVICE. + * @param { DistributedConfig } config - + * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. + * @param { AsyncCallback } callback - The callback of setDistributedTables. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800051 - The type of the distributed table does not match. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + setDistributedTables( + tables: Array, + type: DistributedType, + config: DistributedConfig, + callback: AsyncCallback + ): void; + + /** + * Set table to be a distributed table. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { Array } tables - Indicates the table names you want to set. + * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. + * This method only works when type equals to DistributedType.DISTRIBUTED_CLOUD + * @param { DistributedConfig } config - + * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800051 - The type of the distributed table does not match. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * Set table to be a distributed table. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { Array } tables - Indicates the table names you want to set. + * @param { DistributedType } type - Indicates the distributed type {@link DistributedType}. + * ohos.permission.DISTRIBUTED_DATASYNC is required only when type is DISTRIBUTED_DEVICE. + * @param { DistributedConfig } config - + * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800051 - The type of the distributed table does not match. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + setDistributedTables(tables: Array, type?: DistributedType, config?: DistributedConfig): Promise; + + /** + * 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 { string } table - {string}: the distributed table name. + * @param { AsyncCallback } callback + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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 { string } table - {string}: the distributed table name. + * @param { AsyncCallback } callback + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + obtainDistributedTableName(device: string, table: string, callback: AsyncCallback): void; + + /** + * 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 { string } table + * @returns { Promise } {string}: the distributed table name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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 { string } table + * @returns { Promise } {string}: the distributed table name. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + obtainDistributedTableName(device: string, table: string): Promise; + + /** + * Sync data between devices. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { SyncMode } mode - Indicates the database synchronization mode. + * @param { RdbPredicates } predicates - + * The specified sync condition by the instance object of {@link RdbPredicates}. + * @param { AsyncCallback> } callback - + * {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 } 14800000 - Inner error. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Sync data between devices. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { SyncMode } mode - Indicates the database synchronization mode. + * @param { RdbPredicates } predicates - + * The specified sync condition by the instance object of {@link RdbPredicates}. + * @param { AsyncCallback> } callback - + * {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. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + sync(mode: SyncMode, predicates: RdbPredicates, callback: AsyncCallback>): void; + + /** + * Sync data between devices. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @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, 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 } 14800000 - Inner error. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Sync data between devices. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @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, 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. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + sync(mode: SyncMode, predicates: RdbPredicates): Promise>; + + /** + * Sync data to cloud. + * + * @param { SyncMode } mode - indicates the database synchronization mode. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @param { AsyncCallback } callback - + * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. + * @throws { BusinessError } 401 - Parameter error. + * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. + * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. + * 5. The callback must be a function. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 10 + */ + /** + * Sync data to cloud. + * + * @param { SyncMode } mode - indicates the database synchronization mode. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @param { AsyncCallback } callback - + * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. + * @throws { BusinessError } 401 - Parameter error. + * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. + * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. + * 5. The callback must be a function. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 12 + */ + cloudSync(mode: SyncMode, progress: Callback, callback: AsyncCallback): void; + + /** + * Sync data to cloud. + * + * @param { SyncMode } mode - indicates the database synchronization mode. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @returns { Promise } : devices sync status array, {string}: device id, {number}: device sync status. + * @throws { BusinessError } 401 - Parameter error. + * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. + * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 10 + */ + /** + * Sync data to cloud. + * + * @param { SyncMode } mode - indicates the database synchronization mode. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @returns { Promise } : devices sync status array, {string}: device id, {number}: device sync status. + * @throws { BusinessError } 401 - Parameter error. + * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. + * 3. The mode must be a SyncMode of cloud. 4. The progress must be a callback type. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 12 + */ + cloudSync(mode: SyncMode, progress: Callback): Promise; + + /** + * Sync data to cloud. + * + * @param { SyncMode } mode - indicates the database synchronization mode. + * @param { string[] } tables - indicates the database synchronization mode. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @param { AsyncCallback } callback - + * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. + * @throws { BusinessError } 401 - Parameter error. + * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. + * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. + * 5. The progress must be a callback type. 6. The callback must be a function. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 10 + */ + /** + * Sync data to cloud. + * + * @param { SyncMode } mode - indicates the database synchronization mode. + * @param { string[] } tables - indicates the database synchronization mode. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @param { AsyncCallback } callback - + * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. + * @throws { BusinessError } 401 - Parameter error. + * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. + * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. + * 5. The progress must be a callback type. 6. The callback must be a function. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 12 + */ + cloudSync( + mode: SyncMode, + tables: string[], + progress: Callback, + callback: AsyncCallback + ): void; + + /** + * Sync data to cloud. + * + * @param { SyncMode } mode - indicates the database synchronization mode. + * @param { string[] } tables - indicates the database synchronization mode. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @returns { Promise } : devices sync status array, {string}: device id, {number}: device sync status. + * @throws { BusinessError } 401 - Parameter error. + * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. + * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. + * 5. The progress must be a callback type. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 10 + */ + /** + * Sync data to cloud. + * + * @param { SyncMode } mode - indicates the database synchronization mode. + * @param { string[] } tables - indicates the database synchronization mode. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @returns { Promise } : devices sync status array, {string}: device id, {number}: device sync status. + * @throws { BusinessError } 401 - Parameter error. + * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. + * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. + * 5. The progress must be a callback type. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @since 12 + */ + cloudSync(mode: SyncMode, tables: string[], progress: Callback): Promise; + + /** + * Sync data to cloud. + * + * @param { SyncMode } mode - indicates the database synchronization mode. + * @param { RdbPredicates } predicates - + * The specified sync condition by the instance object of {@link RdbPredicates}. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @param { AsyncCallback } callback - The callback of cloudSync. + * @throws { BusinessError } 401 - Parameter error. + * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. + * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. + * 5. The progress must be a callback type. 6. The callback must be a function. + * @throws { BusinessError } 202 - + * if permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @systemapi + * @since 11 + */ + /** + * Sync data to cloud. + * + * @param { SyncMode } mode - indicates the database synchronization mode. + * @param { RdbPredicates } predicates - + * The specified sync condition by the instance object of {@link RdbPredicates}. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @param { AsyncCallback } callback - The callback of cloudSync. + * @throws { BusinessError } 202 - + * if permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. + * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. + * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. + * 5. The progress must be a callback type. 6. The callback must be a function. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @systemapi + * @since 12 + */ + cloudSync( + mode: SyncMode, + predicates: RdbPredicates, + progress: Callback, + callback: AsyncCallback + ): void; + + /** + * Sync data to cloud. + * + * @param { SyncMode } mode - indicates the database synchronization mode. + * @param { RdbPredicates } predicates - + * The specified sync condition by the instance object of {@link RdbPredicates}. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @returns { Promise } : The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. + * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. + * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. + * 5. The progress must be a callback type. + * @throws { BusinessError } 202 - if permission verification failed, application which is not a system + * application uses system API. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @systemapi + * @since 11 + */ + /** + * Sync data to cloud. + * + * @param { SyncMode } mode - indicates the database synchronization mode. + * @param { RdbPredicates } predicates - + * The specified sync condition by the instance object of {@link RdbPredicates}. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @returns { Promise } : The promise returned by the function. + * @throws { BusinessError } 202 - if permission verification failed, application which is not a system + * application uses system API. + * @throws { BusinessError } 401 - Parameter error. + * Possible causes: 1. Need 2 - 4 parameter(s). 2. The RdbStore must be not nullptr. + * 3. The mode must be a SyncMode of cloud. 4. The tablesNames must be not empty. + * 5. The progress must be a callback type. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.CloudSync.Client + * @systemapi + * @since 12 + */ + cloudSync(mode: SyncMode, predicates: RdbPredicates, progress: Callback): 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 { RdbPredicates } predicates - + * The specified remote remote query condition by the instance object of {@link RdbPredicates}. + * @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 ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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 { RdbPredicates } predicates - + * The specified remote remote query condition by the instance object of {@link RdbPredicates}. + * @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 ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + remoteQuery( + device: string, + table: string, + predicates: RdbPredicates, + 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 { RdbPredicates } predicates - + * The specified remote remote query condition by the instance object of {@link RdbPredicates}. + * @param { Array } columns - The columns to remote query. + * If the value is empty array, the remote query applies to all columns. + * @returns { Promise } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * 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 { RdbPredicates } predicates - + * The specified remote remote query condition by the instance object of {@link RdbPredicates}. + * @param { Array } columns - The columns to remote query. + * If the value is empty array, the remote query applies to all columns. + * @returns { Promise } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + remoteQuery(device: string, table: string, predicates: RdbPredicates, columns: Array): Promise; + + /** + * Subscribes to data changes of this RDB store. + * The registered callback will be called when data in a distributed RDB store changes. + * + * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. + * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. + * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. + * @param { Callback> } observer - + * {Array}: the observer of data change events in the distributed database. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Subscribes to data changes of this RDB store. + * The registered callback will be called when data in a distributed RDB store changes. + * the callback will be invoked. + * + * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. + * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. + * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. + * @param { Callback> } observer - + * {Array}: the observer of data change events in the distributed database. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + on(event: 'dataChange', type: SubscribeType, observer: Callback>): void; + + /** + * Subscribes to data changes of this RDB store. + * The registered callback will be called when data in a distributed RDB store changes. + * + * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. + * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. + * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. + * If its value is SUBSCRIBE_TYPE_LOCAL_DETAILS, + * the callback will be invoked for data changes in the local database. + * @param { Callback> | Callback> } observer + * {Array}: The observer of data change events in the distributed database. + * {Array}: The change info of data change events in the distributed database or the local database. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * Subscribes to data changes of this RDB store. + * The registered callback will be called when data in a distributed RDB store changes. + * + * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. + * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. + * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. + * @param { Callback> | Callback> } observer + * {Array}: The observer of data change events in the distributed database. + * {Array}: The change info of data change events in the distributed database. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + on(event: 'dataChange', type: SubscribeType, observer: Callback> | Callback>): void; + + /** + * Registers an observer for the database. + * + * @param { string } event - Event type, which must match the event type in {@link emit}. + * @param { boolean } interProcess - + * Indicates whether it is an interprocess subscription or an in-process subscription. + * @param { Callback } observer - The observer of data change events in the database. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * Registers an observer for the database. + * + * @param { string } event - Event type, which must match the event type in {@link emit}. + * @param { boolean } interProcess - + * Indicates whether it is an interprocess subscription or an in-process subscription. + * @param { Callback } observer - The observer of data change events in the database. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + on(event: string, interProcess: boolean, observer: Callback): void; + + /** + * Register an automatic synchronization callback to the database. + * + * @param { 'autoSyncProgress' } event - Indicates the event must be string 'autoSyncProgress'. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 2 - 3 parameter(s)! 2. The RdbStore must be valid. + * 3. The event must be a not empty string. 4. The progress must be function. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 11 + */ + /** + * Register an automatic synchronization callback to the database. + * + * @param { 'autoSyncProgress' } event - Indicates the event must be string 'autoSyncProgress'. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 2 - 3 parameter(s)! 2. The RdbStore must be valid. + * 3. The event must be a not empty string. 4. The progress must be function. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + on(event: 'autoSyncProgress', progress: Callback): void; + + /** + * Subscribes to the SQL statistics. + * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. + * @param { Callback } observer - + * Indicates the callback used to return the SQL execution statistics {@link SqlExeInfo} in the database. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + on(event: 'statistics', observer: Callback ): void; + + /** + * Subscribes to the SQL execution error logs. + * @param { 'sqliteErrorOccurred' } event - Event type, which must be 'sqliteErrorOccurred'. + * @param { Callback } observer - Callback used to return the SQL execution error log {@link ExceptionMessage}. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + on(event: 'sqliteErrorOccurred', observer: Callback ): void; + + /** + * Subscribes to the SQL performance statistics. + * @param { 'perfStat' } event - Event type, which must be 'perfStat'. + * @param { Callback } observer - Callback used to return the SQL execution statistics {@link SqlExecutionInfo}. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + on(event: 'perfStat', observer: Callback): void; + + /** + * Remove specified observer of specified type from the database. + * + * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. + * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. + * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. + * @param { Callback> } observer - {Array}: the data change observer already registered. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Remove specified observer of specified type from the database. + * + * @param { 'dataChange' } event - Indicates the event must be string 'dataChange'. + * @param { SubscribeType } type - Indicates the subscription type, which is defined in {@link SubscribeType}. + * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. + * @param { Callback> } observer - {Array}: the data change observer already registered. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + off(event: 'dataChange', type: SubscribeType, observer: Callback>): void; + + /** + * Remove specified observer of specified type from the database. + * + * @param { 'dataChange' } event - indicates the event must be string 'dataChange'. + * @param { SubscribeType } type - indicates the subscription type, which is defined in {@link SubscribeType}. + * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. + * @param { Callback> | Callback> } observer - + * {Array}: the data change observer already registered. + * {Array}: the change info already registered. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * Remove specified observer of specified type from the database. + * + * @param { 'dataChange' } event - indicates the event must be string 'dataChange'. + * @param { SubscribeType } type - indicates the subscription type, which is defined in {@link SubscribeType}. + * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. + * @param { Callback> | Callback> } observer - + * {Array}: the data change observer already registered. + * {Array}: the change info already registered. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + off( + event: 'dataChange', + type: SubscribeType, + observer?: Callback> | Callback> + ): void; + + /** + * Remove specified observer of specified type from the database. + * + * @param { string } event - Indicates the subscription event. + * @param { boolean } interProcess - + * Indicates whether it is an interprocess subscription or an in-process subscription. + * @param { Callback } observer - The data change observer already registered. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * Remove specified observer of specified type from the database. + * + * @param { string } event - Indicates the subscription event. + * @param { boolean } interProcess - + * Indicates whether it is an interprocess subscription or an in-process subscription. + * @param { Callback } observer - The data change observer already registered. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + off(event: string, interProcess: boolean, observer?: Callback): void; + + /** + * Unregister the database auto synchronization callback. + * + * @param { 'autoSyncProgress' } event - indicates the event must be string 'autoSyncProgress'. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be valid. + * 3. The event must be a not empty string. 4. The progress must be function. + * @throws { BusinessError } 801 - Capability not supported. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 11 + */ + /** + * Unregister the database auto synchronization callback. + * + * @param { 'autoSyncProgress' } event - indicates the event must be string 'autoSyncProgress'. + * @param { Callback } progress - + * Callback used to return the {@link ProgressDetails} result. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be valid. + * 3. The event must be a not empty string. 4. The progress must be function. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + off(event: 'autoSyncProgress', progress?: Callback): void; + + /** + * Unsubscribes from the SQL statistics. + * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. + * @param { Callback } observer - Indicates the callback to unregister. + * @throws { BusinessError } 401 - Parameter error. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + off(event: 'statistics', observer?: Callback ): void; + + /** + * Unsubscribes from the SQL execution error logs. + * @param { 'sqliteErrorOccurred' } event - Indicates the event type, which must be 'sqliteErrorOccurred'. + * @param { Callback } observer - Callback to unregister. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + off(event: 'sqliteErrorOccurred', observer?: Callback ): void; + + /** + * Unsubscribes from the SQL performance statistics. + * @param { 'perfStat' } event - Event type, which must be 'perfStat'. + * @param { Callback } observer - Callback to unregister. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + off(event: 'perfStat', observer?: Callback): void; + + /** + * Notifies the registered observers of a change to the data resource specified by Uri. + * + * @param { string } event - Indicates the subscription event. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 10 + */ + /** + * Notifies the registered observers of a change to the data resource specified by Uri. + * + * @param { string } event - Indicates the subscription event. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + emit(event: string): void; + + /** + * Close the RdbStore and all resultSets. + * + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 14800000 - Inner error. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + close(): Promise; + + /** + * Attaches a database file to the currently linked database. + * + * @param { string } fullPath - Indicates the path of the database file to attach. + * @param { string } attachName - Indicates the alias of the database. + * @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. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800016 - The database alias already exists. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + attach(fullPath: string, attachName: string, waitTime?: number) : Promise; + + /** + * Attaches a database file to the currently linked database. + * + * @param { Context } context - Indicates the context of an application or ability. + * @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 { 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. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800016 - The database alias already exists. + * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. + * @throws { BusinessError } 14801002 - Invalid data group ID. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + 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 { 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. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 12 + */ + detach(attachName: string, waitTime?: number) : Promise; + + /** + * Locks data from the database based on a specified instance object of RdbPredicates. + * + * @param { RdbPredicates } predicates - + * The specified lock condition by the instance object of {@link RdbPredicates}. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800018 - No data meets the condition. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + lockRow(predicates: RdbPredicates): Promise; + + /** + * Unlocks data from the database based on a specified instance object of RdbPredicates. + * + * @param { RdbPredicates } predicates - + * The specified Unlock condition by the instance object of {@link RdbPredicates}. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800018 - No data meets the condition. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + unlockRow(predicates: RdbPredicates): Promise; + + /** + * Queries locked 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 } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + queryLockedRow(predicates: RdbPredicates, columns?: Array): Promise; + + /** + * Lock cloud container before non-auto cloud sync. + * + * @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; + + /** + * Unlock cloud container. + * + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @systemapi + * @since 12 + */ + unlockCloudContainer(): Promise; + + /** + * create a transaction instance and begin. + * + * @param { TransactionOptions } options - The option for creating transactions. + * @returns { Promise } The {@link Transaction} object if the operation is successful. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database is busy. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + createTransaction(options?: TransactionOptions): Promise; + + /** + * Changes the key used to encrypt the database. + * + * @param { CryptoParam } cryptoParam - Specifies the crypto parameters used to rekey. + * If valid cryptoParam passed, the cryptoParam is used to rekey. + * If cryptoParam is null or not passed, the default cryptoParam is used. + * @returns { Promise } - Promise that returns no value. + * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; + *
2. Missing GROUP BY clause. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800015 - The database does not respond. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + rekey(cryptoParam?: CryptoParam): Promise; + } + + /** + * Provides transactional methods for managing the relational database (RDB). + * + * @interface Transaction + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + interface Transaction { + /** + * commit the transaction. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + commit(): Promise; + + /** + * rollback the transaction. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + rollback(): Promise; + + /** + * Inserts a row of data into the target table. + * + * @param { string } table - Indicates the target table. + * @param { ValuesBucket } values - Indicates the row 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 row ID if the operation is successful. return -1 otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + insert(table: string, values: ValuesBucket, conflict?: ConflictResolution): Promise; + + /** + * Inserts a row of data into the target table with sync interface, just use in TaskPool or Worker. + * + * @param { string } table - Indicates the target table. + * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @returns { number } The row ID if the operation is successful. return -1 otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + insertSync(table: string, values: ValuesBucket | sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; + + /** + * 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 } 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. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + batchInsert(table: string, values: Array): 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 { 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. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + batchInsertSync(table: string, values: Array): number; + + /** + * 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 { 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 -1 otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + batchInsertWithConflictResolution(table: string, values: Array, conflict: ConflictResolution): 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 { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @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. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800032 - SQLite: Abort due to constraint violation. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 18 + */ + batchInsertWithConflictResolutionSync(table: string, values: Array, conflict: ConflictResolution): number; + + /** + * Updates data in the database based on a specified instance object of RdbPredicates. + * + * @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 { RdbPredicates } predicates - + * Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @returns { Promise } The number of affected rows. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + update(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): Promise; + + /** + * Updates data in the database based on a specified instance object of RdbPredicates with sync interface. + * + * @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 { RdbPredicates } predicates - + * Indicates the specified update condition by the instance object of {@link RdbPredicates}. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @returns { number } The number of affected rows. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + updateSync(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): number; + + /** + * 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. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + delete(predicates: RdbPredicates): Promise; + + /** + * Deletes data from the database based on a specified instance object of RdbPredicates with sync interface. + * + * @param { RdbPredicates } predicates - + * The specified delete condition by the instance object of {@link RdbPredicates}. + * @returns { number } return the number of rows deleted. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + deleteSync(predicates: RdbPredicates): number; + + /** + * 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 } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + query(predicates: RdbPredicates, columns?: Array): Promise; + + /** + * Queries data in the database based on specified conditions with sync function. + * + * @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. + * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + querySync(predicates: RdbPredicates, columns?: Array): ResultSet; + + /** + * Queries data in the database based on SQL statement. + * + * @param { string } sql - Indicates the SQL statement to execute. + * @param { Array } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. + * The values are strings. + * @returns { Promise } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + querySql(sql: string, args?: Array): Promise; + + /** + * Queries data in the database based on SQL statement with sync interface. + * + * @param { string } sql - Indicates the SQL statement to execute. + * @param { Array } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. + * The values are strings. + * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + querySqlSync(sql: string, args?: Array): ResultSet; + + /** + * Executes a SQL statement that contains specified parameters and returns a value of ValueType. + * + * @param { string } sql - Indicates the SQL statement to execute. + * @param { Array } args - 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 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + execute(sql: string, args?: Array): Promise; + + /** + * Executes a SQL statement that contains specified parameters and returns a value of ValueType with sync interface. + * + * @param { string } sql - Indicates the SQL statement to execute. + * @param { Array } args - Indicates the {@link ValueType} values of the parameters in the SQL statement. + * The values are strings. + * @returns { ValueType } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 14 + */ + executeSync(sql: string, args?: Array): ValueType; + } + + /** + * Obtains a RDB store. + * You can set parameters of the RDB store as required. In general, this method is recommended + * to obtain a rdb store. + * + * @param { Context } context - Indicates the context of an application or ability. + * @param { StoreConfig } config - + * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. + * @param { AsyncCallback } callback - The RDB store {@link RdbStore}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Obtains a RDB store. + * You can set parameters of the RDB store as required. In general, this method is recommended + * to obtain a rdb store. + * + * @param { Context } context - Indicates the context of an application or ability. + * @param { StoreConfig } config - + * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. + * @param { AsyncCallback } callback - The RDB store {@link RdbStore}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. + * @throws { BusinessError } 14801002 - Invalid data group ID. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains a RDB store. + * You can set parameters of the RDB store as required. In general, this method is recommended + * to obtain a rdb store. + * + * @param { Context } context - Indicates the context of an application or ability. + * @param { StoreConfig } config - + * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. + * @param { AsyncCallback } callback - The RDB store {@link RdbStore}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. + * @throws { BusinessError } 14801002 - Invalid data group ID. + * @throws { BusinessError } 14800017 - StoreConfig is changed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + /** + * Obtains a RDB store. + * You can set parameters of the RDB store as required. In general, this method is recommended + * to obtain a rdb store. + * + * @param { Context } context - Indicates the context of an application or ability. + * @param { StoreConfig } config - + * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. + * @param { AsyncCallback } callback - The RDB store {@link RdbStore}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. + * @throws { BusinessError } 14801002 - Invalid data group ID. + * @throws { BusinessError } 14800017 - StoreConfig is changed. + * @throws { BusinessError } 14800020 - The secret key is corrupted or lost. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback): void; + + /** + * Obtains a RDB store. + * You can set parameters of the RDB store as required. In general, this method is recommended + * to obtain a rdb store. + * + * @param { Context } context - Indicates the context of an application or ability. + * @param { StoreConfig } config - + * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. + * @returns { Promise } The RDB store {@link RdbStore}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Obtains a RDB store. + * You can set parameters of the RDB store as required. In general, this method is recommended + * to obtain a rdb store. + * + * @param { Context } context - Indicates the context of an application or ability. + * @param { StoreConfig } config - + * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. + * @returns { Promise } The RDB store {@link RdbStore}. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. + * @throws { BusinessError } 14801002 - Invalid data group ID. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Obtains a RDB store. + * You can set parameters of the RDB store as required. In general, this method is recommended + * to obtain a rdb store. + * + * @param { Context } context - Indicates the context of an application or ability. + * @param { StoreConfig } config - + * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. + * @returns { Promise } Promise used to return the **RdbStore** object obtained. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. + * @throws { BusinessError } 14801002 - Invalid data group ID. + * @throws { BusinessError } 14800017 - StoreConfig is changed. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + /** + * Obtains a RDB store. + * You can set parameters of the RDB store as required. In general, this method is recommended + * to obtain a rdb store. + * + * @param { Context } context - Indicates the context of an application or ability. + * @param { StoreConfig } config - + * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. + * @returns { Promise } Promise used to return the **RdbStore** object obtained. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. + * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. + * @throws { BusinessError } 14801002 - Invalid data group ID. + * @throws { BusinessError } 14800017 - StoreConfig is changed. + * @throws { BusinessError } 14800020 - The secret key is corrupted or lost. + * @throws { BusinessError } 14800021 - SQLite: Generic error. + * Possible causes: Insert failed or the updated data does not exist. + * @throws { BusinessError } 14800022 - SQLite: Callback routine requested an abort. + * @throws { BusinessError } 14800023 - SQLite: Access permission denied. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function getRdbStore(context: Context, config: StoreConfig): Promise; + + /** + * Deletes the database with a specified name. + * When specify custom directory, this function should not be called. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the database name. + * @param { AsyncCallback } callback - The callback of deleteRdbStore. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Deletes the database with a specified name. + * When specify custom directory, this function should not be called. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the database name. + * @param { AsyncCallback } callback - The callback of deleteRdbStore. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + function deleteRdbStore(context: Context, name: string, callback: AsyncCallback): void; + + /** + * Deletes the database with a specified store config. + * When specify custom directory, this function should be called. + * + * @param { Context } context - Indicates the context of an application or ability. + * @param { StoreConfig } config - + * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. + * @param { AsyncCallback } callback - The callback of deleteRdbStore. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. + * @throws { BusinessError } 14801002 - Invalid data group ID. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + function deleteRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback): void; + + /** + * Deletes the database with a specified name. + * When specify custom directory, this function should not be called. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the database name. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 9 + */ + /** + * Deletes the database with a specified name. + * When specify custom directory, this function should not be called. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the database name. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes the database with a specified name. + * When specify custom directory, this function should not be called. + * + * @param { Context } context - Indicates the context of application or capability. + * @param { string } name - Indicates the database name. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + function deleteRdbStore(context: Context, name: string): Promise; + + /** + * Deletes the database with a specified store config. + * When specify custom directory, this function should be called. + * + * @param { Context } context - Indicates the context of an application or ability. + * @param { StoreConfig } config - + * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. + * @throws { BusinessError } 14801002 - Invalid data group ID. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 10 + */ + /** + * Deletes the database with a specified store config. + * When specify custom directory, this function should be called. + * + * @param { Context } context - Indicates the context of an application or ability. + * @param { StoreConfig } config - + * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. + * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. + * @throws { BusinessError } 14801002 - Invalid data group ID. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 12 + */ + function deleteRdbStore(context: Context, config: StoreConfig): Promise; + + /** + * Checks whether the vector database is supported. + * + * @returns { boolean } Returns {@code true} if the vector database is supported; returns {@code false} otherwise. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 18 + */ + function isVectorSupported(): boolean; + + /** + * check the {@link Tokenizer} tokenizer type is supported or not on current system. + * @param { tokenizer } type - Indicates Tokenizer which want to check. + * @returns { boolean } Returns {@code true} if the tokenizer is supported; returns {@code false} otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 18 + */ + function isTokenizerSupported(tokenizer: Tokenizer): boolean; + + /** + * Obtains an SQL statement used for inserting data. + * + * @param { string } table - Name of the target table. + * @param { ValuesBucket } values - Row of data {@link ValuesBucket} to be inserted into the table. + * @param { ConflictResolution } conflict - {@link ConflictResolution} to be used if conflicts occur. + * @returns { SqlInfo } - Returns an SQL insert statement including parameters. + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; + *
2. Missing GROUP BY clause. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + function getInsertSqlInfo(table: string, values: ValuesBucket, conflict?: ConflictResolution):SqlInfo; + + /** + * Obtains an SQL statement used for updating data. + * + * @param { RdbPredicates } predicates - Conditions for updating data. For details, see {@link RdbPredicates}. + * @param { ValuesBucket } values - Row of data to be updated in the database. + * @param { ConflictResolution } conflict - {@link ConflictResolution} to be used if conflicts occur. + * @returns { SqlInfo } - Returns an SQL update statement including parameters. + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; + *
2. Missing GROUP BY clause. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + function getUpdateSqlInfo(predicates: RdbPredicates, values: ValuesBucket, conflict?: ConflictResolution):SqlInfo; + + /** + * Obtains an SQL statement used for deleting data. + * + * @param { RdbPredicates } predicates - Conditions for deleting data. For details, see {@link RdbPredicates}. + * @returns { SqlInfo } - Returns an SQL delete statement including parameters. + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; + *
2. Missing GROUP BY clause. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + function getDeleteSqlInfo(predicates: RdbPredicates):SqlInfo; + + /** + * Obtains an SQL statement used for querying data. + * + * @param { RdbPredicates } predicates - Conditions for querying data. For details, see {@link RdbPredicates}. + * @param { Array } columns - Columns to query. If this parameter is not specified, the query applies to all columns. + * @returns { SqlInfo } - Returns an SQL query statement including parameters. + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; + *
2. Missing GROUP BY clause. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ + function getQuerySqlInfo(predicates: RdbPredicates, columns?: Array):SqlInfo; +} + +export default relationalStore; diff --git a/api/@ohos.data.uniformTypeDescriptor.d.ts b/api/@ohos.data.uniformTypeDescriptor.d.ts index 5d1d9c4a1c..86698a2ee1 100644 --- a/api/@ohos.data.uniformTypeDescriptor.d.ts +++ b/api/@ohos.data.uniformTypeDescriptor.d.ts @@ -1,2036 +1,2053 @@ -/* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkData - */ - -/** - * Provides methods for uniform data type definition and query. - * - * @namespace uniformTypeDescriptor - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ -/** - * Provides methods for uniform data type definition and query. - * - * @namespace uniformTypeDescriptor - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ -/** - * Provides methods for uniform data type definition and query. - * - * @namespace uniformTypeDescriptor - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ -declare namespace uniformTypeDescriptor { - /** - * Uniform data type IDs. - * - * @enum { string } - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Uniform data type IDs. - * - * @enum { string } - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * Uniform data type IDs. - * - * @enum { string } - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - enum UniformDataType { - /** - * Base data type for physical hierarchy, which identifies the physical representation of the data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ENTITY = 'general.entity', - - /** - * Base data type for logical hierarchy, which identifies the logical content representation of the data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OBJECT = 'general.object', - - /** - * Base data type for mixed object. For example, a PDF file contains both text and special formatting data. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - COMPOSITE_OBJECT = 'general.composite-object', - - /** - * Text data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Text data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * Text data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - TEXT = 'general.text', - - /** - * Plain text data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Plain text data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * Plain text data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - PLAIN_TEXT = 'general.plain-text', - - /** - * HTML data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * HTML data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * HTML data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - HTML = 'general.html', - - /** - * Hyperlink data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Hyperlink data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * Hyperlink data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - HYPERLINK = 'general.hyperlink', - - /** - * XML(Extensible Markup Language) data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - XML = 'general.xml', - - /** - * Xhtml data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - XHTML = 'general.xhtml', - - /** - * Rss data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - RSS = 'general.rss', - - /** - * Real synchronized multimedia integration language. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SMIL = 'com.real.smil', - - /** - * Source code data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SOURCE_CODE = 'general.source-code', - - /** - * Script data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SCRIPT = 'general.script', - - /** - * Shell script data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SHELL_SCRIPT = 'general.shell-script', - - /** - * C-shell script data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - CSH_SCRIPT = 'general.csh-script', - - /** - * Perl script data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - PERL_SCRIPT = 'general.perl-script', - - /** - * PHP script data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - PHP_SCRIPT = 'general.php-script', - - /** - * Python script data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - PYTHON_SCRIPT = 'general.python-script', - - /** - * Ruby script data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - RUBY_SCRIPT = 'general.ruby-script', - - /** - * TypeScript data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - TYPE_SCRIPT = 'general.type-script', - - /** - * JavaScript data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - JAVA_SCRIPT = 'general.java-script', - - /** - * Css data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - CSS = 'general.css', - - /** - * C header data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - C_HEADER = 'general.c-header', - - /** - * C source code data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - C_SOURCE = 'general.c-source', - - /** - * C++ header data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - C_PLUS_PLUS_HEADER = 'general.c-plus-plus-header', - - /** - * C++ source code data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - C_PLUS_PLUS_SOURCE = 'general.c-plus-plus-source', - - /** - * Java source code data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - JAVA_SOURCE = 'general.java-source', - - /** - * Tex source code data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - TEX = 'general.tex', - - /** - * Markdown format. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MARKDOWN = 'general.markdown', - - /** - * Asc text data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ASC_TEXT = 'general.asc-text', - - /** - * Rich text data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - RICH_TEXT = 'general.rich-text', - - /** - * Delimited values text data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - DELIMITED_VALUES_TEXT = 'general.delimited-values-text', - - /** - * Comma separated values text data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - COMMA_SEPARATED_VALUES_TEXT = 'general.comma-separated-values-text', - - /** - * Tab separated values text data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - TAB_SEPARATED_VALUES_TEXT = 'general.tab-separated-values-text', - - /** - * Ebook data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - EBOOK = 'general.ebook', - - /** - * EPUB ebook file format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - EPUB = 'general.epub', - - /** - * AZW ebook file format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - AZW = 'com.amazon.azw', - - /** - * AZW3 ebook file format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - AZW3 = 'com.amazon.azw3', - - /** - * KFX ebook file format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - KFX = 'com.amazon.kfx', - - /** - * MOBI ebook file format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MOBI = 'com.amazon.mobi', - - /** - * Media data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MEDIA = 'general.media', - - /** - * Image data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Image data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * Image data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - IMAGE = 'general.image', - - /** - * JPEG image format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - JPEG = 'general.jpeg', - - /** - * PNG image format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - PNG = 'general.png', - - /** - * Raw image format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - RAW_IMAGE = 'general.raw-image', - - /** - * TIFF image format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - TIFF = 'general.tiff', - - /** - * Windows bitmap image data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - BMP = 'com.microsoft.bmp', - - /** - * Windows icon data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ICO = 'com.microsoft.ico', - - /** - * Adobe Photoshop document data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - PHOTOSHOP_IMAGE = 'com.adobe.photoshop-image', - - /** - * Adobe Illustrator document data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - AI_IMAGE = 'com.adobe.illustrator.ai-image', - - /** - * Base type for fax images. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - FAX = 'general.fax', - - /** - * J2 jConnect fax file format. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - JFX_FAX = 'com.j2.jfx-fax', - - /** - * The electronic fax document format. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - EFX_FAX = 'com.js.efx-fax', - - /** - * X bitmap image. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - XBITMAP_IMAGE = 'general.xbitmap-image', - - /** - * Gif image format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - GIF = 'general.gif', - - /** - * Tagged Graphics (TGA), a type of image format. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - TGA_IMAGE = 'com.truevision.tga-image', - - /** - * Silicon Graphics image. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SGI_IMAGE = 'com.sgi.sgi-image', - - /** - * OpenEXR image. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENEXR_IMAGE = 'com.ilm.openexr-image', - - /** - * FlashPix image. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - FLASHPIX_IMAGE = 'com.kodak.flashpix.image', - - /** - * Microsoft Word data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - WORD_DOC = 'com.microsoft.word.doc', - - /** - * Microsoft Excel data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - EXCEL = 'com.microsoft.excel.xls', - - /** - * Microsoft PowerPoint presentation data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - PPT = 'com.microsoft.powerpoint.ppt', - - /** - * Microsoft Word dot data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - WORD_DOT = 'com.microsoft.word.dot', - - /** - * Microsoft Powerpoint pps data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - POWERPOINT_PPS = 'com.microsoft.powerpoint.pps', - - /** - * Microsoft Powerpoint pot data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - POWERPOINT_POT = 'com.microsoft.powerpoint.pot', - - /** - * Microsoft Excel xlt data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - EXCEL_XLT = 'com.microsoft.excel.xlt', - - /** - * Microsoft Visio vsd data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - VISIO_VSD = 'com.microsoft.visio.vsd', - - /** - * PDF data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - PDF = 'com.adobe.pdf', - - /** - * PostScript data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - POSTSCRIPT = 'com.adobe.postscript', - - /** - * Encapsulated PostScript data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ENCAPSULATED_POSTSCRIPT = 'com.adobe.encapsulated-postscript', - - /** - * Video data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Video data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * Video data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - VIDEO = 'general.video', - - /** - * AVI video format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - AVI = 'general.avi', - - /** - * MPEG video format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MPEG = 'general.mpeg', - - /** - * MPEG4 video format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MPEG4 = 'general.mpeg-4', - - /** - * 3GPP video format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - VIDEO_3GPP = 'general.3gpp', - - /** - * 3GPP2 video format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - VIDEO_3GPP2 = 'general.3gpp2', - - /** - * Ts video format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - TS = 'general.ts', - - /** - * Mpegurl video format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MPEGURL_VIDEO = 'general.mpegurl-video', - - /** - * Windows WM video format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - WINDOWS_MEDIA_WM = 'com.microsoft.windows-media-wm', - - /** - * Windows WMV video format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - WINDOWS_MEDIA_WMV = 'com.microsoft.windows-media-wmv', - - /** - * Windows WMP video format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - WINDOWS_MEDIA_WMP = 'com.microsoft.windows-media-wmp', - - /** - * Windows WVX video format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - WINDOWS_MEDIA_WVX = 'com.microsoft.windows-media-wvx', - - /** - * Windows WMX video format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - WINDOWS_MEDIA_WMX = 'com.microsoft.windows-media-wmx', - - /** - * RealMedia. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - REALMEDIA = 'com.real.realmedia', - - /** - * Matroska video format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MATROSKA_VIDEO = 'org.matroska.mkv', - - /** - * Flash data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - FLASH = 'com.adobe.flash', - - /** - * Audio data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Audio data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * Audio data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - AUDIO = 'general.audio', - - /** - * AAC audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - AAC = 'general.aac', - - /** - * AIFF audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - AIFF = 'general.aiff', - - /** - * ALAC audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ALAC = 'general.alac', - - /** - * FLAC audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - FLAC = 'general.flac', - - /** - * MP3 audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MP3 = 'general.mp3', - - /** - * OGG audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OGG = 'general.ogg', - - /** - * PCM audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - PCM = 'general.pcm', - - /** - * Windows WMA audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - WINDOWS_MEDIA_WMA = 'com.microsoft.windows-media-wma', - - /** - * Waveform audio format data type created by Microsoft. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - WAVEFORM_AUDIO = 'com.microsoft.waveform-audio', - - /** - * Windows WAX audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - WINDOWS_MEDIA_WAX = 'com.microsoft.windows-media-wax', - - /** - * Au file format. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - AU_AUDIO = 'general.au-audio', - - /** - * Audio Interchange File Format. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - AIFC_AUDIO = 'general.aifc-audio', - - /** - * Mpegurl audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MPEGURL_AUDIO = 'general.mpegurl-audio', - - /** - * Mpeg-4 audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MPEG_4_AUDIO = 'general.mpeg-4-audio', - - /** - * Mp2 audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MP2 = 'general.mp2', - - /** - * MPEG audio format. This type belongs to AUDIO. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MPEG_AUDIO = 'general.mpeg-audio', - - /** - * Ulaw audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ULAW_AUDIO = 'general.ulaw-audio', - - /** - * Digidesign Sound Designer II audio. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SD2_AUDIO = 'com.digidesign.sd2-audio', - - /** - * RealMedia audio. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - REALAUDIO = 'com.real.realaudio', - - /** - * Matroska audio format data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MATROSKA_AUDIO = 'org.matroska.mka', - - /** - * File data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * File data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * File data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - FILE = 'general.file', - - /** - * Directory data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - DIRECTORY = 'general.directory', - - /** - * Folder data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Folder data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * Folder data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - FOLDER = 'general.folder', - - /** - * Symlink data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SYMLINK = 'general.symlink', - - /** - * Archive file data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ARCHIVE = 'general.archive', - - /** - * Bzip2 archive file data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - BZ2_ARCHIVE = 'general.bz2-archive', - - /** - * Opg archive data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPG = 'general.opg', - - /** - * Taz archive data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - TAZ_ARCHIVE = 'general.taz-archive', - - /** - * Web archive data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - WEB_ARCHIVE = 'general.web-archive', - - /** - * Disk image archive file data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - DISK_IMAGE = 'general.disk-image', - - /** - * Iso data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ISO = 'general.iso', - - /** - * Tar archive data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - TAR_ARCHIVE = 'general.tar-archive', - - /** - * Zip archive data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ZIP_ARCHIVE = 'general.zip-archive', - - /** - * Java archive data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - JAVA_ARCHIVE = 'com.sun.java-archive', - - /** - * GNU. This type belongs to ARCHIVE. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - GNU_TAR_ARCHIVE = 'org.gnu.gnu-tar-archive', - - /** - * Gzip archive data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - GNU_ZIP_ARCHIVE = 'org.gnu.gnu-zip-archive', - - /** - * Gzip tar archive data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - GNU_ZIP_TAR_ARCHIVE = 'org.gnu.gnu-zip-tar-archive', - - /** - * Office Open XML. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENXML = 'org.openxmlformats.openxml', - - /** - * Office Open XML Document. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - WORDPROCESSINGML_DOCUMENT = 'org.openxmlformats.wordprocessingml.document', - - /** - * Office Open XML Workbook. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SPREADSHEETML_SHEET = 'org.openxmlformats.spreadsheetml.sheet', - - /** - * Office Open XML Presentation. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - PRESENTATIONML_PRESENTATION = 'org.openxmlformats.presentationml.presentation', - - /** - * Office Open XML Drawingml visio. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - DRAWINGML_VISIO = 'org.openxmlformats.drawingml.visio', - - /** - * Office Open XML Drawingml template. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - DRAWINGML_TEMPLATE = 'org.openxmlformats.drawingml.template', - - /** - * Office Open XML Wordprocessingml template. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - WORDPROCESSINGML_TEMPLATE = 'org.openxmlformats.wordprocessingml.template', - - /** - * Office Open XML Presentationml template. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - PRESENTATIONML_TEMPLATE = 'org.openxmlformats.presentationml.template', - - /** - * Office Open XML Presentationml slideshow. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - PRESENTATIONML_SLIDESHOW = 'org.openxmlformats.presentationml.slideshow', - - /** - * Office Open XML Spreadsheetml template. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SPREADSHEETML_TEMPLATE = 'org.openxmlformats.spreadsheetml.template', - - /** - * Open Document Format for Office Applications. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENDOCUMENT = 'org.oasis.opendocument', - - /** - * OpenDocument Text. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENDOCUMENT_TEXT = 'org.oasis.opendocument.text', - - /** - * OpenDocument Spreadsheet. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENDOCUMENT_SPREADSHEET = 'org.oasis.opendocument.spreadsheet', - - /** - * OpenDocument Presentation. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENDOCUMENT_PRESENTATION = 'org.oasis.opendocument.presentation', - - /** - * OpenDocument Graphics. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENDOCUMENT_GRAPHICS = 'org.oasis.opendocument.graphics', - - /** - * OpenDocument Formulat. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENDOCUMENT_FORMULA = 'org.oasis.opendocument.formula', - - /** - * Stuffit archive. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - STUFFIT_ARCHIVE = 'com.allume.stuffit-archive', - - /** - * Rar archive. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - RAR_ARCHIVE = 'com.rarlab.rar-archive', - - /** - * 7-zip archive. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SEVEN_ZIP_ARCHIVE = 'org.7-zip.7-zip-archive', - - /** - * Calendar data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - CALENDAR = 'general.calendar', - - /** - * VCalendar type, a type of calendar format. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - VCS = 'general.vcs', - - /** - * ICalendar type, a type of calendar format. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - ICS = 'general.ics', - - /** - * Contact data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - CONTACT = 'general.contact', - - /** - * Database data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - DATABASE = 'general.database', - - /** - * Message data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - MESSAGE = 'general.message', - - /** - * Base type for executable data. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - EXECUTABLE = 'general.executable', - - /** - * Microsoft Windows application. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - PORTABLE_EXECUTABLE = 'com.microsoft.portable-executable', - - /** - * Java class. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - SUN_JAVA_CLASS = 'com.sun.java-class', - - /** - * A file format data type stand for electronic business card. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - VCARD = 'general.vcard', - - /** - * Navigation data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - NAVIGATION = 'general.navigation', - - /** - * Location data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - LOCATION = 'general.location', - - /** - * Base type for fonts. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - FONT = 'general.font', - - /** - * TrueType font. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - TRUETYPE_FONT = 'general.truetype-font', - - /** - * TrueType collection font. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - TRUETYPE_COLLECTION_FONT = 'general.truetype-collection-font', - - /** - * OpenType font. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENTYPE_FONT = 'general.opentype-font', - - /** - * PostScript font. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - POSTSCRIPT_FONT = 'com.adobe.postscript-font', - - /** - * A Printer Font Binary version of Adobe's Type 1. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - POSTSCRIPT_PFB_FONT = 'com.adobe.postscript-pfb-font', - - /** - * Adobe Type 1 font. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - POSTSCRIPT_PFA_FONT = 'com.adobe.postscript-pfa-font', - - /** - * OpenHarmony system defined form data type(the data is provided and bound to OpenHarmony system). - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * OpenHarmony system defined form data type(the data is provided and bound to OpenHarmony system). - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENHARMONY_FORM = 'openharmony.form', - - /** - * OpenHarmony system defined app item data type(the data is provided and bound to OpenHarmony system). - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * OpenHarmony system defined app item data type(the data is provided and bound to OpenHarmony system). - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENHARMONY_APP_ITEM = 'openharmony.app-item', - - /** - * OpenHarmony system defined pixel map data type(the data is provided and bound to OpenHarmony system). - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * OpenHarmony system defined pixel map data type(the data is provided and bound to OpenHarmony system). - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * OpenHarmony system defined pixel map data type(the data is provided and bound to OpenHarmony system). - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENHARMONY_PIXEL_MAP = 'openharmony.pixel-map', - - /** - * OpenHarmony system defined atomic service data type(the data is provided and bound to OpenHarmony system). - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENHARMONY_ATOMIC_SERVICE = 'openharmony.atomic-service', - - /** - * OpenHarmony system defined package, which is a directory presented to the user as a file(the data is provided - *
and bound to OpenHarmony system). - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENHARMONY_PACKAGE = 'openharmony.package', - - /** - * OpenHarmony system defined ability package(the data is provided and bound to OpenHarmony system). - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENHARMONY_HAP = 'openharmony.hap', - - /** - * OpenHarmony system AppNotepad data format. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENHARMONY_HDOC = 'openharmony.hdoc', - - /** - * OpenHarmony system Notes data format. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENHARMONY_HINOTE = 'openharmony.hinote', - - /** - * OpenHarmony system defined styled string. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENHARMONY_STYLED_STRING = 'openharmony.styled-string', - - /** - * OpenHarmony system defined Want. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OPENHARMONY_WANT = 'openharmony.want', - - /** - * Ofd data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OFD = 'general.ofd', - - /** - * Cad data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - CAD = 'general.cad', - - /** - * Octet stream data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - OCTET_STREAM = 'general.octet-stream', - - /** - * File uri data type. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 - */ - FILE_URI = 'general.file-uri', - - /** - * Content widget type. This type belongs to OBJECT. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 - */ - CONTENT_FORM = 'general.content-form' - } - - /** - * Class describing the uniform data type defined in the {@code UniformDataType}, which consists of attributes and - *
methods describing the uniform data type and its relationships to other uniform data types. - * - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 11 - */ - class TypeDescriptor { - /** - * Type ID of the uniform data type, which corresponds to the enum string in the {@code UniformDataType}. - * - * @type { string } - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 11 - */ - readonly typeId: string; - - /** - * Uniform data type IDs that the uniform data type belongs to. - * - * @type { Array } - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 11 - */ - readonly belongingToTypes: Array; - - /** - * A textual description for the uniform data type. - * - * @type { string } - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 11 - */ - readonly description: string; - - /** - * Reference URL for the uniform data type, which describes the detail information of the type. - * - * @type { string } - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 11 - */ - readonly referenceURL: string; - - /** - * Default icon file path for the uniform data type. - * - * @type { string } - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 11 - */ - readonly iconFile: string; - - /** - * File name extensions for the uniform data type. - * - * @type { Array } - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 12 - */ - readonly filenameExtensions: Array; - - /** - * MIMETypes of the uniform data type. - * - * @type { Array } - * @readonly - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 12 - */ - readonly mimeTypes: Array; - - /** - * Checks whether the uniform data type belongs to the given uniform data type. - * - * @param { string } type - A uniform data type to be compared. - * @returns { boolean } Returns true if the data type belongs to the given data type, else false. - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 11 - */ - belongsTo(type: string): boolean; - - /** - * Checks whether the uniform data type is the lower level type of the given uniform data type. - * - * @param { string } type - A uniform data type to be compared. - * @returns { boolean } Returns true if the data type is the lower level type of the given data type, else false. - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 11 - */ - isLowerLevelType(type: string): boolean; - - /** - * Checks whether the uniform data type is the higher level type of the given uniform data type. - * - * @param { string } type - A uniform data type to be compared. - * @returns { boolean } Returns true if the data type is the higher level type of the given data type, else false. - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 11 - */ - isHigherLevelType(type: string): boolean; - - /** - * Checks whether the uniform type descriptor is equal to the given uniform type descriptor. - * - * @param { TypeDescriptor } typeDescriptor - A uniform type descriptor to be compared. - * @returns { boolean } Returns true if the type descriptor is equal to the given type descriptor, else false. - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 11 - */ - equals(typeDescriptor: TypeDescriptor): boolean; - } - - /** - * Queries and returns the uniform type descriptor by the given uniform data type ID. - * - * @param { string } typeId - Uniform data type ID. - * @returns { TypeDescriptor } Returns the uniform type descriptor corresponding to the uniform data type ID or null - *
if the uniform data type does not exist. - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 11 - */ - function getTypeDescriptor(typeId: string): TypeDescriptor; - - /** - * Queries and returns the uniform type descriptor by the given filename extension and the uniform data type it - * belongs to. - * - * @param { string } filenameExtension - Filename extension. - * @param { string } [belongsTo] - A uniform data type ID it belongs to. - * @returns { string } Returns the uniform data type ID corresponding to the given filename extension and the - *
uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type - * does not exist. - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - function getUniformDataTypeByFilenameExtension(filenameExtension: string, belongsTo?: string): string; - - /** - * Queries and returns the uniform type descriptor by the given MIME type and the uniform data type it belongs to. - * - * @param { string } mimeType - MIME type. - * @param { string } [belongsTo] - A uniform data type ID it belongs to. - * @returns { string } Returns the uniform data type ID corresponding to the given MIME type and the uniform data type - *
it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does not exist. - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 11 - */ - function getUniformDataTypeByMIMEType(mimeType: string, belongsTo?: string): string; - - /** - * Queries and returns the uniform type descriptor list by the given filename extension and the uniform data type it - * belongs to. - * - * @param { string } filenameExtension - Filename extension. - * @param { string } [belongsTo] - A uniform data type ID it belongs to. - * @returns { Array } Returns the uniform data type ID list corresponding to the given filename extension and - * the uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type - * does not exist. - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 13 - */ - function getUniformDataTypesByFilenameExtension(filenameExtension: string, belongsTo?: string): Array; - - /** - * Queries and returns the uniform type descriptor list by the given MIME type and the uniform data type it belongs - * to. - * - * @param { string } mimeType - MIME type. - * @param { string } [belongsTo] - A uniform data type ID it belongs to. - * @returns { Array } Returns the uniform data type ID list corresponding to the given MIME type and the - * uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does - * not exist. - * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; - *
2.Incorrect parameters types. - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 13 - */ - function getUniformDataTypesByMIMEType(mimeType: string, belongsTo?: string): Array; -} - -export default uniformTypeDescriptor; +/* + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkData + */ + +/** + * Provides methods for uniform data type definition and query. + * + * @namespace uniformTypeDescriptor + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ +/** + * Provides methods for uniform data type definition and query. + * + * @namespace uniformTypeDescriptor + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ +/** + * Provides methods for uniform data type definition and query. + * + * @namespace uniformTypeDescriptor + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ +declare namespace uniformTypeDescriptor { + /** + * Uniform data type IDs. + * + * @enum { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Uniform data type IDs. + * + * @enum { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Uniform data type IDs. + * + * @enum { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + enum UniformDataType { + /** + * Base data type for physical hierarchy, which identifies the physical representation of the data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ENTITY = 'general.entity', + + /** + * Base data type for logical hierarchy, which identifies the logical content representation of the data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OBJECT = 'general.object', + + /** + * Base data type for mixed object. For example, a PDF file contains both text and special formatting data. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + COMPOSITE_OBJECT = 'general.composite-object', + + /** + * Text data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Text data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Text data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + TEXT = 'general.text', + + /** + * Plain text data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Plain text data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Plain text data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PLAIN_TEXT = 'general.plain-text', + + /** + * HTML data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * HTML data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * HTML data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + HTML = 'general.html', + + /** + * Hyperlink data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Hyperlink data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Hyperlink data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + HYPERLINK = 'general.hyperlink', + + /** + * XML(Extensible Markup Language) data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + XML = 'general.xml', + + /** + * Xhtml data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + XHTML = 'general.xhtml', + + /** + * Rss data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + RSS = 'general.rss', + + /** + * Real synchronized multimedia integration language. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SMIL = 'com.real.smil', + + /** + * Source code data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SOURCE_CODE = 'general.source-code', + + /** + * Script data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SCRIPT = 'general.script', + + /** + * Shell script data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SHELL_SCRIPT = 'general.shell-script', + + /** + * C-shell script data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + CSH_SCRIPT = 'general.csh-script', + + /** + * Perl script data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PERL_SCRIPT = 'general.perl-script', + + /** + * PHP script data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PHP_SCRIPT = 'general.php-script', + + /** + * Python script data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PYTHON_SCRIPT = 'general.python-script', + + /** + * Ruby script data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + RUBY_SCRIPT = 'general.ruby-script', + + /** + * TypeScript data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + TYPE_SCRIPT = 'general.type-script', + + /** + * JavaScript data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + JAVA_SCRIPT = 'general.java-script', + + /** + * Css data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + CSS = 'general.css', + + /** + * C header data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + C_HEADER = 'general.c-header', + + /** + * C source code data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + C_SOURCE = 'general.c-source', + + /** + * C++ header data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + C_PLUS_PLUS_HEADER = 'general.c-plus-plus-header', + + /** + * C++ source code data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + C_PLUS_PLUS_SOURCE = 'general.c-plus-plus-source', + + /** + * Java source code data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + JAVA_SOURCE = 'general.java-source', + + /** + * Tex source code data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + TEX = 'general.tex', + + /** + * Markdown format. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MARKDOWN = 'general.markdown', + + /** + * Asc text data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ASC_TEXT = 'general.asc-text', + + /** + * Rich text data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + RICH_TEXT = 'general.rich-text', + + /** + * Delimited values text data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + DELIMITED_VALUES_TEXT = 'general.delimited-values-text', + + /** + * Comma separated values text data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + COMMA_SEPARATED_VALUES_TEXT = 'general.comma-separated-values-text', + + /** + * Tab separated values text data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + TAB_SEPARATED_VALUES_TEXT = 'general.tab-separated-values-text', + + /** + * Ebook data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + EBOOK = 'general.ebook', + + /** + * EPUB ebook file format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + EPUB = 'general.epub', + + /** + * AZW ebook file format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AZW = 'com.amazon.azw', + + /** + * AZW3 ebook file format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AZW3 = 'com.amazon.azw3', + + /** + * KFX ebook file format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + KFX = 'com.amazon.kfx', + + /** + * MOBI ebook file format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MOBI = 'com.amazon.mobi', + + /** + * Media data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MEDIA = 'general.media', + + /** + * Image data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Image data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Image data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + IMAGE = 'general.image', + + /** + * JPEG image format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + JPEG = 'general.jpeg', + + /** + * PNG image format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PNG = 'general.png', + + /** + * Raw image format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + RAW_IMAGE = 'general.raw-image', + + /** + * TIFF image format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + TIFF = 'general.tiff', + + /** + * Windows bitmap image data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + BMP = 'com.microsoft.bmp', + + /** + * Windows icon data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ICO = 'com.microsoft.ico', + + /** + * Adobe Photoshop document data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PHOTOSHOP_IMAGE = 'com.adobe.photoshop-image', + + /** + * Adobe Illustrator document data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AI_IMAGE = 'com.adobe.illustrator.ai-image', + + /** + * Base type for fax images. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + FAX = 'general.fax', + + /** + * J2 jConnect fax file format. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + JFX_FAX = 'com.j2.jfx-fax', + + /** + * The electronic fax document format. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + EFX_FAX = 'com.js.efx-fax', + + /** + * X bitmap image. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + XBITMAP_IMAGE = 'general.xbitmap-image', + + /** + * Gif image format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + GIF = 'general.gif', + + /** + * Tagged Graphics (TGA), a type of image format. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + TGA_IMAGE = 'com.truevision.tga-image', + + /** + * Silicon Graphics image. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SGI_IMAGE = 'com.sgi.sgi-image', + + /** + * OpenEXR image. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENEXR_IMAGE = 'com.ilm.openexr-image', + + /** + * FlashPix image. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + FLASHPIX_IMAGE = 'com.kodak.flashpix.image', + + /** + * Microsoft Word data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + WORD_DOC = 'com.microsoft.word.doc', + + /** + * Microsoft Excel data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + EXCEL = 'com.microsoft.excel.xls', + + /** + * Microsoft PowerPoint presentation data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PPT = 'com.microsoft.powerpoint.ppt', + + /** + * Microsoft Word dot data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + WORD_DOT = 'com.microsoft.word.dot', + + /** + * Microsoft Powerpoint pps data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + POWERPOINT_PPS = 'com.microsoft.powerpoint.pps', + + /** + * Microsoft Powerpoint pot data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + POWERPOINT_POT = 'com.microsoft.powerpoint.pot', + + /** + * Microsoft Excel xlt data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + EXCEL_XLT = 'com.microsoft.excel.xlt', + + /** + * Microsoft Visio vsd data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + VISIO_VSD = 'com.microsoft.visio.vsd', + + /** + * PDF data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PDF = 'com.adobe.pdf', + + /** + * PostScript data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + POSTSCRIPT = 'com.adobe.postscript', + + /** + * Encapsulated PostScript data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ENCAPSULATED_POSTSCRIPT = 'com.adobe.encapsulated-postscript', + + /** + * Video data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Video data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Video data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + VIDEO = 'general.video', + + /** + * AVI video format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AVI = 'general.avi', + + /** + * MPEG video format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MPEG = 'general.mpeg', + + /** + * MPEG4 video format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MPEG4 = 'general.mpeg-4', + + /** + * 3GPP video format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + VIDEO_3GPP = 'general.3gpp', + + /** + * 3GPP2 video format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + VIDEO_3GPP2 = 'general.3gpp2', + + /** + * Ts video format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + TS = 'general.ts', + + /** + * Mpegurl video format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MPEGURL_VIDEO = 'general.mpegurl-video', + + /** + * Windows WM video format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + WINDOWS_MEDIA_WM = 'com.microsoft.windows-media-wm', + + /** + * Windows WMV video format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + WINDOWS_MEDIA_WMV = 'com.microsoft.windows-media-wmv', + + /** + * Windows WMP video format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + WINDOWS_MEDIA_WMP = 'com.microsoft.windows-media-wmp', + + /** + * Windows WVX video format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + WINDOWS_MEDIA_WVX = 'com.microsoft.windows-media-wvx', + + /** + * Windows WMX video format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + WINDOWS_MEDIA_WMX = 'com.microsoft.windows-media-wmx', + + /** + * RealMedia. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + REALMEDIA = 'com.real.realmedia', + + /** + * Matroska video format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MATROSKA_VIDEO = 'org.matroska.mkv', + + /** + * Flash data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + FLASH = 'com.adobe.flash', + + /** + * Audio data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Audio data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Audio data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AUDIO = 'general.audio', + + /** + * AAC audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AAC = 'general.aac', + + /** + * AIFF audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AIFF = 'general.aiff', + + /** + * ALAC audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ALAC = 'general.alac', + + /** + * FLAC audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + FLAC = 'general.flac', + + /** + * MP3 audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MP3 = 'general.mp3', + + /** + * OGG audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OGG = 'general.ogg', + + /** + * PCM audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PCM = 'general.pcm', + + /** + * Windows WMA audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + WINDOWS_MEDIA_WMA = 'com.microsoft.windows-media-wma', + + /** + * Waveform audio format data type created by Microsoft. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + WAVEFORM_AUDIO = 'com.microsoft.waveform-audio', + + /** + * Windows WAX audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + WINDOWS_MEDIA_WAX = 'com.microsoft.windows-media-wax', + + /** + * Au file format. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AU_AUDIO = 'general.au-audio', + + /** + * Audio Interchange File Format. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AIFC_AUDIO = 'general.aifc-audio', + + /** + * Mpegurl audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MPEGURL_AUDIO = 'general.mpegurl-audio', + + /** + * Mpeg-4 audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MPEG_4_AUDIO = 'general.mpeg-4-audio', + + /** + * Mp2 audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MP2 = 'general.mp2', + + /** + * MPEG audio format. This type belongs to AUDIO. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MPEG_AUDIO = 'general.mpeg-audio', + + /** + * Ulaw audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ULAW_AUDIO = 'general.ulaw-audio', + + /** + * Digidesign Sound Designer II audio. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SD2_AUDIO = 'com.digidesign.sd2-audio', + + /** + * RealMedia audio. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + REALAUDIO = 'com.real.realaudio', + + /** + * Matroska audio format data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MATROSKA_AUDIO = 'org.matroska.mka', + + /** + * File data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * File data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * File data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + FILE = 'general.file', + + /** + * Directory data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + DIRECTORY = 'general.directory', + + /** + * Folder data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Folder data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Folder data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + FOLDER = 'general.folder', + + /** + * Symlink data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SYMLINK = 'general.symlink', + + /** + * Archive file data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ARCHIVE = 'general.archive', + + /** + * Bzip2 archive file data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + BZ2_ARCHIVE = 'general.bz2-archive', + + /** + * Opg archive data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPG = 'general.opg', + + /** + * Taz archive data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + TAZ_ARCHIVE = 'general.taz-archive', + + /** + * Web archive data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + WEB_ARCHIVE = 'general.web-archive', + + /** + * Disk image archive file data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + DISK_IMAGE = 'general.disk-image', + + /** + * Iso data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ISO = 'general.iso', + + /** + * Tar archive data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + TAR_ARCHIVE = 'general.tar-archive', + + /** + * Zip archive data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ZIP_ARCHIVE = 'general.zip-archive', + + /** + * Java archive data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + JAVA_ARCHIVE = 'com.sun.java-archive', + + /** + * GNU. This type belongs to ARCHIVE. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + GNU_TAR_ARCHIVE = 'org.gnu.gnu-tar-archive', + + /** + * Gzip archive data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + GNU_ZIP_ARCHIVE = 'org.gnu.gnu-zip-archive', + + /** + * Gzip tar archive data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + GNU_ZIP_TAR_ARCHIVE = 'org.gnu.gnu-zip-tar-archive', + + /** + * Office Open XML. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENXML = 'org.openxmlformats.openxml', + + /** + * Office Open XML Document. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + WORDPROCESSINGML_DOCUMENT = 'org.openxmlformats.wordprocessingml.document', + + /** + * Office Open XML Workbook. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SPREADSHEETML_SHEET = 'org.openxmlformats.spreadsheetml.sheet', + + /** + * Office Open XML Presentation. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PRESENTATIONML_PRESENTATION = 'org.openxmlformats.presentationml.presentation', + + /** + * Office Open XML Drawingml visio. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + DRAWINGML_VISIO = 'org.openxmlformats.drawingml.visio', + + /** + * Office Open XML Drawingml template. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + DRAWINGML_TEMPLATE = 'org.openxmlformats.drawingml.template', + + /** + * Office Open XML Wordprocessingml template. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + WORDPROCESSINGML_TEMPLATE = 'org.openxmlformats.wordprocessingml.template', + + /** + * Office Open XML Presentationml template. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PRESENTATIONML_TEMPLATE = 'org.openxmlformats.presentationml.template', + + /** + * Office Open XML Presentationml slideshow. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PRESENTATIONML_SLIDESHOW = 'org.openxmlformats.presentationml.slideshow', + + /** + * Office Open XML Spreadsheetml template. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SPREADSHEETML_TEMPLATE = 'org.openxmlformats.spreadsheetml.template', + + /** + * Open Document Format for Office Applications. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENDOCUMENT = 'org.oasis.opendocument', + + /** + * OpenDocument Text. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENDOCUMENT_TEXT = 'org.oasis.opendocument.text', + + /** + * OpenDocument Spreadsheet. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENDOCUMENT_SPREADSHEET = 'org.oasis.opendocument.spreadsheet', + + /** + * OpenDocument Presentation. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENDOCUMENT_PRESENTATION = 'org.oasis.opendocument.presentation', + + /** + * OpenDocument Graphics. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENDOCUMENT_GRAPHICS = 'org.oasis.opendocument.graphics', + + /** + * OpenDocument Formulat. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENDOCUMENT_FORMULA = 'org.oasis.opendocument.formula', + + /** + * Stuffit archive. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + STUFFIT_ARCHIVE = 'com.allume.stuffit-archive', + + /** + * Rar archive. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + RAR_ARCHIVE = 'com.rarlab.rar-archive', + + /** + * 7-zip archive. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SEVEN_ZIP_ARCHIVE = 'org.7-zip.7-zip-archive', + + /** + * Calendar data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + CALENDAR = 'general.calendar', + + /** + * VCalendar type, a type of calendar format. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + VCS = 'general.vcs', + + /** + * ICalendar type, a type of calendar format. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + ICS = 'general.ics', + + /** + * Contact data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + CONTACT = 'general.contact', + + /** + * Database data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + DATABASE = 'general.database', + + /** + * Message data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MESSAGE = 'general.message', + + /** + * Base type for executable data. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + EXECUTABLE = 'general.executable', + + /** + * Microsoft Windows application. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PORTABLE_EXECUTABLE = 'com.microsoft.portable-executable', + + /** + * Java class. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SUN_JAVA_CLASS = 'com.sun.java-class', + + /** + * A file format data type stand for electronic business card. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + VCARD = 'general.vcard', + + /** + * Navigation data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + NAVIGATION = 'general.navigation', + + /** + * Location data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + LOCATION = 'general.location', + + /** + * Base type for fonts. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + FONT = 'general.font', + + /** + * TrueType font. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + TRUETYPE_FONT = 'general.truetype-font', + + /** + * TrueType collection font. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + TRUETYPE_COLLECTION_FONT = 'general.truetype-collection-font', + + /** + * OpenType font. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENTYPE_FONT = 'general.opentype-font', + + /** + * PostScript font. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + POSTSCRIPT_FONT = 'com.adobe.postscript-font', + + /** + * A Printer Font Binary version of Adobe's Type 1. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + POSTSCRIPT_PFB_FONT = 'com.adobe.postscript-pfb-font', + + /** + * Adobe Type 1 font. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + POSTSCRIPT_PFA_FONT = 'com.adobe.postscript-pfa-font', + + /** + * OpenHarmony system defined form data type(the data is provided and bound to OpenHarmony system). + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * OpenHarmony system defined form data type(the data is provided and bound to OpenHarmony system). + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENHARMONY_FORM = 'openharmony.form', + + /** + * OpenHarmony system defined app item data type(the data is provided and bound to OpenHarmony system). + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * OpenHarmony system defined app item data type(the data is provided and bound to OpenHarmony system). + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENHARMONY_APP_ITEM = 'openharmony.app-item', + + /** + * OpenHarmony system defined pixel map data type(the data is provided and bound to OpenHarmony system). + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * OpenHarmony system defined pixel map data type(the data is provided and bound to OpenHarmony system). + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * OpenHarmony system defined pixel map data type(the data is provided and bound to OpenHarmony system). + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENHARMONY_PIXEL_MAP = 'openharmony.pixel-map', + + /** + * OpenHarmony system defined atomic service data type(the data is provided and bound to OpenHarmony system). + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENHARMONY_ATOMIC_SERVICE = 'openharmony.atomic-service', + + /** + * OpenHarmony system defined package, which is a directory presented to the user as a file(the data is provided + *
and bound to OpenHarmony system). + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENHARMONY_PACKAGE = 'openharmony.package', + + /** + * OpenHarmony system defined ability package(the data is provided and bound to OpenHarmony system). + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENHARMONY_HAP = 'openharmony.hap', + + /** + * OpenHarmony system AppNotepad data format. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENHARMONY_HDOC = 'openharmony.hdoc', + + /** + * OpenHarmony system Notes data format. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENHARMONY_HINOTE = 'openharmony.hinote', + + /** + * OpenHarmony system defined styled string. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENHARMONY_STYLED_STRING = 'openharmony.styled-string', + + /** + * OpenHarmony system defined Want. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OPENHARMONY_WANT = 'openharmony.want', + + /** + * Ofd data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OFD = 'general.ofd', + + /** + * Cad data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + CAD = 'general.cad', + + /** + * Octet stream data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + OCTET_STREAM = 'general.octet-stream', + + /** + * File uri data type. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 + */ + FILE_URI = 'general.file-uri', + + /** + * Content widget type. This type belongs to OBJECT. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 + */ + CONTENT_FORM = 'general.content-form' + } + + /** + * Class describing the uniform data type defined in the {@code UniformDataType}, which consists of attributes and + *
methods describing the uniform data type and its relationships to other uniform data types. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 11 + */ + class TypeDescriptor { + /** + * Type ID of the uniform data type, which corresponds to the enum string in the {@code UniformDataType}. + * + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 11 + */ + readonly typeId: string; + + /** + * Uniform data type IDs that the uniform data type belongs to. + * + * @type { Array } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 11 + */ + readonly belongingToTypes: Array; + + /** + * A textual description for the uniform data type. + * + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 11 + */ + readonly description: string; + + /** + * Reference URL for the uniform data type, which describes the detail information of the type. + * + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 11 + */ + readonly referenceURL: string; + + /** + * Default icon file path for the uniform data type. + * + * @type { string } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 11 + */ + readonly iconFile: string; + + /** + * File name extensions for the uniform data type. + * + * @type { Array } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 12 + */ + readonly filenameExtensions: Array; + + /** + * MIMETypes of the uniform data type. + * + * @type { Array } + * @readonly + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 12 + */ + readonly mimeTypes: Array; + + /** + * Checks whether the uniform data type belongs to the given uniform data type. + * + * @param { string } type - A uniform data type to be compared. + * @returns { boolean } Returns true if the data type belongs to the given data type, else false. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 11 + */ + belongsTo(type: string): boolean; + + /** + * Checks whether the uniform data type is the lower level type of the given uniform data type. + * + * @param { string } type - A uniform data type to be compared. + * @returns { boolean } Returns true if the data type is the lower level type of the given data type, else false. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 11 + */ + isLowerLevelType(type: string): boolean; + + /** + * Checks whether the uniform data type is the higher level type of the given uniform data type. + * + * @param { string } type - A uniform data type to be compared. + * @returns { boolean } Returns true if the data type is the higher level type of the given data type, else false. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 11 + */ + isHigherLevelType(type: string): boolean; + + /** + * Checks whether the uniform type descriptor is equal to the given uniform type descriptor. + * + * @param { TypeDescriptor } typeDescriptor - A uniform type descriptor to be compared. + * @returns { boolean } Returns true if the type descriptor is equal to the given type descriptor, else false. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 11 + */ + equals(typeDescriptor: TypeDescriptor): boolean; + } + + /** + * Queries and returns the uniform type descriptor by the given uniform data type ID. + * + * @param { string } typeId - Uniform data type ID. + * @returns { TypeDescriptor } Returns the uniform type descriptor corresponding to the uniform data type ID or null + *
if the uniform data type does not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 11 + */ + function getTypeDescriptor(typeId: string): TypeDescriptor; + + /** + * Queries and returns the uniform type descriptor by the given filename extension and the uniform data type it + * belongs to. + * + * @param { string } filenameExtension - Filename extension. + * @param { string } [belongsTo] - A uniform data type ID it belongs to. + * @returns { string } Returns the uniform data type ID corresponding to the given filename extension and the + *
uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type + * does not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + function getUniformDataTypeByFilenameExtension(filenameExtension: string, belongsTo?: string): string; + + /** + * Queries and returns the uniform type descriptor by the given MIME type and the uniform data type it belongs to. + * + * @param { string } mimeType - MIME type. + * @param { string } [belongsTo] - A uniform data type ID it belongs to. + * @returns { string } Returns the uniform data type ID corresponding to the given MIME type and the uniform data type + *
it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 11 + */ + function getUniformDataTypeByMIMEType(mimeType: string, belongsTo?: string): string; + + /** + * Queries and returns the uniform type descriptor list by the given filename extension and the uniform data type it + * belongs to. + * + * @param { string } filenameExtension - Filename extension. + * @param { string } [belongsTo] - A uniform data type ID it belongs to. + * @returns { Array } Returns the uniform data type ID list corresponding to the given filename extension and + * the uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type + * does not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 13 + */ + function getUniformDataTypesByFilenameExtension(filenameExtension: string, belongsTo?: string): Array; + + /** + * Queries and returns the uniform type descriptor list by the given MIME type and the uniform data type it belongs + * to. + * + * @param { string } mimeType - MIME type. + * @param { string } [belongsTo] - A uniform data type ID it belongs to. + * @returns { Array } Returns the uniform data type ID list corresponding to the given MIME type and the + * uniform data type it belongs to(If the 'belongsTo' parameter is set) or flexible type if the uniform data type does + * not exist. + * @throws { BusinessError } 401 - Parameter error. Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameters types. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 13 + */ + function getUniformDataTypesByMIMEType(mimeType: string, belongsTo?: string): Array; +} + +export default uniformTypeDescriptor; diff --git a/api/@ohos.request.d.ts b/api/@ohos.request.d.ts index 082e31d35a..c0d71a234b 100644 --- a/api/@ohos.request.d.ts +++ b/api/@ohos.request.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -283,7 +283,7 @@ declare namespace request { /** * Error code 7 - Indicates an HTTP code that cannot be identified. - * + *@crossplatform * @syscap SystemCapability.MiscServices.Download * @since 7 */ @@ -1984,6 +1984,7 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload + * @crossplatform * @since 11 */ index?: number; @@ -1995,6 +1996,7 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload + * @crossplatform * @since 11 */ begins?: number; @@ -2006,6 +2008,7 @@ declare namespace request { * * @type { ?number } * @syscap SystemCapability.MiscServices.Upload + * @crossplatform * @since 11 */ ends?: number; @@ -2662,6 +2665,7 @@ declare namespace request { * * @enum { string } BroadcastEvent * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ enum BroadcastEvent { @@ -2671,6 +2675,7 @@ declare namespace request { * The data in the commonEventData contains the id of the task. * * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ COMPLETE = 'ohos.request.event.COMPLETE' @@ -3339,6 +3344,7 @@ declare namespace request { * * @type { ?string } * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 12 */ proxy?: string; @@ -4494,6 +4500,7 @@ declare namespace request { * * @interface HttpResponse * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4505,6 +4512,7 @@ declare namespace request { * @type { string } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4516,6 +4524,7 @@ declare namespace request { * @type { number } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4527,6 +4536,7 @@ declare namespace request { * @type { string } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4538,6 +4548,7 @@ declare namespace request { * @type { Map> } * @readonly * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since 12 */ @@ -4814,6 +4825,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ on(event: 'pause', callback: (progress: Progress) => void): void; @@ -4826,6 +4838,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ off(event: 'pause', callback?: (progress: Progress) => void): void; @@ -4838,6 +4851,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ on(event: 'resume', callback: (progress: Progress) => void): void; @@ -4850,6 +4864,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ off(event: 'resume', callback?: (progress: Progress) => void): void; @@ -4862,6 +4877,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ on(event: 'remove', callback: (progress: Progress) => void): void; @@ -4874,6 +4890,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ off(event: 'remove', callback?: (progress: Progress) => void): void; @@ -4886,6 +4903,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4900,6 +4918,7 @@ declare namespace request { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Missing mandatory parameters. *
2. Incorrect parameter type. 3. Parameter verification failed. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @atomicservice * @since 12 */ @@ -5051,6 +5070,7 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ pause(callback: AsyncCallback): void; @@ -5071,6 +5091,7 @@ declare namespace request { * @throws { BusinessError } 13400003 - Task service ability error. * @throws { BusinessError } 21900007 - Operation with wrong task state. * @syscap SystemCapability.Request.FileTransferAgent + * @crossplatform * @since 11 */ pause(): Promise; -- Gitee