提交 a96ec735 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 de8dd534
master OpenHarmony-3.2-Beta2 OpenHarmony-3.2-Beta3 OpenHarmony-3.2-Beta4 OpenHarmony-3.2-Beta5 OpenHarmony-3.2-Release OpenHarmony-4.0-Beta1 OpenHarmony-4.0-Beta2 bak_OpenHarmony-4.0-Beta1_20230529 docs-modify feature_IDL_20220811 monthly_20220816 monthly_20221018 monthly_20230815 revert-merge-17651-master revert-merge-19334-OpenHarmony-4.0-Beta1 revert-merge-19586-master revert-merge-20613-master revert-merge-21757-OpenHarmony-4.0-Beta2 revert-merge-21765-OpenHarmony-4.0-Beta2 revert-merge-23766-master weekly_20220719 weekly_20220726 weekly_20220802 weekly_20220809 weekly_20220816 weekly_20220823 weekly_20220830 weekly_20220906 weekly_20220913 weekly_20220920 weekly_20220927 weekly_20221004 weekly_20221011 weekly_20221018 weekly_20221025 weekly_20221101 weekly_20221108 weekly_20221115 weekly_20221122 weekly_20221129 weekly_20221206 weekly_20221213 weekly_20221220 weekly_20221227 weekly_20230103 weekly_20230110 weekly_20230117 weekly_20230124 weekly_20230131 weekly_20230207 weekly_20230214 weekly_20230221 weekly_20230228 weekly_20230307 weekly_20230314 weekly_20230321 weekly_20230328 weekly_20230404 weekly_20230411 weekly_20230418 weekly_20230425 weekly_20230502 weekly_20230509 weekly_20230516 weekly_20230523 weekly_20230530 weekly_20230606 weekly_20230613 weekly_20230619 weekly_20230626 weekly_20230627 weekly_20230704 weekly_20230712 weekly_20230725 weekly_20230801 weekly_20230808 weekly_20230815 weekly_20230822 weekly_20230829 weekly_20230905 OpenHarmony-v4.0-Beta2 OpenHarmony-v4.0-Beta1 OpenHarmony-v3.2.3-Release OpenHarmony-v3.2.2-Release OpenHarmony-v3.2.1-Release OpenHarmony-v3.2-Release OpenHarmony-v3.2-Beta5 OpenHarmony-v3.2-Beta4 OpenHarmony-v3.2-Beta3 OpenHarmony-v3.2-Beta2
无相关合并请求
......@@ -29,7 +29,7 @@ Obtains an RDB store. This API uses an asynchronous callback to return the resul
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| context | Context | Yes| Context of the application or functionality.<br>See [Context](js-apis-Context.md) for versions earlier than API version 9.<br>See [Context](js-apis-ability-context.md) for API version 9 or later.|
| context | Context | Yes| Application context.<br>For the application context of the FA model, see [Context](js-apis-Context.md).<br>For the application context of the stage model, see [Context](js-apis-ability-context.md).|
| config | [StoreConfig](#storeconfig) | Yes| Configuration of the RDB store.|
| version | number | Yes| RDB store version.|
| callback | AsyncCallback&lt;[RdbStore](#rdbstore)&gt; | Yes| Callback invoked to return the RDB store obtained.|
......@@ -59,7 +59,7 @@ Obtains an RDB store. This API uses a promise to return the result. You can set
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| context | Context | Yes| Context of the application or functionality.<br>See [Context](js-apis-Context.md) for versions earlier than API version 9.<br>See [Context](js-apis-ability-context.md) for API version 9 or later.|
| context | Context | Yes|Application context.<br>For the application context of the FA model, see [Context](js-apis-Context.md).<br>For the application context of the stage model, see [Context](js-apis-ability-context.md).|
| config | [StoreConfig](#storeconfig) | Yes| Configuration of the RDB store.|
| version | number | Yes| RDB store version.|
......@@ -92,7 +92,7 @@ Deletes an RDB store. This API uses an asynchronous callback to return the resul
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| context | Context | Yes| Context of the application or functionality.<br>See [Context](js-apis-Context.md) for versions earlier than API version 9.<br>See [Context](js-apis-ability-context.md) for API version 9 or later.|
| context | Context | Yes| Application context.<br>For the application context of the FA model, see [Context](js-apis-Context.md).<br>For the application context of the stage model, see [Context](js-apis-ability-context.md).|
| name | string | Yes| Name of the RDB store to delete.|
| callback | AsyncCallback&lt;void&gt; | Yes| Callback invoked to return the result.|
......@@ -118,7 +118,7 @@ Deletes an RDB store. This API uses a promise to return the result.
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| context | Context | Yes| Context of the application or functionality.<br>See [Context](js-apis-Context.md) for versions earlier than API version 9.<br>See [Context](js-apis-ability-context.md) for API version 9 or later.|
| context | Context | Yes| Application context.<br>For the application context of the FA model, see [Context](js-apis-Context.md).<br>For the application context of the stage model, see [Context](js-apis-ability-context.md).|
| name | string | Yes| Name of the RDB store to delete.|
**Return value**
......@@ -1018,7 +1018,7 @@ const valueBucket = {
}
let promise = rdbStore.insert("EMPLOYEE", valueBucket)
promise.then(async (ret) => {
console.log("Insert first done: " + ret)
console.log("Inserted first row: " + ret)
}).catch((err) => {
console.log("Failed to insert data, err: " + err)
})
......@@ -1029,16 +1029,16 @@ promise.then(async (ret) => {
update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback&lt;number&gt;):void
Updates data in the database based on the specified RdbPredicates object. This API uses an asynchronous callback to return the result.
Updates data in the RDB store based on the specified **RdbPredicates** object. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| values | [ValuesBucket](#valuesbucket) | Yes| Rows of data to be updated in the database. The key-value pair is associated with the column name in the target table.|
| values | [ValuesBucket](#valuesbucket) | Yes| Rows of data to update in the RDB store. The key-value pair is associated with the column name in the target table.|
| predicates | [RdbPredicates](#rdbpredicates) | Yes| Update conditions specified by the **RdbPredicates** object.|
| callback | AsyncCallback&lt;number&gt; | Yes| Callback used to return the number of rows updated.|
| callback | AsyncCallback&lt;number&gt; | Yes| Callback invoked to return the number of rows updated.|
**Example**
```js
......@@ -1064,14 +1064,14 @@ rdbStore.update(valueBucket, predicates, function (err, ret) {
update(values: ValuesBucket, predicates: RdbPredicates):Promise&lt;number&gt;
Updates data in the database based on the specified RdbPredicates object. This API uses a promise to return the result.
Updates data in the RDB store based on the specified **RdbPredicates** object. This API uses a promise to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| values | [ValuesBucket](#valuesbucket) | Yes| Rows of data to be updated in the database. The key-value pair is associated with the column name in the target table.|
| values | [ValuesBucket](#valuesbucket) | Yes| Rows of data to update in the RDB store. The key-value pair is associated with the column name in the target table.|
| predicates | [RdbPredicates](#rdbpredicates) | Yes| Update conditions specified by the **RdbPredicates** object.|
**Return value**
......@@ -1100,7 +1100,7 @@ promise.then(async (ret) => {
### update<sup>9+</sup>
update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback&lt;number&gt;):void
Updates data in the database based on the specified **DataSharePredicates** object. This API uses an asynchronous callback to return the result.
Updates data in the RDB store based on the specified **DataSharePredicates** object. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
......@@ -1108,9 +1108,9 @@ Updates data in the database based on the specified **DataSharePredicates** obje
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| table | string | Yes| Name of the target table.|
| values | [ValuesBucket](#valuesbucket) | Yes| Rows of data to be updated in the database. The key-value pair is associated with the column name in the target table.|
| values | [ValuesBucket](#valuesbucket) | Yes| Rows of data to update in the RDB store. The key-value pair is associated with the column name in the target table.|
| predicates | [DataSharePredicates](js-apis-data-DataSharePredicates.md#datasharepredicates)| Yes| Update conditions specified by the **DataSharePredicates** object.|
| callback | AsyncCallback&lt;number&gt; | Yes| Callback used to return the number of rows updated.|
| callback | AsyncCallback&lt;number&gt; | Yes| Callback invoked to return the number of rows updated.|
**Example**
```js
......@@ -1135,7 +1135,7 @@ rdbStore.update("EMPLOYEE", valueBucket, predicates, function (err, ret) {
update(table: string, values: ValuesBucket, predicates: DataSharePredicates):Promise&lt;number&gt;
Updates data in the database based on the specified **DataSharePredicates** object. This API uses a promise to return the result.
Updates data in the RDB store based on the specified **DataSharePredicates** object. This API uses a promise to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
......@@ -1143,7 +1143,7 @@ Updates data in the database based on the specified **DataSharePredicates** obje
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| table | string | Yes| Name of the target table.|
| values | [ValuesBucket](#valuesbucket) | Yes| Rows of data to be updated in the database. The key-value pair is associated with the column name in the target table.|
| values | [ValuesBucket](#valuesbucket) | Yes| Rows of data to update in the RDB store. The key-value pair is associated with the column name in the target table.|
| predicates | [DataSharePredicates](js-apis-data-DataSharePredicates.md#datasharepredicates) | Yes| Update conditions specified by the **DataSharePredicates** object.|
**Return value**
......@@ -1175,7 +1175,7 @@ promise.then(async (ret) => {
delete(predicates: RdbPredicates, callback: AsyncCallback&lt;number&gt;):void
Deletes data from the database based on the specified **RdbPredicates** object. This API uses an asynchronous callback to return the result.
Deletes data from the RDB store based on the specified **RdbPredicates** object. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
......@@ -1203,7 +1203,7 @@ rdbStore.delete(predicates, function (err, rows) {
delete(predicates: RdbPredicates):Promise&lt;number&gt;
Deletes data from the database based on the specified **RdbPredicates** object. This API uses a promise to return the result.
Deletes data from the RDB store based on the specified **RdbPredicates** object. This API uses a promise to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
......@@ -1215,7 +1215,7 @@ Deletes data from the database based on the specified **RdbPredicates** object.
**Return value**
| Type| Description|
| -------- | -------- |
| Promise&lt;number&gt; | Promise used to return the number of rows updated.|
| Promise&lt;number&gt; | Promise used to return the number of rows updated.|
**Example**
```js
......@@ -1234,7 +1234,7 @@ promise.then((rows) => {
delete(table: string, predicates: DataSharePredicates, callback: AsyncCallback&lt;number&gt;):void
Deletes data from the database based on the specified **DataSharePredicates** object. This API uses an asynchronous callback to return the result.
Deletes data from the RDB store based on the specified **DataSharePredicates** object. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
......@@ -1262,7 +1262,7 @@ rdbStore.delete("EMPLOYEE", predicates, function (err, rows) {
delete(table: string, predicates: dataSharePredicates.DataSharePredicates):Promise&lt;number&gt;
Deletes data from the database based on the specified **DataSharePredicates** object. This API uses a promise to return the result.
Deletes data from the RDB store based on the specified **DataSharePredicates** object. This API uses a promise to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
......@@ -1275,7 +1275,7 @@ Deletes data from the database based on the specified **DataSharePredicates** ob
**Return value**
| Type| Description|
| -------- | -------- |
| Promise&lt;number&gt; | Promise used to return the number of rows updated.|
| Promise&lt;number&gt; | Promise used to return the number of rows updated.|
**Example**
```js
......@@ -1294,7 +1294,7 @@ promise.then((rows) => {
query(predicates: RdbPredicates, columns: Array&lt;string&gt;, callback: AsyncCallback&lt;ResultSet&gt;):void
Queries data in the database based on specified conditions. This API uses an asynchronous callback to return the result.
Queries data in the RDB store based on specified conditions. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
......@@ -1324,7 +1324,7 @@ rdbStore.query(predicates, ["ID", "NAME", "AGE", "SALARY", "CODES"], function (e
query(predicates: RdbPredicates, columns?: Array&lt;string&gt;):Promise&lt;ResultSet&gt;
Queries data in the database based on specified conditions. This API uses a promise to return the result.
Queries data in the RDB store based on specified conditions. This API uses a promise to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
......@@ -1356,7 +1356,7 @@ Queries data in the database based on specified conditions. This API uses a prom
query(predicates: DataSharePredicates, columns: Array&lt;string&gt;, callback: AsyncCallback&lt;ResultSet&gt;):void
Queries data in the database based on specified conditions. This API uses an asynchronous callback to return the result.
Queries data in the RDB store based on specified conditions. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
......@@ -1386,7 +1386,7 @@ rdbStore.query("EMPLOYEE", predicates, ["ID", "NAME", "AGE", "SALARY", "CODES"],
query(predicates: DataSharePredicates, columns?: Array&lt;string&gt;):Promise&lt;ResultSet&gt;
Queries data in the database based on specified conditions. This API uses a promise to return the result.
Queries data in the RDB store based on specified conditions. This API uses a promise to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
......@@ -1625,14 +1625,14 @@ try {
backup(destName:string, callback: AsyncCallback&lt;void&gt;):void
Backs up the database with the specified name. This API uses an asynchronous callback to return the result.
Backs up an RDB store. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| destName | string | Yes| Name of the database backup file.|
| destName | string | Yes| Name of the RDB store backup file.|
| callback | AsyncCallback&lt;void&gt; | Yes| Callback invoked to return the result.|
**Example**
......@@ -1650,14 +1650,14 @@ rdbStore.backup("dbBackup.db", function(err) {
backup(destName:string): Promise&lt;void&gt;
Backs up the database with the specified name. This API uses a promise to return the result.
Backs up an RDB store. This API uses a promise to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| destName | string | Yes| Name of the database backup file.|
| destName | string | Yes| Name of the RDB store backup file.|
**Return value**
| Type| Description|
......@@ -1678,14 +1678,14 @@ promiseBackup.then(()=>{
restore(srcName:string, callback: AsyncCallback&lt;void&gt;):void
Restores a database from a specified database backup file. This API uses an asynchronous callback to return the result.
Restores an RDB store using a backup file. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| srcName | string | Yes| Name of the database backup file.|
| srcName | string | Yes| Name of the RDB store backup file.|
| callback | AsyncCallback&lt;void&gt; | Yes| Callback invoked to return the result.|
**Example**
......@@ -1703,14 +1703,14 @@ rdbStore.restore("dbBackup.db", function(err) {
restore(srcName:string): Promise&lt;void&gt;
Restores a database from a specified database backup file. This API uses a promise to return the result.
Restores an RDB store using a backup file. This API uses a promise to return the result.
**System capability**: SystemCapability.DistributedDataManager.RelationalStore.Core
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| srcName | string | Yes| Name of the database backup file.|
| srcName | string | Yes| Name of the RDB store backup file.|
**Return value**
| Type| Description|
......@@ -1809,7 +1809,7 @@ rdbStore.obtainDistributedTableName("12345678abcde", "EMPLOYEE", function (err,
console.info('Failed to obtain DistributedTableName, err: ' + err)
return
}
console.info('Obtained DistributedTableName successfully, tableName=.' + tableName)
console.info('Obtained distributed table name successfully, tableName=.' + tableName)
})
```
......@@ -1839,7 +1839,7 @@ Obtains the distributed table name for a remote device based on the local table
```js
let promise = rdbStore.obtainDistributedTableName("12345678abcde", "EMPLOYEE")
promise.then((tableName) => {
console.info('Obtained DistributedTableName successfully, tableName= ' + tableName)
console.info('Obtained distributed table name successfully, tableName= ' + tableName)
}).catch((err) => {
console.info('Failed to obtain DistributedTableName, err: ' + err)
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部