提交 2c534d18 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 19d0e8d3
...@@ -10,7 +10,7 @@ The **distributedKVStore** module provides the following functions: ...@@ -10,7 +10,7 @@ The **distributedKVStore** module provides the following functions:
- [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 data in single KV stores and synchronizing data. 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 in device KV stores and synchronizing data. This class inherits from [SingleKVStore](#singlekvstore). The device KV stores manage data by device.
> **NOTE**<br/> > **NOTE**
> >
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...@@ -248,79 +248,9 @@ try { ...@@ -248,79 +248,9 @@ try {
## distributedKVStore.createKVManager ## distributedKVStore.createKVManager
createKVManager(config: KVManagerConfig, callback: AsyncCallback&lt;KVManager&gt;): void createKVManager(config: KVManagerConfig): KVManager
Creates a **KVManager** instance to manage KV stores. This API uses an asynchronous callback to return the result. Creates a **KVManager** instance to manage KV stores.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------------- | ---- | ----------------------------------------------------------- |
| config | [KVManagerConfig](#kvmanagerconfig) | Yes | **KVManager** instance configuration, including the bundle name of the invoker and the context of the application.|
| callback | AsyncCallback&lt;[KVManager](#kvmanager)&gt; | Yes | Callback invoked to return the **KVManager** instance created. |
**Example**
Stage model:
```js
import AbilityStage from '@ohos.application.Ability'
let kvManager;
export default class MyAbilityStage extends AbilityStage {
onCreate() {
console.log("MyAbilityStage onCreate")
let context = this.context
const kvManagerConfig = {
context: context,
bundleName: 'com.example.datamanagertest',
}
try {
distributedKVStore.createKVManager(kvManagerConfig, function (err, manager) {
if (err) {
console.error(`Failed to create KVManager.code is ${err.code},message is ${err.message}`);
return;
}
console.log("Created KVManager successfully");
kvManager = manager;
});
} catch (e) {
console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`);
}
}
}
```
FA model:
```js
import featureAbility from '@ohos.ability.featureAbility'
let kvManager;
let context = featureAbility.getContext()
const kvManagerConfig = {
context: context,
bundleName: 'com.example.datamanagertest',
}
try {
distributedKVStore.createKVManager(kvManagerConfig, function (err, manager) {
if (err) {
console.error(`Failed to create KVManager.code is ${err.code},message is ${err.message}`);
return;
}
console.log("Created KVManager successfully");
kvManager = manager;
});
} catch (e) {
console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`);
}
```
## distributedKVStore.createKVManager
createKVManager(config: KVManagerConfig): Promise&lt;KVManager&gt;
Creates a **KVManager** instance to manage KV stores. This API uses a promise to return the result.
**System capability**: SystemCapability.DistributedDataManager.KVStore.Core **System capability**: SystemCapability.DistributedDataManager.KVStore.Core
...@@ -328,13 +258,13 @@ Creates a **KVManager** instance to manage KV stores. This API uses a promise to ...@@ -328,13 +258,13 @@ Creates a **KVManager** instance to manage KV stores. This API uses a promise to
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ----------------------------- | ---- | --------------------------------------------------------- | | ------ | ----------------------------- | ---- | --------------------------------------------------------- |
| config | [KVManagerConfig](#kvmanager) | Yes | Configuration of the **KVManager** instance, including the bundle name and user information of the caller.| | config | [KVManagerConfig](#kvmanagerconfig) | Yes | **KVManager** instance configuration, including the bundle name and application context of the caller.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------------------------------- | ------------------------------------------ | | -------------------------------------- | ------------------------------------------ |
| Promise&lt;[KVManager](#kvmanager)&gt; | Promise used to return the **KVManager** instance created.| | [KVManager](#kvmanager) | **KVManager** instance created.|
**Example** **Example**
...@@ -342,6 +272,7 @@ Stage model: ...@@ -342,6 +272,7 @@ Stage model:
```js ```js
import AbilityStage from '@ohos.application.Ability' import AbilityStage from '@ohos.application.Ability'
let kvManager; let kvManager;
export default class MyAbilityStage extends AbilityStage { export default class MyAbilityStage extends AbilityStage {
onCreate() { onCreate() {
...@@ -352,12 +283,8 @@ export default class MyAbilityStage extends AbilityStage { ...@@ -352,12 +283,8 @@ export default class MyAbilityStage extends AbilityStage {
bundleName: 'com.example.datamanagertest', bundleName: 'com.example.datamanagertest',
} }
try { try {
distributedKVStore.createKVManager(kvManagerConfig).then((manager) => { kvManager = distributedKVStore.createKVManager(kvManagerConfig);
console.log("Created KVManager successfully"); console.log("Created KVManager successfully");
kvManager = manager;
}).catch((err) => {
console.error(`Failed to create KVManager.code is ${err.code},message is ${err.message}`);
});
} catch (e) { } catch (e) {
console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`); console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`);
} }
...@@ -376,12 +303,8 @@ const kvManagerConfig = { ...@@ -376,12 +303,8 @@ const kvManagerConfig = {
bundleName: 'com.example.datamanagertest', bundleName: 'com.example.datamanagertest',
} }
try { try {
distributedKVStore.createKVManager(kvManagerConfig).then((manager) => { kvManager = distributedKVStore.createKVManager(kvManagerConfig);
console.log("Created KVManager successfully"); console.log("Created KVManager successfully");
kvManager = manager;
}).catch((err) => {
console.error(`Failed to create KVManager.code is ${err.code},message is ${err.message}`);
});
} catch (e) { } catch (e) {
console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`); console.error(`Failed to create KVManager.code is ${e.code},message is ${e.message}`);
} }
...@@ -405,7 +328,7 @@ Creates and obtains a distributed KV store. This API uses an asynchronous callba ...@@ -405,7 +328,7 @@ Creates and obtains a distributed KV store. This API uses an asynchronous callba
| -------- | ---------------------- | ---- | ------------------------------------------------------------ | | -------- | ---------------------- | ---- | ------------------------------------------------------------ |
| storeId | string | Yes | Unique identifier of the KV store. The length cannot exceed [MAX_STORE_ID_LENGTH](#constants).| | storeId | string | Yes | Unique identifier of the KV store. The length cannot exceed [MAX_STORE_ID_LENGTH](#constants).|
| options | [Options](#options) | Yes | Configuration of the KV store to create. | | options | [Options](#options) | Yes | Configuration of the KV store to create. |
| callback | AsyncCallback&lt;T&gt; | Yes | Callback invoked to return the distributed single or device KV store created. | | callback | AsyncCallback&lt;T&gt; | Yes | Callback invoked to return the distributed KV store (**SingleKVStore** or **DeviceKVStore**) instance created.|
**Error codes** **Error codes**
...@@ -462,7 +385,7 @@ Creates and obtains a distributed KV store. This API uses a promise to return th ...@@ -462,7 +385,7 @@ Creates and obtains a distributed KV store. This API uses a promise to return th
| Type | Description | | Type | Description |
| ---------------- | ------------------------------------------------------------ | | ---------------- | ------------------------------------------------------------ |
| Promise&lt;T&gt; | Promise used to return the distributed single or device KV store created.| | Promise&lt;T&gt; | Promise used to return the distributed KV store (**SingleKVStore** or **DeviceKVStore**) instance created.|
**Error codes** **Error codes**
...@@ -617,7 +540,7 @@ Deletes a distributed KV store. This API uses an asynchronous callback to return ...@@ -617,7 +540,7 @@ Deletes a distributed KV store. This API uses an asynchronous callback to return
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message**| | ID| **Error Message**|
| ------------ | ------------ | | ------------ | ------------ |
| 15100004 | Not found. | | 15100004 | Not found. |
...@@ -681,7 +604,7 @@ Deletes a distributed KV store. This API uses a promise to return the result. ...@@ -681,7 +604,7 @@ Deletes a distributed KV store. This API uses a promise to return the result.
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message**| | ID| **Error Message**|
| ------------ | ------------ | | ------------ | ------------ |
| 15100004 | Not found. | | 15100004 | Not found. |
...@@ -799,7 +722,7 @@ Subscribes to service status changes. ...@@ -799,7 +722,7 @@ Subscribes to service status changes.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------- | -------------------- | ---- | ------------------------------------------------------------ | | ------------- | -------------------- | ---- | ------------------------------------------------------------ |
| event | string | Yes | Event to subscribe to. The value is **distributedDataServiceDie**, which indicates a service status change event.| | event | string | Yes | Event to subscribe to. The value is **distributedDataServiceDie**, which indicates a service status change event.|
| deathCallback | Callback&lt;void&gt; | Yes | Callback invoked to return the result. | | deathCallback | Callback&lt;void&gt; | Yes | Callback invoked to return service status changes. |
**Example** **Example**
...@@ -2185,7 +2108,7 @@ Adds a KV pair of the specified type to this KV store. This API uses an asynchro ...@@ -2185,7 +2108,7 @@ Adds a KV pair of the specified type to this KV store. This API uses an asynchro
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2234,7 +2157,7 @@ Adds a KV pair of the specified type to this KV store. This API uses a promise t ...@@ -2234,7 +2157,7 @@ Adds a KV pair of the specified type to this KV store. This API uses a promise t
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2275,7 +2198,7 @@ Batch inserts KV pairs to this single KV store. This API uses an asynchronous ca ...@@ -2275,7 +2198,7 @@ Batch inserts KV pairs to this single KV store. This API uses an asynchronous ca
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2342,7 +2265,7 @@ Batch inserts KV pairs to this single KV store. This API uses a promise to retur ...@@ -2342,7 +2265,7 @@ Batch inserts KV pairs to this single KV store. This API uses a promise to retur
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2402,7 +2325,7 @@ Writes data to this single KV store. This API uses an asynchronous callback to r ...@@ -2402,7 +2325,7 @@ Writes data to this single KV store. This API uses an asynchronous callback to r
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2459,7 +2382,7 @@ Write data to this KV store. This API uses a promise to return the result. ...@@ -2459,7 +2382,7 @@ Write data to this KV store. This API uses a promise to return the result.
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2507,7 +2430,7 @@ Deletes a KV pair from this KV store. This API uses an asynchronous callback to ...@@ -2507,7 +2430,7 @@ Deletes a KV pair from this KV store. This API uses an asynchronous callback to
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2562,7 +2485,7 @@ Deletes a KV pair from this KV store. This API uses a promise to return the resu ...@@ -2562,7 +2485,7 @@ Deletes a KV pair from this KV store. This API uses a promise to return the resu
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2610,7 +2533,7 @@ Deletes KV pairs from this KV store. This API uses an asynchronous callback to r ...@@ -2610,7 +2533,7 @@ Deletes KV pairs from this KV store. This API uses an asynchronous callback to r
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2660,7 +2583,7 @@ Deletes KV pairs from this KV store. This API uses a promise to return the resul ...@@ -2660,7 +2583,7 @@ Deletes KV pairs from this KV store. This API uses a promise to return the resul
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2709,7 +2632,7 @@ Batch deletes KV pairs from this single KV store. This API uses an asynchronous ...@@ -2709,7 +2632,7 @@ Batch deletes KV pairs from this single KV store. This API uses an asynchronous
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2777,7 +2700,7 @@ Batch deletes KV pairs from this single KV store. This API uses a promise to ret ...@@ -2777,7 +2700,7 @@ Batch deletes KV pairs from this single KV store. This API uses a promise to ret
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2836,7 +2759,7 @@ Deletes data of a device. This API uses an asynchronous callback to return the r ...@@ -2836,7 +2759,7 @@ Deletes data of a device. This API uses an asynchronous callback to return the r
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2890,7 +2813,7 @@ Deletes data of a device. This API uses a promise to return the result. ...@@ -2890,7 +2813,7 @@ Deletes data of a device. This API uses a promise to return the result.
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -2941,7 +2864,7 @@ Obtains the value of the specified key. This API uses an asynchronous callback t ...@@ -2941,7 +2864,7 @@ Obtains the value of the specified key. This API uses an asynchronous callback t
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100004 | Not found. | | 15100004 | Not found. |
...@@ -2997,7 +2920,7 @@ Obtains the value of the specified key. This API uses a promise to return the re ...@@ -2997,7 +2920,7 @@ Obtains the value of the specified key. This API uses a promise to return the re
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100004 | Not found. | | 15100004 | Not found. |
...@@ -3044,7 +2967,7 @@ Obtains all KV pairs that match the specified key prefix. This API uses an async ...@@ -3044,7 +2967,7 @@ Obtains all KV pairs that match the specified key prefix. This API uses an async
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3112,7 +3035,7 @@ Obtains all KV pairs that match the specified key prefix. This API uses a promis ...@@ -3112,7 +3035,7 @@ Obtains all KV pairs that match the specified key prefix. This API uses a promis
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3170,7 +3093,7 @@ Obtains the KV pairs that match the specified **Query** object. This API uses an ...@@ -3170,7 +3093,7 @@ Obtains the KV pairs that match the specified **Query** object. This API uses an
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3237,7 +3160,7 @@ Obtains the KV pairs that match the specified **Query** object. This API uses a ...@@ -3237,7 +3160,7 @@ Obtains the KV pairs that match the specified **Query** object. This API uses a
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3298,7 +3221,7 @@ Obtains a result set with the specified prefix from this single KV store. This A ...@@ -3298,7 +3221,7 @@ Obtains a result set with the specified prefix from this single KV store. This A
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3372,7 +3295,7 @@ Obtains a result set with the specified prefix from this single KV store. This A ...@@ -3372,7 +3295,7 @@ Obtains a result set with the specified prefix from this single KV store. This A
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3435,7 +3358,7 @@ Obtains a **KVStoreResultSet** object that matches the specified **Query** objec ...@@ -3435,7 +3358,7 @@ Obtains a **KVStoreResultSet** object that matches the specified **Query** objec
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3503,7 +3426,7 @@ Obtains a **KVStoreResultSet** object that matches the specified **Query** objec ...@@ -3503,7 +3426,7 @@ Obtains a **KVStoreResultSet** object that matches the specified **Query** objec
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3565,7 +3488,7 @@ Obtains a **KVStoreResultSet** object that matches the specified predicate objec ...@@ -3565,7 +3488,7 @@ Obtains a **KVStoreResultSet** object that matches the specified predicate objec
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3626,7 +3549,7 @@ Obtains a **KVStoreResultSet** object that matches the specified predicate objec ...@@ -3626,7 +3549,7 @@ Obtains a **KVStoreResultSet** object that matches the specified predicate objec
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3745,7 +3668,7 @@ Obtains the number of results that matches the specified **Query** object. This ...@@ -3745,7 +3668,7 @@ Obtains the number of results that matches the specified **Query** object. This
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3808,7 +3731,7 @@ Obtains the number of results that matches the specified **Query** object. This ...@@ -3808,7 +3731,7 @@ Obtains the number of results that matches the specified **Query** object. This
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3866,7 +3789,7 @@ Backs up a distributed KV store. This API uses an asynchronous callback to retur ...@@ -3866,7 +3789,7 @@ Backs up a distributed KV store. This API uses an asynchronous callback to retur
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3912,7 +3835,7 @@ Backs up an RDB store. This API uses a promise to return the result. ...@@ -3912,7 +3835,7 @@ Backs up an RDB store. This API uses a promise to return the result.
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3951,7 +3874,7 @@ Restores a distributed KV store from a database file. This API uses an asynchron ...@@ -3951,7 +3874,7 @@ Restores a distributed KV store from a database file. This API uses an asynchron
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -3997,7 +3920,7 @@ Restores a distributed KV store from a database file. This API uses a promise to ...@@ -3997,7 +3920,7 @@ Restores a distributed KV store from a database file. This API uses a promise to
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -4104,7 +4027,7 @@ Starts the transaction in this single KV store. This API uses an asynchronous ca ...@@ -4104,7 +4027,7 @@ Starts the transaction in this single KV store. This API uses an asynchronous ca
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -4172,7 +4095,7 @@ Starts the transaction in this single KV store. This API uses a promise to retur ...@@ -4172,7 +4095,7 @@ Starts the transaction in this single KV store. This API uses a promise to retur
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -4214,7 +4137,7 @@ Commits the transaction in this single KV store. This API uses an asynchronous c ...@@ -4214,7 +4137,7 @@ Commits the transaction in this single KV store. This API uses an asynchronous c
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -4253,7 +4176,7 @@ Commits the transaction in this single KV store. This API uses a promise to retu ...@@ -4253,7 +4176,7 @@ Commits the transaction in this single KV store. This API uses a promise to retu
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -4290,7 +4213,7 @@ Rolls back the transaction in this single KV store. This API uses an asynchronou ...@@ -4290,7 +4213,7 @@ Rolls back the transaction in this single KV store. This API uses an asynchronou
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -4329,7 +4252,7 @@ Rolls back the transaction in this single KV store. This API uses a promise to r ...@@ -4329,7 +4252,7 @@ Rolls back the transaction in this single KV store. This API uses a promise to r
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -4579,7 +4502,7 @@ Synchronizes the KV store manually. For details about the synchronization modes ...@@ -4579,7 +4502,7 @@ Synchronizes the KV store manually. For details about the synchronization modes
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | ------------------- | | ------------ | ------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100004 | Not found. | | 15100004 | Not found. |
...@@ -4632,7 +4555,7 @@ Synchronizes the KV store manually. This API returns the result synchronously. F ...@@ -4632,7 +4555,7 @@ Synchronizes the KV store manually. This API returns the result synchronously. F
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | ------------------- | | ------------ | ------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100004 | Not found. | | 15100004 | Not found. |
...@@ -4679,13 +4602,13 @@ Subscribes to data changes of the specified type. ...@@ -4679,13 +4602,13 @@ 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 change. |
**Error codes** **Error codes**
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100001 | Over max subscribe limits. | | 15100001 | Over max subscribe limits. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -4716,7 +4639,7 @@ Subscribes to synchronization complete events. ...@@ -4716,7 +4639,7 @@ Subscribes to synchronization complete events.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------ | --------------------------------------------- | ---- | ------------------------------------------------------ | | ------------ | --------------------------------------------- | ---- | ------------------------------------------------------ |
| event | string | Yes | Event to subscribe to. The value is **syncComplete**, which indicates a synchronization complete event.| | event | string | Yes | Event to subscribe to. The value is **syncComplete**, which indicates a synchronization complete event.|
| syncCallback | Callback&lt;Array&lt;[string, number]&gt;&gt; | Yes | Callback used to return the synchronization result. | | syncCallback | Callback&lt;Array&lt;[string, number]&gt;&gt; | Yes | Callback invoked to return the synchronization complete event. |
**Example** **Example**
...@@ -4751,13 +4674,13 @@ Unsubscribes from data changes. ...@@ -4751,13 +4674,13 @@ Unsubscribes from data changes.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------------- | ---- | -------------------------------------------------------- | | -------- | --------------------------------------------------------- | ---- | -------------------------------------------------------- |
| event | string | Yes | Event to unsubscribe from. The value is **dataChange**, which indicates a data change event.| | event | string | Yes | Event to unsubscribe from. The value is **dataChange**, which indicates a data change event.|
| listener | Callback&lt;[ChangeNotification](#changenotification)&gt; | No | Callback invoked to return the result. | | listener | Callback&lt;[ChangeNotification](#changenotification)&gt; | No | Callback for data changes. |
**Error codes** **Error codes**
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -4805,7 +4728,7 @@ Unsubscribes from synchronization complete events. ...@@ -4805,7 +4728,7 @@ Unsubscribes from synchronization complete events.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------ | --------------------------------------------- | ---- | ---------------------------------------------------------- | | ------------ | --------------------------------------------- | ---- | ---------------------------------------------------------- |
| event | string | Yes | Event to unsubscribe from. The value is **syncComplete**, which indicates a synchronization complete event.| | event | string | Yes | Event to unsubscribe from. The value is **syncComplete**, which indicates a synchronization complete event.|
| syncCallback | Callback&lt;Array&lt;[string, number]&gt;&gt; | No | Callback used to return the synchronization result. | | syncCallback | Callback&lt;Array&lt;[string, number]&gt;&gt; | No | Callback for the synchronization complete event. |
**Example** **Example**
...@@ -4856,7 +4779,7 @@ Obtains the security level of this KV store. This API uses an asynchronous callb ...@@ -4856,7 +4779,7 @@ Obtains the security level of this KV store. This API uses an asynchronous callb
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID** | **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -4895,7 +4818,7 @@ Obtains the security level of this KV store. This API uses a promise to return t ...@@ -4895,7 +4818,7 @@ Obtains the security level of this KV store. This API uses a promise to return t
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -4943,7 +4866,7 @@ Obtains the value of the specified key for this device. This API uses an asynchr ...@@ -4943,7 +4866,7 @@ Obtains the value of the specified key for this device. This API uses an asynchr
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100004 | Not found. | | 15100004 | Not found. |
...@@ -4999,7 +4922,7 @@ Obtains the value of the specified key for this device. This API uses a promise ...@@ -4999,7 +4922,7 @@ Obtains the value of the specified key for this device. This API uses a promise
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100004 | Not found. | | 15100004 | Not found. |
...@@ -5047,7 +4970,7 @@ Obtains a string value that matches the specified device ID and key. This API us ...@@ -5047,7 +4970,7 @@ Obtains a string value that matches the specified device ID and key. This API us
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100004 | Not found. | | 15100004 | Not found. |
...@@ -5104,7 +5027,7 @@ Obtains a string value that matches the specified device ID and key. This API us ...@@ -5104,7 +5027,7 @@ Obtains a string value that matches the specified device ID and key. This API us
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100004 | Not found. | | 15100004 | Not found. |
...@@ -5151,7 +5074,7 @@ Obtains all KV pairs that match the specified key prefix for this device. This A ...@@ -5151,7 +5074,7 @@ Obtains all KV pairs that match the specified key prefix for this device. This A
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -5219,7 +5142,7 @@ Obtains all KV pairs that match the specified key prefix for this device. This A ...@@ -5219,7 +5142,7 @@ Obtains all KV pairs that match the specified key prefix for this device. This A
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -5278,7 +5201,7 @@ Obtains all KV pairs that match the specified device ID and key prefix. This API ...@@ -5278,7 +5201,7 @@ Obtains all KV pairs that match the specified device ID and key prefix. This API
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -5347,7 +5270,7 @@ Obtains all KV pairs that match the specified device ID and key prefix. This API ...@@ -5347,7 +5270,7 @@ Obtains all KV pairs that match the specified device ID and key prefix. This API
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -5402,13 +5325,13 @@ Obtains all KV pairs that match the specified **Query** object for this device. ...@@ -5402,13 +5325,13 @@ Obtains all KV pairs that match the specified **Query** object for this device.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | ----------------------------------------------------- | | -------- | -------------------------------------- | ---- | ----------------------------------------------------- |
| query | [Query](query) | Yes | Key prefix to match. | | query | [Query](query) | Yes | Key prefix to match. |
| callback | AsyncCallback&lt;[Entry](#entry)[]&gt; | Yes | Callback used to return the KV pairs obtained.| | callback | AsyncCallback&lt;[Entry](#entry)[]&gt; | Yes | Callback invoked to return the KV pairs obtained.|
**Error codes** **Error codes**
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -5475,7 +5398,7 @@ Obtains all KV pairs that match the specified **Query** object for this device. ...@@ -5475,7 +5398,7 @@ Obtains all KV pairs that match the specified **Query** object for this device.
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -5537,7 +5460,7 @@ Obtains the KV pairs that match the specified device ID and **Query** object. Th ...@@ -5537,7 +5460,7 @@ Obtains the KV pairs that match the specified device ID and **Query** object. Th
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -5611,7 +5534,7 @@ Obtains the KV pairs that match the specified device ID and **Query** object. Th ...@@ -5611,7 +5534,7 @@ Obtains the KV pairs that match the specified device ID and **Query** object. Th
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -5673,7 +5596,7 @@ Obtains a result set with the specified prefix for this device. This API uses an ...@@ -5673,7 +5596,7 @@ Obtains a result set with the specified prefix for this device. This API uses an
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -5747,7 +5670,7 @@ Obtains a result set with the specified prefix for this device. This API uses a ...@@ -5747,7 +5670,7 @@ Obtains a result set with the specified prefix for this device. This API uses a
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -5811,7 +5734,7 @@ Obtains a **KVStoreResultSet** object that matches the specified device ID and k ...@@ -5811,7 +5734,7 @@ Obtains a **KVStoreResultSet** object that matches the specified device ID and k
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -5867,7 +5790,7 @@ Obtains a **KVStoreResultSet** object that matches the specified device ID and k ...@@ -5867,7 +5790,7 @@ Obtains a **KVStoreResultSet** object that matches the specified device ID and k
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -5914,7 +5837,7 @@ Obtains a **KVStoreResultSet** object that matches the specified device ID and * ...@@ -5914,7 +5837,7 @@ Obtains a **KVStoreResultSet** object that matches the specified device ID and *
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -5991,7 +5914,7 @@ Obtains a **KVStoreResultSet** object that matches the specified device ID and * ...@@ -5991,7 +5914,7 @@ Obtains a **KVStoreResultSet** object that matches the specified device ID and *
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -6064,7 +5987,7 @@ Obtains a **KVStoreResultSet** object that matches the specified **Query** objec ...@@ -6064,7 +5987,7 @@ Obtains a **KVStoreResultSet** object that matches the specified **Query** objec
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -6130,7 +6053,7 @@ Obtains a **KVStoreResultSet** object that matches the specified device ID and * ...@@ -6130,7 +6053,7 @@ Obtains a **KVStoreResultSet** object that matches the specified device ID and *
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -6200,7 +6123,7 @@ Obtains a **KVStoreResultSet** object that matches the specified predicate objec ...@@ -6200,7 +6123,7 @@ Obtains a **KVStoreResultSet** object that matches the specified predicate objec
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -6261,7 +6184,7 @@ Obtains a **KVStoreResultSet** object that matches the specified predicate objec ...@@ -6261,7 +6184,7 @@ Obtains a **KVStoreResultSet** object that matches the specified predicate objec
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -6314,7 +6237,7 @@ Obtains a **KVStoreResultSet** object that matches the specified predicate objec ...@@ -6314,7 +6237,7 @@ Obtains a **KVStoreResultSet** object that matches the specified predicate objec
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -6376,7 +6299,7 @@ Obtains a **KVStoreResultSet** object that matches the specified predicate objec ...@@ -6376,7 +6299,7 @@ Obtains a **KVStoreResultSet** object that matches the specified predicate objec
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -6425,7 +6348,7 @@ Obtains the number of results that match the specified **Query** object for this ...@@ -6425,7 +6348,7 @@ Obtains the number of results that match the specified **Query** object for this
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -6488,7 +6411,7 @@ Obtains the number of results that match the specified **Query** object for this ...@@ -6488,7 +6411,7 @@ Obtains the number of results that match the specified **Query** object for this
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -6547,7 +6470,7 @@ Obtains the number of results that matches the specified device ID and **Query** ...@@ -6547,7 +6470,7 @@ Obtains the number of results that matches the specified device ID and **Query**
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
...@@ -6616,7 +6539,7 @@ Obtains the number of results that matches the specified device ID and **Query** ...@@ -6616,7 +6539,7 @@ Obtains the number of results that matches the specified device ID and **Query**
For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md). For details about the error codes, see [Distributed KV Store Error Codes](../errorcodes/errorcode-distributedKVStore.md).
| **ID**| **Error Message** | | ID| **Error Message** |
| ------------ | -------------------------------------- | | ------------ | -------------------------------------- |
| 15100003 | Database corrupted. | | 15100003 | Database corrupted. |
| 15100005 | Database or result set already closed. | | 15100005 | Database or result set already closed. |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册