未验证 提交 2984fef8 编写于 作者: O openharmony_ci 提交者: Gitee

!17927 [翻译完成】#I6URZE

Merge pull request !17927 from Annie_wang/PR17140
...@@ -212,7 +212,7 @@ Creates and obtains a KV store. This API uses a promise to return the result. ...@@ -212,7 +212,7 @@ Creates and obtains a KV store. This API uses a promise to return the result.
| Type | Description | | Type | Description |
| -------------------------------------- | ------------------------ | | -------------------------------------- | ------------------------ |
| Promise<T>, <T extends [KVStore](#kvstore)> | Promise used to return the KV store instance created. | | Promise<T>, <T extends [KVStore](#kvstore)> | Promise used to return the KV store instance created.|
**Example** **Example**
...@@ -485,7 +485,7 @@ Obtains the IDs of all KV stores that are created by [getKVStore()](#getkvstore) ...@@ -485,7 +485,7 @@ Obtains the IDs of all KV stores that are created by [getKVStore()](#getkvstore)
| Type | Description | | Type | Description |
| ------------- | -------------- | | ------------- | -------------- |
| Promise<string[]>| Promise used to return the IDs of all created KV stores. | | Promise<string[]>| Promise used to return the IDs of all created KV stores.|
**Example** **Example**
...@@ -3754,7 +3754,7 @@ try { ...@@ -3754,7 +3754,7 @@ try {
sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void
Synchronizes the KV store manually. For details about the synchronization modes of the distributed data service, see [Distributed Data Service Overview](../../database/database-mdds-overview.md). Synchronizes the KV store manually.
> **NOTE**<br/> > **NOTE**<br/>
> >
> The value of **deviceIds** is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications. > The value of **deviceIds** is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications.
...@@ -3825,7 +3825,7 @@ Subscribes to data changes of the specified type. ...@@ -3825,7 +3825,7 @@ Subscribes to data changes of the specified type.
| -------- | --------------------------------------------------------- | ---- | ---------------------------------------------------- | | -------- | --------------------------------------------------------- | ---- | ---------------------------------------------------- |
| event | string | Yes | Event to subscribe to. The value is **dataChange**, which indicates a data change event.| | event | string | Yes | Event to subscribe to. The value is **dataChange**, which indicates a data change event.|
| type | [SubscribeType](#subscribetype) | Yes | Type of data change. | | type | [SubscribeType](#subscribetype) | Yes | Type of data change. |
| listener | Callback&lt;[ChangeNotification](#changenotification)&gt; | Yes | Callback invoked to return the result. | | listener | Callback&lt;[ChangeNotification](#changenotification)&gt; | Yes | Callback invoked to return the data changes. |
**Example** **Example**
...@@ -5175,7 +5175,7 @@ try { ...@@ -5175,7 +5175,7 @@ try {
sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void
Synchronizes the KV store manually. For details about the synchronization modes of the distributed data service, see [Distributed Data Service Overview](../../database/database-mdds-overview.md). Synchronizes the KV store manually.
> **NOTE**<br/> > **NOTE**<br/>
> >
...@@ -5247,7 +5247,7 @@ Subscribes to data changes of the specified type. ...@@ -5247,7 +5247,7 @@ Subscribes to data changes of the specified type.
| -------- | --------------------------------------------------------- | ---- | ---------------------------------------------------- | | -------- | --------------------------------------------------------- | ---- | ---------------------------------------------------- |
| event | string | Yes | Event to subscribe to. The value is **dataChange**, which indicates a data change event.| | event | string | Yes | Event to subscribe to. The value is **dataChange**, which indicates a data change event.|
| type | [SubscribeType](#subscribetype) | Yes | Type of data change. | | type | [SubscribeType](#subscribetype) | Yes | Type of data change. |
| listener | Callback&lt;[ChangeNotification](#changenotification)&gt; | Yes | Callback invoked to return the result. | | listener | Callback&lt;[ChangeNotification](#changenotification)&gt; | Yes | Callback invoked to return the data changes. |
**Example** **Example**
......
# @ohos.data.distributedKVStore (Distributed KV Store) # @ohos.data.distributedKVStore (Distributed KV Store)
The **distributedKVStore** module implements collaboration between databases for different devices that forms a Super Device. The APIs provided by this module can be used to save data to a distributed key-value (KV) store and perform operations, such as adding, deleting, modifying, querying, and synchronizing data in distributed KV stores. The **distributedKVStore** module implements collaboration between databases for different devices that forms a Super Device. You can use the APIs provided by this module to save application data to a distributed key-value (KV) store and perform operations, such as adding, deleting, modifying, querying, and synchronizing data in distributed KV stores.
The **distributedKVStore** module provides the following functions: The **distributedKVStore** module provides the following functions:
- [KVManager](#kvmanager): provides a **KVManager** instance to obtain KV store information. - [KVManager](#kvmanager): provides a **KVManager** instance to obtain KV store information.
- [KVStoreResultSet](#kvstoreresultset): provides APIs for obtaining KV store result sets. - [KVStoreResultSet](#kvstoreresultset): provides APIs for accessing the results obtained from a KV store.
- [Query](#query): provides APIs for setting predicates and querying data using predicates. - [Query](#query): provides APIs for setting predicates for data query.
- [SingleKVStore](#singlekvstore): provides APIs for querying data in single KV stores and synchronizing data. The single KV stores manage data without distinguishing devices. - [SingleKVStore](#singlekvstore): provides APIs for querying and synchronizing data in single KV stores. The single KV stores manage data without distinguishing devices.
- [DeviceKVStore](#devicekvstore): provides APIs for querying in device KV stores and synchronizing data. This class inherits from [SingleKVStore](#singlekvstore). The device KV stores manage data by device. - [DeviceKVStore](#devicekvstore): provides APIs for querying and synchronizing data in device KV stores. This class inherits from [SingleKVStore](#singlekvstore). The device KV stores manage data by device.
> **NOTE** > **NOTE**
> >
...@@ -1832,7 +1832,7 @@ try { ...@@ -1832,7 +1832,7 @@ try {
limit(total: number, offset: number): Query limit(total: number, offset: number): Query
Creates a **Query** object to specify the number of results and where to start. Creates a **Query** object to specify the number of records of the query result and where to start.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core **System capability**: SystemCapability.DistributedDataManager.KVStore.Core
...@@ -4484,7 +4484,7 @@ try { ...@@ -4484,7 +4484,7 @@ try {
sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void sync(deviceIds: string[], mode: SyncMode, delayMs?: number): void
Synchronizes the KV store manually. For details about the synchronization modes of the distributed data service, see [Distributed Data Service Overview](../../database/database-mdds-overview.md). Synchronizes the KV store manually. For details about the synchronization modes of KV stores, see [Cross-Device Synchronization of KV Stores](../../database/data-sync-of-kv-store.md).
> **NOTE** > **NOTE**
> >
> The value of **deviceIds** is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications. > The value of **deviceIds** is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications.
...@@ -4554,7 +4554,7 @@ deviceManager.createDeviceManager('bundleName', (err, value) => { ...@@ -4554,7 +4554,7 @@ deviceManager.createDeviceManager('bundleName', (err, value) => {
sync(deviceIds: string[], query: Query, mode: SyncMode, delayMs?: number): void sync(deviceIds: string[], query: Query, mode: SyncMode, delayMs?: number): void
Synchronizes the KV store manually. This API returns the result synchronously. For details about the synchronization modes of the distributed data service, see [Distributed Data Service Overview](../../database/database-mdds-overview.md). Synchronizes the KV store manually. This API returns the result synchronously. For details about the synchronization modes of KV stores, see [Cross-Device Synchronization of KV Stores](../../database/data-sync-of-kv-store.md).
> **NOTE**<br/> > **NOTE**<br/>
> >
> The value of **deviceIds** is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications. > The value of **deviceIds** is obtained by [deviceManager.getTrustedDeviceListSync](js-apis-device-manager.md#gettrusteddevicelistsync). The APIs of the **deviceManager** module are system interfaces and available only to system applications.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册