@@ -113,7 +182,7 @@ Provides configuration of the **KVManager** object, including the bundle name an
...
@@ -113,7 +182,7 @@ Provides configuration of the **KVManager** object, including the bundle name an
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| ----- | ------ | ------ | ------ |
| ----- | ------ | ------ | ------ |
| context | Context | Yes| Context of the application or function.<br>See [Context](js-apis-Context.md) for versions earlier than API version 9.<br>See [Context](js-apis-ability-context.md) for API version 9 or later.|
| context<sup>9+<sup> | Context | Yes| Application context.<br>For the application context of the FA model, see [Context](js-apis-Context.md).<br>For the application context of the stage model, see [Context](js-apis-ability-context.md).|
| userInfo | [UserInfo](#userinfo) | Yes | User information.|
| userInfo | [UserInfo](#userinfo) | Yes | User information.|
| bundleName | string | Yes | Bundle name.|
| bundleName | string | Yes | Bundle name.|
...
@@ -572,9 +641,9 @@ Provides KV store configuration.
...
@@ -572,9 +641,9 @@ Provides KV store configuration.
| createIfMissing | boolean | No| Whether to create a KV store if no database file exists. By default, a KV store is created.<br>**System capability**: SystemCapability.DistributedDataManager.KVStore.Core |
| createIfMissing | boolean | No| Whether to create a KV store if no database file exists. By default, a KV store is created.<br>**System capability**: SystemCapability.DistributedDataManager.KVStore.Core |
| encrypt | boolean | No|Whether to encrypt database files. By default, database files are not encrypted.<br>**System capability**: SystemCapability.DistributedDataManager.KVStore.Core |
| encrypt | boolean | No|Whether to encrypt database files. By default, database files are not encrypted.<br>**System capability**: SystemCapability.DistributedDataManager.KVStore.Core |
| backup | boolean | No|Whether to back up database files. By default, database files are backed up. <br>**System capability**: SystemCapability.DistributedDataManager.KVStore.Core |
| backup | boolean | No|Whether to back up database files. By default, database files are backed up. <br>**System capability**: SystemCapability.DistributedDataManager.KVStore.Core |
| autoSync | boolean | No|Whether database files are automatically synchronized. By default, database files are not automatically synchronized.<br>**System capability**: SystemCapability.DistributedDataManager.KVStore.Core<br>**Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC |
| autoSync | boolean | No|Whether database files are automatically synchronized. By default, database files are not automatically synchronized.<br>**System capability**: SystemCapability.DistributedDataManager.KVStore.Core<br>**Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC |
| kvStoreType | [KVStoreType](#kvstoretype) | No|Type of the KV store to create. By default, a device KV store is created. The device KV store stores data for multiple devices that collaborate with each other.<br>**System capability**: SystemCapability.DistributedDataManager.KVStore.Core|
| kvStoreType | [KVStoreType](#kvstoretype) | No|Type of the KV store to create. By default, a device KV store is created. The device KV store stores data for multiple devices that collaborate with each other.<br>**System capability**: SystemCapability.DistributedDataManager.KVStore.Core|
| securityLevel | [SecurityLevel](#securitylevel) | No|Security level of the KV store. By default, the security level is not set.<br>**System capability**: SystemCapability.DistributedDataManager.KVStore.Core |
| securityLevel | [SecurityLevel](#securitylevel) | No|Security level of the KV store. By default, the security level is not set.<br>**System capability**: SystemCapability.DistributedDataManager.KVStore.Core |
...
@@ -1238,7 +1307,7 @@ Creates a **Query** object to match the specified field whose value is equal to
...
@@ -1238,7 +1307,7 @@ Creates a **Query** object to match the specified field whose value is equal to
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1273,7 +1342,7 @@ Creates a **Query** object to match the specified field whose value is not equal
...
@@ -1273,7 +1342,7 @@ Creates a **Query** object to match the specified field whose value is not equal
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1308,7 +1377,7 @@ Creates a **Query** object to match the specified field whose value is greater t
...
@@ -1308,7 +1377,7 @@ Creates a **Query** object to match the specified field whose value is greater t
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1343,7 +1412,7 @@ Creates a **Query** object to match the specified field whose value is less than
...
@@ -1343,7 +1412,7 @@ Creates a **Query** object to match the specified field whose value is less than
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1378,7 +1447,7 @@ Creates a **Query** object to match the specified field whose value is greater t
...
@@ -1378,7 +1447,7 @@ Creates a **Query** object to match the specified field whose value is greater t
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1413,7 +1482,7 @@ Creates a **Query** object to match the specified field whose value is less than
...
@@ -1413,7 +1482,7 @@ Creates a **Query** object to match the specified field whose value is less than
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1447,7 +1516,7 @@ Creates a **Query** object to match the specified field whose value is **null**.
...
@@ -1447,7 +1516,7 @@ Creates a **Query** object to match the specified field whose value is **null**.
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1483,7 +1552,7 @@ Creates a **Query** object to match the specified field whose value is within th
...
@@ -1483,7 +1552,7 @@ Creates a **Query** object to match the specified field whose value is within th
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1518,7 +1587,7 @@ Creates a **Query** object to match the specified field whose value is within th
...
@@ -1518,7 +1587,7 @@ Creates a **Query** object to match the specified field whose value is within th
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1553,7 +1622,7 @@ Creates a **Query** object to match the specified field whose value is not withi
...
@@ -1553,7 +1622,7 @@ Creates a **Query** object to match the specified field whose value is not withi
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1588,7 +1657,7 @@ Creates a **Query** object to match the specified field whose value is not withi
...
@@ -1588,7 +1657,7 @@ Creates a **Query** object to match the specified field whose value is not withi
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1623,7 +1692,7 @@ Creates a **Query** object to match the specified field whose value is similar t
...
@@ -1623,7 +1692,7 @@ Creates a **Query** object to match the specified field whose value is similar t
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1658,7 +1727,7 @@ Creates a **Query** object to match the specified field whose value is not simil
...
@@ -1658,7 +1727,7 @@ Creates a **Query** object to match the specified field whose value is not simil
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1752,7 +1821,7 @@ Creates a **Query** object to sort the query results in ascending order.
...
@@ -1752,7 +1821,7 @@ Creates a **Query** object to sort the query results in ascending order.
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1787,7 +1856,7 @@ Creates a **Query** object to sort the query results in descending order.
...
@@ -1787,7 +1856,7 @@ Creates a **Query** object to sort the query results in descending order.
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1823,7 +1892,7 @@ Creates a **Query** object to specify the number of results and where to start.
...
@@ -1823,7 +1892,7 @@ Creates a **Query** object to specify the number of results and where to start.
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1860,7 +1929,7 @@ Creates a **Query** object to match the specified field whose value is not **nul
...
@@ -1860,7 +1929,7 @@ Creates a **Query** object to match the specified field whose value is not **nul
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1888,7 +1957,7 @@ Creates a **Query** object for a query condition group with a left parenthesis.
...
@@ -1888,7 +1957,7 @@ Creates a **Query** object for a query condition group with a left parenthesis.
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1918,7 +1987,7 @@ Creates a **Query** object for a query condition group with a right parenthesis.
...
@@ -1918,7 +1987,7 @@ Creates a **Query** object for a query condition group with a right parenthesis.
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1954,7 +2023,7 @@ Creates a **Query** object with a specified key prefix.
...
@@ -1954,7 +2023,7 @@ Creates a **Query** object with a specified key prefix.
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -1989,7 +2058,7 @@ Creates a **Query** object with an index preferentially used for query.
...
@@ -1989,7 +2058,7 @@ Creates a **Query** object with an index preferentially used for query.
| Type | Description |
| Type | Description |
| ------ | ------- |
| ------ | ------- |
| [Query](#query8) |**Query** object.|
| [Query](#query8) |**Query** object created.|
**Example**
**Example**
...
@@ -2025,7 +2094,7 @@ Creates a **Query** object with the device ID as the key prefix.
...
@@ -2025,7 +2094,7 @@ Creates a **Query** object with the device ID as the key prefix.
| predicates | Predicates | Yes |Conditions for deleting data. If this parameter is **null**, define the processing logic.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes |Conditions for deleting data. If this parameter is **null**, define the processing logic.|
| callback | AsyncCallback<void> | Yes |Callback used to return the result. |
| callback | AsyncCallback<void> | Yes |Callback used to return the result. |
| predicates | Predicates | Yes |Conditions for deleting data. If this parameter is **null**, define the processing logic.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes |Conditions for deleting data. If this parameter is **null**, define the processing logic.|
**Return value**
**Return value**
...
@@ -2288,7 +2357,7 @@ Deletes KV pairs that meet the specified predicates. This API uses a promise to
...
@@ -2288,7 +2357,7 @@ Deletes KV pairs that meet the specified predicates. This API uses a promise to
Obtains a **KvStoreResultSet** object that matches the specified **Predicates** object. This API uses an asynchronous callback to return the result.
Obtains a **KvStoreResultSet** object that matches the specified **DataSharePredicates** object. This API uses an asynchronous callback to return the result.
| predicates | Predicates | Yes |**Predicates** object to match. If this parameter is **null**, define the processing logic. |
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes |**DataSharePredicates** object to match. If this parameter is **null**, define the processing logic. |
| callback |AsyncCallback<[KvStoreResultSet](#kvstoreresultset8)> | Yes |Callback invoked to return the **KvStoreResultSet** object obtained.|
| callback |AsyncCallback<[KvStoreResultSet](#kvstoreresultset8)> | Yes |Callback invoked to return the **KvStoreResultSet** object obtained.|
| predicates |[Predicates](#) | Yes |**Predicates** object to match. If this parameter is **null**, define the processing logic. |
| predicates |[DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes |**DataSharePredicates** object to match. If this parameter is **null**, define the processing logic. |
**Return value**
**Return value**
...
@@ -3695,7 +3763,7 @@ Obtains a **KvStoreResultSet** object that matches the specified **Predicates**
...
@@ -3695,7 +3763,7 @@ Obtains a **KvStoreResultSet** object that matches the specified **Predicates**
Closes the **KvStoreResultSet** object returned by [SingleKvStore.getResultSet](#singlekvstore_getresultset). This API uses an asynchronous callback to return the result.
Closes the **KvStoreResultSet** object obtained by [SingleKvStore.getResultSet](#singlekvstore_getresultset). This API uses an asynchronous callback to return the result.
Closes the **KvStoreResultSet** object returned by [SingleKvStore.getResultSet](#singlekvstore_getresultset). This API uses a promise to return the result.
Closes the **KvStoreResultSet** object obtained by [SingleKvStore.getResultSet](#singlekvstore_getresultset). This API uses a promise to return the result.
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 the distributed data service, see [Distributed Data Service Overview] (../../database/database-mdds-overview.md).
...
@@ -4108,9 +4176,9 @@ Synchronizes the KV store manually. For details about the synchronization modes
...
@@ -4108,9 +4176,9 @@ Synchronizes the KV store manually. For details about the synchronization modes
Synchronizes the KV store manually. This API uses a synchronous mode. 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 the distributed data service, see [Distributed Data Service Overview] (../../database/database-mdds-overview.md).
Closes the **KvStoreResultSet** object returned by [DeviceKVStore.getResultSet](#devicekvstore_getresultset). This API uses an asynchronous callback to return the result.
Closes the **KvStoreResultSet** object obtained by [DeviceKVStore.getResultSet](#devicekvstore_getresultset). This API uses an asynchronous callback to return the result.
Closes the **KvStoreResultSet** object returned by [DeviceKVStore.getResultSet](#devicekvstore_getresultset). This API uses a promise to return the result.
Closes the **KvStoreResultSet** object obtained by [DeviceKVStore.getResultSet](#devicekvstore_getresultset). This API uses a promise to return the result.
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 the distributed data service, see [Distributed Data Service Overview] (../../database/database-mdds-overview.md).
...
@@ -5403,9 +5471,9 @@ Synchronizes the KV store manually. For details about the synchronization modes
...
@@ -5403,9 +5471,9 @@ Synchronizes the KV store manually. For details about the synchronization modes
Synchronizes the KV store manually. This API uses a synchronous mode. 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 the distributed data service, see [Distributed Data Service Overview] (../../database/database-mdds-overview.md).