From ba1c821977035de396ba08fcac00b814349dde64 Mon Sep 17 00:00:00 2001 From: wufengshan Date: Wed, 11 May 2022 10:36:43 +0800 Subject: [PATCH 01/18] Update Docs Signed-off-by: wufengshan --- api/@ohos.data.distributedData.d.ts | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index 2fd26a2db4..a878b48977 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1163,6 +1163,19 @@ declare namespace distributedData { */ on(event: 'dataChange', type: SubscribeType, observer: Callback): void; + /** + * Unsubscribes from the {@code KvStore} database based on the specified subscribeType and {@code KvStoreObserver}. + * + * @note N/A + * @since 8 + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @param observer Indicates the data change observer registered by {#subscribe(SubscribeType, KvStoreObserver)}. + * @throws Throws this exception if any of the following errors + * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, + * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. + */ + off(event:'dataChange', observer?: Callback): void; + /** * Subscribes from the {@code KvStore} database based on the specified subscribeType and {@code KvStoreObserver}. * @@ -1174,10 +1187,11 @@ declare namespace distributedData { * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. */ on(event: 'syncComplete', syncCallback: Callback>): void; - + /** - * Unsubscribes from the {@code KvStore} database based on the specified subscribeType and {@code KvStoreObserver}. - * + * + * Unegisters a {@code KvStoreObserver} for the database. When data in the distributed database changes, the callback in + * {@code KvStoreObserver} will be invoked. * @note N/A * @since 8 * @syscap SystemCapability.DistributedDataManager.KVStore.Core @@ -1186,7 +1200,7 @@ declare namespace distributedData { * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. */ - off(event:'dataChange', observer?: Callback): void; + off(event:'syncComplete', observer?: Callback): void; /** * Inserts key-value pairs into the {@code KvStore} database in batches. -- Gitee From 796a55d04f23af1e391532f8d0c6a1fb53554d63 Mon Sep 17 00:00:00 2001 From: wufengshan Date: Wed, 11 May 2022 10:38:00 +0800 Subject: [PATCH 02/18] Update Docs Signed-off-by: wufengshan --- api/@ohos.data.distributedData.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index a878b48977..a207bf5cf1 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1200,7 +1200,7 @@ declare namespace distributedData { * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. */ - off(event:'syncComplete', observer?: Callback): void; + off(event:'syncComplete', observer?: Callback): void; /** * Inserts key-value pairs into the {@code KvStore} database in batches. -- Gitee From d047d9d074852fd47828e923b8efda7de42ecf8c Mon Sep 17 00:00:00 2001 From: wufengshan Date: Wed, 11 May 2022 11:08:11 +0800 Subject: [PATCH 03/18] Update Docs Signed-off-by: wufengshan --- api/@ohos.data.distributedData.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index a207bf5cf1..e0b03d2594 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1200,7 +1200,7 @@ declare namespace distributedData { * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. */ - off(event:'syncComplete', observer?: Callback): void; + off(event:'syncComplete', observer?: Callback>): void; /** * Inserts key-value pairs into the {@code KvStore} database in batches. -- Gitee From e2903451d77f802cd6d9994f93ecf10b16ba91dd Mon Sep 17 00:00:00 2001 From: wufengshan Date: Wed, 11 May 2022 14:16:16 +0800 Subject: [PATCH 04/18] Update Docs Signed-off-by: wufengshan --- api/@ohos.data.distributedData.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index e0b03d2594..5afc9afc29 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1190,7 +1190,7 @@ declare namespace distributedData { /** * - * Unegisters a {@code KvStoreObserver} for the database. When data in the distributed database changes, the callback in + * Unregister a {@code KvStoreObserver} for the database. When data in the distributed database changes, the callback in * {@code KvStoreObserver} will be invoked. * @note N/A * @since 8 -- Gitee From e0f436fbc5ff136827e64f831ac421083e7df917 Mon Sep 17 00:00:00 2001 From: wufengshan Date: Wed, 11 May 2022 14:22:54 +0800 Subject: [PATCH 05/18] Update Docs Signed-off-by: wufengshan --- api/@ohos.data.distributedData.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index 5afc9afc29..572da80426 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1200,7 +1200,7 @@ declare namespace distributedData { * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. */ - off(event:'syncComplete', observer?: Callback>): void; + off(event:'syncComplete', syncCallback?: Callback>): void; /** * Inserts key-value pairs into the {@code KvStore} database in batches. -- Gitee From 2059a5d16504690ce9b0c0f81dd7c97dc31f0ed9 Mon Sep 17 00:00:00 2001 From: wufengshan Date: Mon, 16 May 2022 15:53:09 +0800 Subject: [PATCH 06/18] Signed-off-by: wufengshan modified: api/@ohos.data.distributedData.d.ts --- api/@ohos.data.distributedData.d.ts | 68 ++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index 572da80426..04cff72be5 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -14,6 +14,9 @@ */ import { AsyncCallback, Callback } from './basic'; +import ValuesBucket from './@ohos.data.DatashareValuesBucket'; +import Predicates from './@ohos.data.DatasharePredicates'; +import DataShareResultSet from './@ohos.data.DataShareResultSet'; /** * Providers interfaces to creat a {@link KVManager} istances. @@ -1133,6 +1136,21 @@ declare namespace distributedData { put(key: string, value: Uint8Array | string | number | boolean, callback: AsyncCallback): void; put(key: string, value: Uint8Array | string | number | boolean): Promise; + /** + * Writes a value of the valuesbucket type into the {@code KvStore} database. + * + * @note N/A + * @since 9 + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @param value Indicates the datasharePredicates. + * Spaces before and after the key will be cleared. + * @throws Throws this exception if any of the following errors + * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and + * {@code DB_ERROR}. + */ + put(value: Array, callback: AsyncCallback): void; + put(value: Array): Promise; + /** * Deletes the key-value pair based on a specified key. * @@ -1148,6 +1166,21 @@ declare namespace distributedData { delete(key: string, callback: AsyncCallback): void; delete(key: string): Promise; + /** + * Deletes the key-value pair based on a specified key. + * + * @note N/A + * @since 9 + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @param predicates Indicates the datasharePredicates. + * Spaces before and after the key will be cleared. + * @throws Throws this exception if any of the following errors + * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and + * {@code DB_ERROR}. + */ + delete(predicates: Predicates, callback: AsyncCallback); + delete(predicates: Predicates): Promise; + /** * Registers a {@code KvStoreObserver} for the database. When data in the distributed database changes, the callback in * {@code KvStoreObserver} will be invoked. @@ -1364,7 +1397,7 @@ declare namespace distributedData { */ getResultSet(keyPrefix: string, callback: AsyncCallback): void; getResultSet(keyPrefix: string): Promise; - + /** * Obtains the {@code KvStoreResultSet} object matching the specified {@code Query} object. * @@ -1378,6 +1411,21 @@ declare namespace distributedData { getResultSet(query: Query, callback: AsyncCallback): void; getResultSet(query: Query): Promise; + /** + * Obtains the KvStoreResultSet object matching the specified Predicate object.. + * + * @note N/A + * @since 9 + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @param predicates Indicates the key. + * Spaces before and after the key will be cleared. + * @throws Throws this exception if any of the following errors + * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and + * {@code DB_ERROR}. + */ + getResultSet(predicates: Predicates, callback: AsyncCallback): void; + getResultSet(predicates: Predicates): Promise; + /** * Closes a {@code KvStoreResultSet} object returned by getResultSet. * @@ -1424,12 +1472,14 @@ declare namespace distributedData { * @param deviceIdList Indicates the list of devices to which to synchronize the database. * @param mode Indicates the synchronization mode. The value can be {@code PUSH}, {@code PULL}, or {@code PUSH_PULL}. * @param allowedDelayMs Indicates the delay allowed for the synchronization, in milliseconds. + * @param query Indicates the {@code Query} object. * @throws Throws this exception if any of the following errors * @permission ohos.permission.DISTRIBUTED_DATASYNC * occurs: {@code INVALID_ARGUMENT}, * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and {@code DB_ERROR}. */ sync(deviceIdList: string[], mode: SyncMode, allowedDelayMs?: number): void; + sync(deviceIdList: string[], query: Query, mode: SyncMode, allowedDelayMs?: number): void; /** * Register Synchronizes SingleKvStore databases callback. @@ -1597,6 +1647,21 @@ declare namespace distributedData { getResultSet(deviceId: string, query: Query, callback: AsyncCallback): void; getResultSet(deviceId: string, query: Query): Promise; + /** + * Obtains the KvStoreResultSet object matching the specified Predicate object.. + * + * @note N/A + * @since 9 + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @param predicates Indicates the key. + * Spaces before and after the key will be cleared. + * @throws Throws this exception if any of the following errors + * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and + * {@code DB_ERROR}. + */ + getResultSet(predicates: Predicates, callback: AsyncCallback): void; + getResultSet(predicates: Predicates): Promise; + /** * Closes a {@code KvStoreResultSet} object returned by getResultSet. * @@ -1667,6 +1732,7 @@ declare namespace distributedData { * @throws Throws this exception if no DeviceKVStore database is available. */ sync(deviceIdList: string[], mode: SyncMode, allowedDelayMs?: number): void; + sync(deviceIdList: string[], query: Query, mode: SyncMode, allowedDelayMs?: number): void; /** * Register Synchronizes DeviceKVStore databases callback. -- Gitee From 243c6bce9d42eed809d9c325b0f6c5564d4c1eb5 Mon Sep 17 00:00:00 2001 From: wufengshan Date: Mon, 16 May 2022 20:59:02 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wufengshan --- api/@ohos.data.distributedData.d.ts | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index 04cff72be5..61a9203d15 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1196,19 +1196,6 @@ declare namespace distributedData { */ on(event: 'dataChange', type: SubscribeType, observer: Callback): void; - /** - * Unsubscribes from the {@code KvStore} database based on the specified subscribeType and {@code KvStoreObserver}. - * - * @note N/A - * @since 8 - * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @param observer Indicates the data change observer registered by {#subscribe(SubscribeType, KvStoreObserver)}. - * @throws Throws this exception if any of the following errors - * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, - * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. - */ - off(event:'dataChange', observer?: Callback): void; - /** * Subscribes from the {@code KvStore} database based on the specified subscribeType and {@code KvStoreObserver}. * @@ -1220,11 +1207,10 @@ declare namespace distributedData { * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. */ on(event: 'syncComplete', syncCallback: Callback>): void; - + /** - * - * Unregister a {@code KvStoreObserver} for the database. When data in the distributed database changes, the callback in - * {@code KvStoreObserver} will be invoked. + * Unsubscribes from the {@code KvStore} database based on the specified subscribeType and {@code KvStoreObserver}. + * * @note N/A * @since 8 * @syscap SystemCapability.DistributedDataManager.KVStore.Core @@ -1233,7 +1219,7 @@ declare namespace distributedData { * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, * {@code DB_ERROR}, and {@code STORE_ALREADY_SUBSCRIBE}. */ - off(event:'syncComplete', syncCallback?: Callback>): void; + off(event:'dataChange', observer?: Callback): void; /** * Inserts key-value pairs into the {@code KvStore} database in batches. -- Gitee From 73e38249f317953a0a1c32016eb7608de51d7669 Mon Sep 17 00:00:00 2001 From: wufengshan Date: Tue, 17 May 2022 09:47:33 +0800 Subject: [PATCH 08/18] Signed-off-by: wufengshan Changes to be committed: --- api/@ohos.data.distributedData.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index 61a9203d15..ba4d0f7e59 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1617,8 +1617,8 @@ declare namespace distributedData { * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. */ - getResultSet(query: Query, callback: AsyncCallback): void; - getResultSet(query: Query): Promise; + getResultSet(deviceId: string, query: Query, callback: AsyncCallback): void; + getResultSet(deviceId: string, query: Query): Promise; /** * Obtains the {@code KvStoreResultSet} object matching a specified device ID and {@code Query} object. -- Gitee From 531ab119b3210e3c915e32ef87d8b73ed6738ca0 Mon Sep 17 00:00:00 2001 From: wufengshan Date: Tue, 17 May 2022 09:50:30 +0800 Subject: [PATCH 09/18] Signed-off-by: wufengshan Changes to be committed: --- api/@ohos.data.distributedData.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index ba4d0f7e59..6138c569e2 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1617,8 +1617,8 @@ declare namespace distributedData { * @throws Throws this exception if any of the following errors occurs: {@code INVALID_ARGUMENT}, * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, {@code DB_ERROR}. */ - getResultSet(deviceId: string, query: Query, callback: AsyncCallback): void; - getResultSet(deviceId: string, query: Query): Promise; + getResultSet(query: Query, callback: AsyncCallback): void; + getResultSet(query: Query): Promise; /** * Obtains the {@code KvStoreResultSet} object matching a specified device ID and {@code Query} object. @@ -1645,8 +1645,8 @@ declare namespace distributedData { * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and * {@code DB_ERROR}. */ - getResultSet(predicates: Predicates, callback: AsyncCallback): void; - getResultSet(predicates: Predicates): Promise; + getResultSet(deviceId: string, predicates: Predicates, callback: AsyncCallback): void; + getResultSet(deviceId: string, predicates: Predicates): Promise; /** * Closes a {@code KvStoreResultSet} object returned by getResultSet. -- Gitee From 073b802d71a83bd4e0980374f443b6747bb8e323 Mon Sep 17 00:00:00 2001 From: wufengshan Date: Tue, 17 May 2022 11:29:57 +0800 Subject: [PATCH 10/18] Signed-off-by: wufengshan Changes to be committed: --- api/@ohos.data.distributedData.d.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index 6138c569e2..c260171ffe 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1645,6 +1645,21 @@ declare namespace distributedData { * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and * {@code DB_ERROR}. */ + getResultSet(predicates: Predicates, callback: AsyncCallback): void; + getResultSet(predicates: Predicates): Promise; + + /** + * Obtains the KvStoreResultSet object matching a specified Device ID and Predicate object. + * + * @note N/A + * @since 9 + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @param predicates Indicates the key. + * Spaces before and after the key will be cleared. + * @throws Throws this exception if any of the following errors + * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and + * {@code DB_ERROR}. + */ getResultSet(deviceId: string, predicates: Predicates, callback: AsyncCallback): void; getResultSet(deviceId: string, predicates: Predicates): Promise; -- Gitee From 3364de521c0f0f727db26b6c75dd354682d8fa11 Mon Sep 17 00:00:00 2001 From: wufengshan Date: Mon, 23 May 2022 11:13:12 +0800 Subject: [PATCH 11/18] Update Docs Signed-off-by: wufengshan --- api/@ohos.data.distributedData.d.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index c260171ffe..a261d2570d 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1455,17 +1455,17 @@ declare namespace distributedData { * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @param deviceIdList Indicates the list of devices to which to synchronize the database. + * @param devices Indicates the list of devices to which to synchronize the database. * @param mode Indicates the synchronization mode. The value can be {@code PUSH}, {@code PULL}, or {@code PUSH_PULL}. - * @param allowedDelayMs Indicates the delay allowed for the synchronization, in milliseconds. + * @param allodelayMs Indicates the delay allowed for the synchronization, in milliseconds. * @param query Indicates the {@code Query} object. * @throws Throws this exception if any of the following errors * @permission ohos.permission.DISTRIBUTED_DATASYNC * occurs: {@code INVALID_ARGUMENT}, * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and {@code DB_ERROR}. */ - sync(deviceIdList: string[], mode: SyncMode, allowedDelayMs?: number): void; - sync(deviceIdList: string[], query: Query, mode: SyncMode, allowedDelayMs?: number): void; + sync(devices: string[], mode: SyncMode, allodelayMs?: number): void; + sync(devices: string[], query: Query, mode: SyncMode, allodelayMs?: number): void; /** * Register Synchronizes SingleKvStore databases callback. @@ -1495,12 +1495,12 @@ declare namespace distributedData { * @note N/A * @since 8 * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @param defaultAllowedDelayMs Indicates the default delay allowed for the database synchronization, in milliseconds. + * @param defaultDelayMs Indicates the default delay allowed for the database synchronization, in milliseconds. * @throws Throws this exception if any of the following errors occurs:{@code INVALID_ARGUMENT}, * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and {@code DB_ERROR}. */ - setSyncParam(defaultAllowedDelayMs: number, callback: AsyncCallback): void; - setSyncParam(defaultAllowedDelayMs: number): Promise; + setSyncParam(defaultDelayMs: number, callback: AsyncCallback): void; + setSyncParam(defaultDelayMs: number): Promise; /** * Get the security level of the database. @@ -1725,15 +1725,15 @@ declare namespace distributedData { * @note N/A * @since 8 * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @param deviceIdList Indicates the list of IDs of devices whose + * @param devices Indicates the list of IDs of devices whose * {@code DeviceKVStore} databases are to be synchronized. * @param mode Indicates the synchronization mode, {@code PUSH}, {@code PULL}, or * {@code PUSH_PULL}. * @permission ohos.permission.DISTRIBUTED_DATASYNC * @throws Throws this exception if no DeviceKVStore database is available. */ - sync(deviceIdList: string[], mode: SyncMode, allowedDelayMs?: number): void; - sync(deviceIdList: string[], query: Query, mode: SyncMode, allowedDelayMs?: number): void; + sync(devices: string[], mode: SyncMode, allodelayMs?: number): void; + sync(devices: string[], query: Query, mode: SyncMode, allodelayMs?: number): void; /** * Register Synchronizes DeviceKVStore databases callback. -- Gitee From 98e6c554ed7eb7feff869866b466dbf8f28f439c Mon Sep 17 00:00:00 2001 From: wufengshan Date: Mon, 23 May 2022 14:19:26 +0800 Subject: [PATCH 12/18] Signed-off-by: wufengshan modified: api/@ohos.data.distributedData.d.ts --- api/@ohos.data.distributedData.d.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index a261d2570d..ff81496b52 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1383,7 +1383,7 @@ declare namespace distributedData { */ getResultSet(keyPrefix: string, callback: AsyncCallback): void; getResultSet(keyPrefix: string): Promise; - + /** * Obtains the {@code KvStoreResultSet} object matching the specified {@code Query} object. * @@ -1455,7 +1455,7 @@ declare namespace distributedData { * @note N/A * @since 7 * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @param devices Indicates the list of devices to which to synchronize the database. + * @param deviceIds Indicates the list of devices to which to synchronize the database. * @param mode Indicates the synchronization mode. The value can be {@code PUSH}, {@code PULL}, or {@code PUSH_PULL}. * @param allodelayMs Indicates the delay allowed for the synchronization, in milliseconds. * @param query Indicates the {@code Query} object. @@ -1464,8 +1464,8 @@ declare namespace distributedData { * occurs: {@code INVALID_ARGUMENT}, * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and {@code DB_ERROR}. */ - sync(devices: string[], mode: SyncMode, allodelayMs?: number): void; - sync(devices: string[], query: Query, mode: SyncMode, allodelayMs?: number): void; + sync(deviceIds: string[], mode: SyncMode, allodelayMs?: number): void; + sync(deviceIds: string[], query: Query, mode: SyncMode, allodelayMs?: number): void; /** * Register Synchronizes SingleKvStore databases callback. @@ -1495,12 +1495,12 @@ declare namespace distributedData { * @note N/A * @since 8 * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @param defaultDelayMs Indicates the default delay allowed for the database synchronization, in milliseconds. + * @param defaultAllowedDelayMs Indicates the default delay allowed for the database synchronization, in milliseconds. * @throws Throws this exception if any of the following errors occurs:{@code INVALID_ARGUMENT}, * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and {@code DB_ERROR}. */ - setSyncParam(defaultDelayMs: number, callback: AsyncCallback): void; - setSyncParam(defaultDelayMs: number): Promise; + setSyncParam(defaultAllowedDelayMs: number, callback: AsyncCallback): void; + setSyncParam(defaultAllowedDelayMs: number): Promise; /** * Get the security level of the database. @@ -1725,15 +1725,15 @@ declare namespace distributedData { * @note N/A * @since 8 * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @param devices Indicates the list of IDs of devices whose + * @param deviceIds Indicates the list of IDs of devices whose * {@code DeviceKVStore} databases are to be synchronized. * @param mode Indicates the synchronization mode, {@code PUSH}, {@code PULL}, or * {@code PUSH_PULL}. * @permission ohos.permission.DISTRIBUTED_DATASYNC * @throws Throws this exception if no DeviceKVStore database is available. */ - sync(devices: string[], mode: SyncMode, allodelayMs?: number): void; - sync(devices: string[], query: Query, mode: SyncMode, allodelayMs?: number): void; + sync(deviceIds: string[], mode: SyncMode, allodelayMs?: number): void; + sync(deviceIds: string[], query: Query, mode: SyncMode, allodelayMs?: number): void; /** * Register Synchronizes DeviceKVStore databases callback. -- Gitee From 85d76594be78692c5ac2c068225543b7c5f99bc5 Mon Sep 17 00:00:00 2001 From: wufengshan Date: Mon, 23 May 2022 14:40:14 +0800 Subject: [PATCH 13/18] Signed-off-by: wufengshan Changes to be committed: --- api/@ohos.data.distributedData.d.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index ff81496b52..f77747965c 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1457,15 +1457,15 @@ declare namespace distributedData { * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @param deviceIds Indicates the list of devices to which to synchronize the database. * @param mode Indicates the synchronization mode. The value can be {@code PUSH}, {@code PULL}, or {@code PUSH_PULL}. - * @param allodelayMs Indicates the delay allowed for the synchronization, in milliseconds. + * @param delayMs Indicates the delay allowed for the synchronization, in milliseconds. * @param query Indicates the {@code Query} object. * @throws Throws this exception if any of the following errors * @permission ohos.permission.DISTRIBUTED_DATASYNC * occurs: {@code INVALID_ARGUMENT}, * {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and {@code DB_ERROR}. */ - sync(deviceIds: string[], mode: SyncMode, allodelayMs?: number): void; - sync(deviceIds: string[], query: Query, mode: SyncMode, allodelayMs?: number): void; + sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void; + sync(deviceIds: string[], query: Query, mode: SyncMode, delayMs?: number): void; /** * Register Synchronizes SingleKvStore databases callback. @@ -1655,6 +1655,7 @@ declare namespace distributedData { * @since 9 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @param predicates Indicates the key. + * @param deviceId Indicates the ID of the device to which the results belong. * Spaces before and after the key will be cleared. * @throws Throws this exception if any of the following errors * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and @@ -1726,14 +1727,15 @@ declare namespace distributedData { * @since 8 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @param deviceIds Indicates the list of IDs of devices whose + * @param delayMs Indicates the delay allowed for the synchronization, in milliseconds. * {@code DeviceKVStore} databases are to be synchronized. * @param mode Indicates the synchronization mode, {@code PUSH}, {@code PULL}, or * {@code PUSH_PULL}. * @permission ohos.permission.DISTRIBUTED_DATASYNC * @throws Throws this exception if no DeviceKVStore database is available. */ - sync(deviceIds: string[], mode: SyncMode, allodelayMs?: number): void; - sync(deviceIds: string[], query: Query, mode: SyncMode, allodelayMs?: number): void; + sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void; + sync(deviceIds: string[], query: Query, mode: SyncMode, delayMs?: number): void; /** * Register Synchronizes DeviceKVStore databases callback. -- Gitee From 7aa6de4c10085f5bcdecae3a64480d7ec22ab45f Mon Sep 17 00:00:00 2001 From: wufengshan Date: Mon, 23 May 2022 14:53:49 +0800 Subject: [PATCH 14/18] Signed-off-by: wufengshan modified: api/@ohos.data.distributedData.d.ts --- api/@ohos.data.distributedData.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index f77747965c..6df82ec38c 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1398,7 +1398,7 @@ declare namespace distributedData { getResultSet(query: Query): Promise; /** - * Obtains the KvStoreResultSet object matching the specified Predicate object.. + * Obtains the KvStoreResultSet object matching the specified Predicate object. * * @note N/A * @since 9 @@ -1634,7 +1634,7 @@ declare namespace distributedData { getResultSet(deviceId: string, query: Query): Promise; /** - * Obtains the KvStoreResultSet object matching the specified Predicate object.. + * Obtains the KvStoreResultSet object matching the specified Predicate object. * * @note N/A * @since 9 -- Gitee From 379a9f87f5886f42b1bddc6f741ea2e3cb0b3dcc Mon Sep 17 00:00:00 2001 From: wufengshan Date: Mon, 23 May 2022 15:12:50 +0800 Subject: [PATCH 15/18] Signed-off-by: wufengshan modified: api/@ohos.data.distributedData.d.ts --- api/@ohos.data.distributedData.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index 6df82ec38c..dcce061b7a 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1142,7 +1142,7 @@ declare namespace distributedData { * @note N/A * @since 9 * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @param value Indicates the datasharePredicates. + * @param value Indicates the data record to put. * Spaces before and after the key will be cleared. * @throws Throws this exception if any of the following errors * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and @@ -1403,7 +1403,7 @@ declare namespace distributedData { * @note N/A * @since 9 * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @param predicates Indicates the key. + * @param predicates Indicates the datasharePredicates. * Spaces before and after the key will be cleared. * @throws Throws this exception if any of the following errors * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and @@ -1639,7 +1639,7 @@ declare namespace distributedData { * @note N/A * @since 9 * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @param predicates Indicates the key. + * @param predicates Indicates the datasharePredicates. * Spaces before and after the key will be cleared. * @throws Throws this exception if any of the following errors * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and @@ -1655,7 +1655,7 @@ declare namespace distributedData { * @since 9 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @param predicates Indicates the key. - * @param deviceId Indicates the ID of the device to which the results belong. + * * @param deviceId Indicates the ID of the device to which the results belong. * Spaces before and after the key will be cleared. * @throws Throws this exception if any of the following errors * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and -- Gitee From db17155708f377961e6331cd1ff20c9285706779 Mon Sep 17 00:00:00 2001 From: wufengshan Date: Tue, 24 May 2022 11:15:54 +0800 Subject: [PATCH 16/18] Update Signed-off-by: wufengshan --- api/@ohos.data.distributedData.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index dcce061b7a..36ab5ba86a 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1148,8 +1148,8 @@ declare namespace distributedData { * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and * {@code DB_ERROR}. */ - put(value: Array, callback: AsyncCallback): void; - put(value: Array): Promise; + putBatch(value: Array, callback: AsyncCallback): void; + putBatch(value: Array): Promise; /** * Deletes the key-value pair based on a specified key. @@ -1641,7 +1641,7 @@ declare namespace distributedData { * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @param predicates Indicates the datasharePredicates. * Spaces before and after the key will be cleared. - * @throws Throws this exception if any of the following errors + * @throws Throws this exception if any of the following errors * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and * {@code DB_ERROR}. */ @@ -1655,9 +1655,9 @@ declare namespace distributedData { * @since 9 * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @param predicates Indicates the key. - * * @param deviceId Indicates the ID of the device to which the results belong. + * @param deviceId Indicates the ID of the device to which the results belong. * Spaces before and after the key will be cleared. - * @throws Throws this exception if any of the following errors + * @throws Throws this exception if any of the following errors * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and * {@code DB_ERROR}. */ -- Gitee From a8ace3376f8cbf64003a7c6df140ae04d40ba034 Mon Sep 17 00:00:00 2001 From: wufengshan Date: Tue, 24 May 2022 11:19:59 +0800 Subject: [PATCH 17/18] Update Signed-off-by: wufengshan --- api/@ohos.data.distributedData.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index 36ab5ba86a..a24dd9d2cb 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1159,7 +1159,7 @@ declare namespace distributedData { * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @param key Indicates the key. The length must be less than {@code MAX_KEY_LENGTH}. * Spaces before and after the key will be cleared. - * @throws Throws this exception if any of the following errors + * @throws Throws this exception if any of the following errors * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and * {@code DB_ERROR}, and {@code KEY_NOT_FOUND}. */ @@ -1174,7 +1174,7 @@ declare namespace distributedData { * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @param predicates Indicates the datasharePredicates. * Spaces before and after the key will be cleared. - * @throws Throws this exception if any of the following errors + * @throws Throws this exception if any of the following errors * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and * {@code DB_ERROR}. */ -- Gitee From 1ebe5bb5c482beace871cb44f7ac618e9f875ba1 Mon Sep 17 00:00:00 2001 From: wufengshan Date: Tue, 24 May 2022 11:20:56 +0800 Subject: [PATCH 18/18] Update Signed-off-by: wufengshan --- api/@ohos.data.distributedData.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index a24dd9d2cb..a2827d4fe4 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1405,7 +1405,7 @@ declare namespace distributedData { * @syscap SystemCapability.DistributedDataManager.KVStore.Core * @param predicates Indicates the datasharePredicates. * Spaces before and after the key will be cleared. - * @throws Throws this exception if any of the following errors + * @throws Throws this exception if any of the following errors * occurs: {@code SERVER_UNAVAILABLE}, {@code IPC_ERROR}, and * {@code DB_ERROR}. */ -- Gitee