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

!13687 [翻译完成】#I69L89

Merge pull request !13687 from Annie_wang/PR13321
...@@ -196,21 +196,22 @@ ...@@ -196,21 +196,22 @@
- Security - Security
- [@ohos.abilityAccessCtrl (Ability Access Control)](js-apis-abilityAccessCtrl.md) - [@ohos.abilityAccessCtrl (Ability Access Control)](js-apis-abilityAccessCtrl.md)
- [@ohos.privacyManager (Privacy Management)](js-apis-privacyManager.md) - [@ohos.privacyManager (Privacy Management)](js-apis-privacyManager.md)
- [@ohos.security.cert (Certificate)](js-apis-cert.md)
- [@ohos.security.cryptoFramework (Crypto Framework)](js-apis-cryptoFramework.md) - [@ohos.security.cryptoFramework (Crypto Framework)](js-apis-cryptoFramework.md)
- [@ohos.security.huks (HUKS)](js-apis-huks.md) - [@ohos.security.huks (HUKS)](js-apis-huks.md)
- [@ohos.userIAM.faceAuth (Facial Authentication)](js-apis-useriam-faceauth.md) - [@ohos.userIAM.faceAuth (Facial Authentication)](js-apis-useriam-faceauth.md)
- [@ohos.userIAM.userAuth (User Authentication)](js-apis-useriam-userauth.md) - [@ohos.userIAM.userAuth (User Authentication)](js-apis-useriam-userauth.md)
- [@system.cipher (Cipher Algorithm)](js-apis-system-cipher.md) - [@system.cipher (Cipher Algorithm)](js-apis-system-cipher.md)
- Data Management - Data Management
- [@ohos.data.dataAbility ](js-apis-data-ability.md) - [@ohos.data.dataAbility (DataAbility Predicates)](js-apis-data-ability.md)
- [@ohos.data.dataShare](js-apis-data-dataShare.md) - [@ohos.data.dataShare (DataShare)](js-apis-data-dataShare.md)
- [@ohos.data.dataSharePredicates](js-apis-data-dataSharePredicates.md) - [@ohos.data.dataSharePredicates (DataShare Predicates)](js-apis-data-dataSharePredicates.md)
- [@ohos.data.dataShareResultSet](js-apis-data-DataShareResultSet.md) - [@ohos.data.dataShareResultSet (DataShare Result Set)](js-apis-data-DataShareResultSet.md)
- [@ohos.data.distributedDataObject](js-apis-data-distributedobject.md) - [@ohos.data.distributedDataObject (Distributed Data Object)](js-apis-data-distributedobject.md)
- [@ohos.data.distributedKVStore](js-apis-distributedKVStore.md) - [@ohos.data.distributedKVStore (Distributed KV Store)](js-apis-distributedKVStore.md)
- [@ohos.data.preferences](js-apis-data-preferences.md) - [@ohos.data.preferences (Preferences)](js-apis-data-preferences.md)
- [@ohos.data.rdb](js-apis-data-rdb.md) - [@ohos.data.rdb (RDB)](js-apis-data-rdb.md)
- [@ohos.data.ValuesBucket](js-apis-data-valuesBucket.md) - [@ohos.data.ValuesBucket (Value Bucket)](js-apis-data-valuesBucket.md)
- data/rdb - data/rdb
- [resultSet](js-apis-data-resultset.md) - [resultSet](js-apis-data-resultset.md)
- File Management - File Management
......
此差异已折叠。
# @ohos.data.dataShareResultSet # @ohos.data.dataShareResultSet (DataShare Result Set)
The **DataShareResultSet** module provides APIs for accessing the result set obtained from the database. You can access the values in the specified rows or the value of the specified data type. The **DataShareResultSet** module provides APIs for accessing the result set obtained from the database. You can access the values in the specified rows or the value of the specified data type.
......
# @ohos.data.dataShare # @ohos.data.dataShare (DataShare)
The **DataShare** module allows an application to manage its own data and share data with other applications on the same device. The **DataShare** module allows an application to manage its own data and share data with other applications on the same device.
......
# Data Share Predicates # @ohos.data.dataSharePredicates (DataShare Predicates)
You can use **DataSharePredicates** to specify conditions for [updating](js-apis-data-dataShare.md#update), [deleting](js-apis-data-dataShare.md#delete), and [querying](js-apis-data-dataShare.md#query) data when **DataShare** is used to manage data. You can use **DataSharePredicates** to specify conditions for [updating](js-apis-data-dataShare.md#update), [deleting](js-apis-data-dataShare.md#delete), and [querying](js-apis-data-dataShare.md#query) data when **DataShare** is used to manage data.
...@@ -35,7 +35,7 @@ Currently, only the relational database (RDB) and key-value database (KVDB, sche ...@@ -35,7 +35,7 @@ Currently, only the relational database (RDB) and key-value database (KVDB, sche
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | --------------------------------------------------- | ---- | ---------------------- | | ------ | --------------------------------------------------- | ---- | ---------------------- |
| field | string | Yes | Column name in the database table. | | field | string | Yes | Column name in the database table. |
| value | [ValueType](js-apis-data-ValuesBucket.md#valuetype) | Yes | Value to match.| | value | [ValueType](js-apis-data-valuesBucket.md#valuetype) | Yes | Value to match.|
**Return value** **Return value**
...@@ -65,7 +65,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o ...@@ -65,7 +65,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | --------------------------------------------------- | ---- | ---------------------- | | ------ | --------------------------------------------------- | ---- | ---------------------- |
| field | string | Yes | Column name in the database table. | | field | string | Yes | Column name in the database table. |
| value | [ValueType](js-apis-data-ValuesBucket.md#valuetype) | Yes | Value to match.| | value | [ValueType](js-apis-data-valuesBucket.md#valuetype) | Yes | Value to match.|
**Return value** **Return value**
...@@ -439,8 +439,8 @@ Currently, only the RDB supports this **DataSharePredicates** object. ...@@ -439,8 +439,8 @@ Currently, only the RDB supports this **DataSharePredicates** object.
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | --------------------------------------------------- | ---- | ------------------------ | | ------ | --------------------------------------------------- | ---- | ------------------------ |
| field | string | Yes | Column name in the database table. | | field | string | Yes | Column name in the database table. |
| low | [ValueType](js-apis-data-ValuesBucket.md#valuetype) | Yes | The lowest value of the range.| | low | [ValueType](js-apis-data-valuesBucket.md#valuetype) | Yes | The lowest value of the range.|
| high | [ValueType](js-apis-data-ValuesBucket.md#valuetype) | Yes | The highest value of the range.| | high | [ValueType](js-apis-data-valuesBucket.md#valuetype) | Yes | The highest value of the range.|
**Return value** **Return value**
...@@ -470,8 +470,8 @@ Currently, only the RDB supports this **DataSharePredicates** object. ...@@ -470,8 +470,8 @@ Currently, only the RDB supports this **DataSharePredicates** object.
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | --------------------------------------------------- | ---- | ------------------------ | | ------ | --------------------------------------------------- | ---- | ------------------------ |
| field | string | Yes | Column name in the database table. | | field | string | Yes | Column name in the database table. |
| low | [ValueType](js-apis-data-ValuesBucket.md#valuetype) | Yes | The lowest value of the range.| | low | [ValueType](js-apis-data-valuesBucket.md#valuetype) | Yes | The lowest value of the range.|
| high | [ValueType](js-apis-data-ValuesBucket.md#valuetype) | Yes | The highest value of the range.| | high | [ValueType](js-apis-data-valuesBucket.md#valuetype) | Yes | The highest value of the range.|
**Return value** **Return value**
...@@ -501,7 +501,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o ...@@ -501,7 +501,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------- | --------- | ---- | ---------------------- | | ------- | --------- | ---- | ---------------------- |
| field | string | Yes | Column name in the database table. | | field | string | Yes | Column name in the database table. |
| value | [ValueType](js-apis-data-ValuesBucket.md#valuetype) | Yes | Value to match.| | value | [ValueType](js-apis-data-valuesBucket.md#valuetype) | Yes | Value to match.|
**Return value** **Return value**
...@@ -531,7 +531,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o ...@@ -531,7 +531,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | --------------------------------------------------- | ---- | ---------------------- | | ------ | --------------------------------------------------- | ---- | ---------------------- |
| field | string | Yes | Column name in the database table. | | field | string | Yes | Column name in the database table. |
| value | [ValueType](js-apis-data-ValuesBucket.md#valuetype) | Yes | Value to match.| | value | [ValueType](js-apis-data-valuesBucket.md#valuetype) | Yes | Value to match.|
**Return value** **Return value**
...@@ -561,7 +561,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o ...@@ -561,7 +561,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------- | --------- | ---- | ---------------------- | | ------- | --------- | ---- | ---------------------- |
| field | string | Yes | Column name in the database table. | | field | string | Yes | Column name in the database table. |
| value | [ValueType](js-apis-data-ValuesBucket.md#valuetype) | Yes | Value to match.| | value | [ValueType](js-apis-data-valuesBucket.md#valuetype) | Yes | Value to match.|
**Return value** **Return value**
...@@ -591,7 +591,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o ...@@ -591,7 +591,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------- | --------- | ---- | ---------------------- | | ------- | --------- | ---- | ---------------------- |
| field | string | Yes | Column name in the database table. | | field | string | Yes | Column name in the database table. |
| value | [ValueType](js-apis-data-ValuesBucket.md#valuetype) | Yes | Value to match.| | value | [ValueType](js-apis-data-valuesBucket.md#valuetype) | Yes | Value to match.|
**Return value** **Return value**
...@@ -790,7 +790,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o ...@@ -790,7 +790,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------- | ---------------- | ---- | --------------------------------------- | | ------- | ---------------- | ---- | --------------------------------------- |
| field | string | Yes| Column name in the database table. | | field | string | Yes| Column name in the database table. |
| value | Array<[ValueType](js-apis-data-ValuesBucket.md#valuetype)> | Yes | Array of the values to match.| | value | Array<[ValueType](js-apis-data-valuesBucket.md#valuetype)> | Yes | Array of the values to match.|
**Return value** **Return value**
...@@ -820,7 +820,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o ...@@ -820,7 +820,7 @@ Currently, only the RDB and KVDB (schema) support this **DataSharePredicates** o
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------- | ---------------- | ---- | --------------------------------------- | | ------- | ---------------- | ---- | --------------------------------------- |
| field | string | Yes | Column name in the database table. | | field | string | Yes | Column name in the database table. |
| value | Array<[ValueType](js-apis-data-ValuesBucket.md#valuetype)> | Yes | Array of the values to match.| | value | Array<[ValueType](js-apis-data-valuesBucket.md#valuetype)> | Yes | Array of the values to match.|
**Return value** **Return value**
......
# Distributed Data Object # @ohos.data.distributedDataObject (Distributed Data Object)
The **distributedDataObject** module provides basic data object management, including creating, querying, deleting, modifying, and subscribing to data objects, and distributed data object collaboration for the same application among multiple devices. The **distributedDataObject** module provides basic data object management, including creating, querying, deleting, modifying, and subscribing to data objects, and distributed data object collaboration for the same application among multiple devices.
...@@ -23,9 +23,9 @@ Creates a distributed data object. ...@@ -23,9 +23,9 @@ Creates a distributed data object.
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject **System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| source | object | Yes| Attribute of the distributed data object to create.| | source | object | Yes| Attribute of the distributed data object to create.|
**Return value** **Return value**
| Type| Description| | Type| Description|
...@@ -49,9 +49,9 @@ Creates a random session ID. ...@@ -49,9 +49,9 @@ Creates a random session ID.
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject **System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| string | Session ID created.| | string | Session ID created.|
**Example** **Example**
```js ```js
...@@ -97,15 +97,15 @@ Sets a session ID for synchronization. Automatic synchronization is performed fo ...@@ -97,15 +97,15 @@ Sets a session ID for synchronization. Automatic synchronization is performed fo
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| sessionId | string | No| ID of a distributed data object on a trusted network. To remove a distributed data object from the network, set this parameter to "" or leave it empty.| | sessionId | string | No| ID of a distributed data object on a trusted network. To remove a distributed data object from the network, set this parameter to "" or leave it empty.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| boolean | Returns **true** if the session ID is set successfully;<br>returns **false** otherwise. | | boolean | Returns **true** if the session ID is set successfully;<br>returns **false** otherwise. |
**Example** **Example**
...@@ -128,10 +128,10 @@ Subscribes to the changes of this distributed data object. ...@@ -128,10 +128,10 @@ Subscribes to the changes of this distributed data object.
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject **System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Event type to subscribe to. The value is **change**, which indicates data changes.| | type | string | Yes| Event type to subscribe to. The value is **change**, which indicates data changes.|
| callback | Callback<{ sessionId: string, fields: Array&lt;string&gt; }> | Yes| Callback used to return the changes of the distributed data object.<br>**sessionId** indicates the session ID of the distributed data object.<br>**fields** indicates the changed attributes of the distributed data object.| | callback | Callback<{ sessionId: string, fields: Array&lt;string&gt; }> | Yes| Callback used to return the changes of the distributed data object.<br>**sessionId** indicates the session ID of the distributed data object.<br>**fields** indicates the changed attributes of the distributed data object.|
**Example** **Example**
```js ```js
...@@ -157,10 +157,10 @@ Unsubscribes from the changes of this distributed data object. ...@@ -157,10 +157,10 @@ Unsubscribes from the changes of this distributed data object.
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject **System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Event type to unsubscribe from. The value is **change**, which indicates data changes.| | type | string | Yes| Event type to unsubscribe from. The value is **change**, which indicates data changes.|
| callback | Callback<{ sessionId: string, fields: Array&lt;string&gt; }> | No| Callback to be unregistered. If this parameter is not set, all data change callbacks of the object will be unregistered.<br>**sessionId** indicates the session ID of the distributed data object.<br>**fields** indicates the changed attributes of the distributed data object.| | callback | Callback<{ sessionId: string, fields: Array&lt;string&gt; }> | No| Callback to be unregistered. If this parameter is not set, all data change callbacks of the object will be unregistered.<br>**sessionId** indicates the session ID of the distributed data object.<br>**fields** indicates the changed attributes of the distributed data object.|
**Example** **Example**
...@@ -182,10 +182,10 @@ Subscribes to the status change (online or offline) of this distributed data obj ...@@ -182,10 +182,10 @@ Subscribes to the status change (online or offline) of this distributed data obj
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject **System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Event type to subscribe to. The value is **status**, which indicates the status change (online or offline) of the distributed data object.| | type | string | Yes| Event type to subscribe to. The value is **status**, which indicates the status change (online or offline) of the distributed data object.|
| callback | Callback<{ sessionId: string, networkId: string, status: 'online' \| 'offline' }> | Yes| Callback used to return the status change.<br>**sessionId**: session ID of the distributed data object.<br>**networkId**: object device ID, that is, **deviceId**.<br>**status** indicates the object status, which can be online or offline.| | callback | Callback<{ sessionId: string, networkId: string, status: 'online' \| 'offline' }> | Yes| Callback used to return the status change.<br>**sessionId**: session ID of the distributed data object.<br>**networkId**: object device ID, that is, **deviceId**.<br>**status** indicates the object status, which can be online or offline.|
**Example** **Example**
```js ```js
...@@ -207,10 +207,10 @@ Unsubscribes from the status change (online or offline) of this distributed data ...@@ -207,10 +207,10 @@ Unsubscribes from the status change (online or offline) of this distributed data
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject **System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Event type to unsubscribe from. The value is **status**, which indicates the status change (online or offline) of the distributed data object.| | type | string | Yes| Event type to unsubscribe from. The value is **status**, which indicates the status change (online or offline) of the distributed data object.|
| callback | Callback<{ sessionId: string, deviceId: string, status: 'online' \| 'offline' }> | No| Callback used to return the status change. If this parameter is not specified, this API unsubscribes from all callbacks of this distributed data object.<br>**sessionId**: session ID of the distributed data object.<br>**deviceId** indicates the device ID of the distributed data object.<br>**status** indicates the status, which can be online or offline.| | callback | Callback<{ sessionId: string, deviceId: string, status: 'online' \| 'offline' }> | No| Callback used to return the status change. If this parameter is not specified, this API unsubscribes from all callbacks of this distributed data object.<br>**sessionId**: session ID of the distributed data object.<br>**deviceId** indicates the device ID of the distributed data object.<br>**status** indicates the status, which can be online or offline.|
**Example** **Example**
...@@ -243,10 +243,10 @@ The saved data will be released in the following cases: ...@@ -243,10 +243,10 @@ The saved data will be released in the following cases:
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject **System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| deviceId | string | Yes| ID of the device where data is stored. The value **local** indicates the local device.| | deviceId | string | Yes| ID of the device where data is stored. The value **local** indicates the local device.|
| callback | AsyncCallback&lt;[SaveSuccessResponse](#savesuccessresponse9)&gt; | Yes| Callback used to return **SaveSuccessResponse**, which contains information such as session ID, version, and device ID.| | callback | AsyncCallback&lt;[SaveSuccessResponse](#savesuccessresponse9)&gt; | Yes| Callback used to return **SaveSuccessResponse**, which contains information such as session ID, version, and device ID.|
**Example** **Example**
```js ```js
...@@ -279,15 +279,15 @@ The saved data will be released in the following cases: ...@@ -279,15 +279,15 @@ The saved data will be released in the following cases:
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject **System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| deviceId | string | Yes| ID of the device where the data is saved. The default value is **local**, which indicates the local device. | | deviceId | string | Yes| ID of the device where the data is saved. The default value is **local**, which indicates the local device. |
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;[SaveSuccessResponse](#savesuccessresponse9)&gt; | Promise used to return **SaveSuccessResponse**, which contains information such as session ID, version, and device ID.| | Promise&lt;[SaveSuccessResponse](#savesuccessresponse9)&gt; | Promise used to return **SaveSuccessResponse**, which contains information such as session ID, version, and device ID.|
**Example** **Example**
...@@ -317,9 +317,9 @@ If the object is stored on another device, the data on the local device will be ...@@ -317,9 +317,9 @@ If the object is stored on another device, the data on the local device will be
**System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject **System capability**: SystemCapability.DistributedDataManager.DataObject.DistributedObject
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;[RevokeSaveSuccessResponse](#revokesavesuccessresponse9)&gt; | No| Callback used to return **RevokeSaveSuccessResponse**, which contains the session ID.| | callback | AsyncCallback&lt;[RevokeSaveSuccessResponse](#revokesavesuccessresponse9)&gt; | No| Callback used to return **RevokeSaveSuccessResponse**, which contains the session ID.|
**Example** **Example**
...@@ -345,9 +345,9 @@ If the object is stored on another device, the data on the local device will be ...@@ -345,9 +345,9 @@ If the object is stored on another device, the data on the local device will be
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;[RevokeSaveSuccessResponse](#revokesavesuccessresponse9)&gt; | Promise used to return **RevokeSaveSuccessResponse**, which contains the session ID.| | Promise&lt;[RevokeSaveSuccessResponse](#revokesavesuccessresponse9)&gt; | Promise used to return **RevokeSaveSuccessResponse**, which contains the session ID.|
**Example** **Example**
......
# Preferences # @ohos.data.preferences (Preferences)
The **Preferences** module provides APIs for processing data in the form of key-value (KV) pairs and supports persistence of the KV pairs when required. The **Preferences** module provides APIs for processing data in the form of key-value (KV) pairs and supports persistence of the KV pairs when required.
...@@ -497,7 +497,7 @@ Obtains the value of a key. This API uses a promise to return the result. If the ...@@ -497,7 +497,7 @@ Obtains the value of a key. This API uses a promise to return the result. If the
**System capability**: SystemCapability.DistributedDataManager.Preferences.Core **System capability**: SystemCapability.DistributedDataManager.Preferences.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | ------------------------------------------------------------ | | -------- | ----------------------- | ---- | ------------------------------------------------------------ |
| key | string | Yes | Key of the data to obtain. It cannot be empty. | | key | string | Yes | Key of the data to obtain. It cannot be empty. |
......
# @ohos.data.rdb # @ohos.data.rdb (RDB)
The relational database (RDB) manages data based on relational models. With the underlying SQLite database, the RDB provides a complete mechanism for managing local databases. To satisfy different needs in complicated scenarios, the RDB offers a series of methods for performing operations such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements. The relational database (RDB) manages data based on relational models. With the underlying SQLite database, the RDB provides a complete mechanism for managing local databases. To satisfy different needs in complicated scenarios, the RDB offers a series of methods for performing operations such as adding, deleting, modifying, and querying data, and supports direct execution of SQL statements.
......
# @ohos.data.ValuesBucket # @ohos.data.ValuesBucket (Value Bucket)
The **ValueBucket** module holds data in key-value (KV) pairs. You can use it to insert data into a database. The **ValueBucket** module holds data in key-value (KV) pairs. You can use it to insert data into a database.
...@@ -34,6 +34,6 @@ Defines the types of the key and value in a KV pair. ...@@ -34,6 +34,6 @@ Defines the types of the key and value in a KV pair.
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
| Key Type | Value Type | | Key Type | Value Type |
| ------------- | --------------------------------------------- | | ------------- | --------------------------------------------- |
| string | [ValueType](#valuetype)\| Uint8Array \| null | | string | [ValueType](#valuetype)\| Uint8Array \| null |
# 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. 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.
...@@ -2395,7 +2395,7 @@ Writes data to this single KV store. This API uses an asynchronous callback to r ...@@ -2395,7 +2395,7 @@ Writes data to this single KV store. This API uses an asynchronous callback to r
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------ | | -------- | ------------------------------------------------------------ | ---- | ------------------ |
| value | Array&lt;[ValuesBucket](js-apis-data-ValuesBucket.md#valuesbucket)&gt; | Yes | Data to write.| | value | Array&lt;[ValuesBucket](js-apis-data-valuesBucket.md#valuesbucket)&gt; | Yes | Data to write.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback invoked to return the result. |
**Error codes** **Error codes**
...@@ -2447,7 +2447,7 @@ Write data to this KV store. This API uses a promise to return the result. ...@@ -2447,7 +2447,7 @@ Write data to this KV store. This API uses a promise to return the result.
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ------------------------------------------------------------ | ---- | ------------------ | | ------ | ------------------------------------------------------------ | ---- | ------------------ |
| value | Array&lt;[ValuesBucket](js-apis-data-ValuesBucket.md#valuesbucket)&gt; | Yes | Data to write. | | value | Array&lt;[ValuesBucket](js-apis-data-valuesBucket.md#valuesbucket)&gt; | Yes | Data to write. |
**Return value** **Return value**
......
...@@ -186,7 +186,7 @@ Allows an application to publish sticky common events. ...@@ -186,7 +186,7 @@ Allows an application to publish sticky common events.
## ohos.permission.SYSTEM_FLOAT_WINDOW ## ohos.permission.SYSTEM_FLOAT_WINDOW
Allows an application to be displayed in a floating window on top of other apps. Allows an application to be displayed in a floating window on top of other applications.
**Permission level**: system_basic **Permission level**: system_basic
...@@ -406,7 +406,7 @@ Allows an application to call the API for restoring factory settings. ...@@ -406,7 +406,7 @@ Allows an application to call the API for restoring factory settings.
## ohos.permission.GRANT_SENSITIVE_PERMISSIONS ## ohos.permission.GRANT_SENSITIVE_PERMISSIONS
Allows an application to grant sensitive permissions to other apps. Allows an application to grant sensitive permissions to other applications.
**Permission level**: system_core **Permission level**: system_core
...@@ -416,7 +416,7 @@ Allows an application to grant sensitive permissions to other apps. ...@@ -416,7 +416,7 @@ Allows an application to grant sensitive permissions to other apps.
## ohos.permission.REVOKE_SENSITIVE_PERMISSIONS ## ohos.permission.REVOKE_SENSITIVE_PERMISSIONS
Allows an application to revoke sensitive permissions granted to other apps. Allows an application to revoke sensitive permissions granted to other applications.
**Permission level**: system_core **Permission level**: system_core
...@@ -426,7 +426,7 @@ Allows an application to revoke sensitive permissions granted to other apps. ...@@ -426,7 +426,7 @@ Allows an application to revoke sensitive permissions granted to other apps.
## ohos.permission.GET_SENSITIVE_PERMISSIONS ## ohos.permission.GET_SENSITIVE_PERMISSIONS
Allows an application to obtain the sensitive permissions that have been granted to other apps. Allows an application to obtain the sensitive permissions that have been granted to other applications.
**Permission level**: system_core **Permission level**: system_core
...@@ -436,7 +436,7 @@ Allows an application to obtain the sensitive permissions that have been granted ...@@ -436,7 +436,7 @@ Allows an application to obtain the sensitive permissions that have been granted
## ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION ## ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION
Allows an application to set the attributes of apps of other users. Allows an application to set the attributes of applications of other users.
**Permission level**: system_core **Permission level**: system_core
...@@ -506,7 +506,7 @@ Allows an application to install and uninstall other applications. ...@@ -506,7 +506,7 @@ Allows an application to install and uninstall other applications.
## ohos.permission.MANAGE_SHORTCUTS ## ohos.permission.MANAGE_SHORTCUTS
Allows an application to query and start shortcuts of other apps. Allows an application to query and start shortcuts of other applications.
**Permission level**: system_core **Permission level**: system_core
...@@ -546,7 +546,7 @@ Allows an application to start Feature abilities in the background. ...@@ -546,7 +546,7 @@ Allows an application to start Feature abilities in the background.
## ohos.permission.BUNDLE_ACTIVE_INFO ## ohos.permission.BUNDLE_ACTIVE_INFO
Allows an application to obtain how long other apps have been running in the foreground or background. Allows an application to obtain how long other applications have been running in the foreground or background.
**Permission level**: system_basic **Permission level**: system_basic
...@@ -606,7 +606,7 @@ Allows an application to use agent-powered reminders. ...@@ -606,7 +606,7 @@ Allows an application to use agent-powered reminders.
## ohos.permission.CONTROL_TASK_SYNC_ANIMATOR ## ohos.permission.CONTROL_TASK_SYNC_ANIMATOR
Allows apps to use sync task animations. Allows applications to use sync task animations.
**Permission level**: system_core **Permission level**: system_core
...@@ -616,7 +616,7 @@ Allows apps to use sync task animations. ...@@ -616,7 +616,7 @@ Allows apps to use sync task animations.
## ohos.permission.INPUT_MONITORING ## ohos.permission.INPUT_MONITORING
Allows an application to listen for input events. Only the system signature apps can apply for this permission. Allows an application to listen for input events. Only the system signed applications can apply for this permission.
**Permission level**: system_core **Permission level**: system_core
...@@ -1216,7 +1216,7 @@ Allows an application to read the health data of the user. ...@@ -1216,7 +1216,7 @@ Allows an application to read the health data of the user.
## ohos.permission.GET_DEFAULT_APPLICATION ## ohos.permission.GET_DEFAULT_APPLICATION
Allows an application to query default apps. Allows an application to query default applications.
**Permission level**: system_core **Permission level**: system_core
...@@ -1226,7 +1226,7 @@ Allows an application to query default apps. ...@@ -1226,7 +1226,7 @@ Allows an application to query default apps.
## ohos.permission.SET_DEFAULT_APPLICATION ## ohos.permission.SET_DEFAULT_APPLICATION
Allows an application to set and reset default apps. Allows an application to set and reset default applications.
**Permission level**: system_core **Permission level**: system_core
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册