| uri | string | Yes | URI of the data to delete. |
| uri | string | Yes | URI of the data to delete. |
| predicates | [DataSharePredicates](js-apis-data-DataSharePredicates.md#datasharepredicates) | Yes | Filter criteria.<br>The predicate methods supported by **delete()** vary depending on the database used. For example, the KVDB supports only **inKeys**.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes | Filter criteria.<br>The predicate methods supported by **delete()** vary depending on the database used. For example, the KVDB supports only **inKeys**.|
| callback | AsyncCallback<number> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined** and **data** is the number of deleted data records. Otherwise, **err** is an error object.<br>The number of deleted data records is not returned if the APIs of the database (for example, KVDB) in use do not support it.|
| callback | AsyncCallback<number> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined** and **data** is the number of deleted data records. Otherwise, **err** is an error object.<br>The number of deleted data records is not returned if the APIs of the database (for example, KVDB) in use do not support it.|
**Example**
**Example**
...
@@ -336,7 +336,7 @@ This API can be used only in the stage model.
...
@@ -336,7 +336,7 @@ This API can be used only in the stage model.
| uri | string | Yes | URI of the data to delete. |
| uri | string | Yes | URI of the data to delete. |
| predicates | [DataSharePredicates](js-apis-data-DataSharePredicates.md#datasharepredicates) | Yes | Filter criteria.<br>The predicate methods supported by **delete()** vary depending on the database used. For example, the KVDB supports only **inKeys**.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes | Filter criteria.<br>The predicate methods supported by **delete()** vary depending on the database used. For example, the KVDB supports only **inKeys**.|
**Return value**
**Return value**
...
@@ -374,7 +374,7 @@ This API can be used only in the stage model.
...
@@ -374,7 +374,7 @@ This API can be used only in the stage model.
| uri | string | Yes | URI of the data to query. |
| uri | string | Yes | URI of the data to query. |
| predicates | [DataSharePredicates](js-apis-data-DataSharePredicates.md#datasharepredicates) | Yes | Filter criteria.<br>The predicate methods supported by **query()** vary depending on the database used. For example, the KVDB supports only **inKeys** and **prefixKey**.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes | Filter criteria.<br>The predicate methods supported by **query()** vary depending on the database used. For example, the KVDB supports only **inKeys** and **prefixKey**.|
| columns | Array<string> | Yes | Columns to query. If this parameter is empty, all columns will be queried. |
| columns | Array<string> | Yes | Columns to query. If this parameter is empty, all columns will be queried. |
| callback | AsyncCallback<[DataShareResultSet](js-apis-data-DataShareResultSet.md#datashareresultset)> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined** and **data** is the result set obtained. Otherwise, **err** is an error object.|
| callback | AsyncCallback<[DataShareResultSet](js-apis-data-DataShareResultSet.md#datashareresultset)> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined** and **data** is the result set obtained. Otherwise, **err** is an error object.|
...
@@ -411,7 +411,7 @@ This API can be used only in the stage model.
...
@@ -411,7 +411,7 @@ This API can be used only in the stage model.
| uri | string | Yes | URI of the data to query. |
| uri | string | Yes | URI of the data to query. |
| predicates | [DataSharePredicates](js-apis-data-DataSharePredicates.md#datasharepredicates) | Yes | Filter criteria.<br>The predicate methods supported by **query()** vary depending on the database used. For example, the KVDB supports only **inKeys** and **prefixKey**.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes | Filter criteria.<br>The predicate methods supported by **query()** vary depending on the database used. For example, the KVDB supports only **inKeys** and **prefixKey**.|
| columns | Array<string> | Yes | Columns to query. If this parameter is empty, all columns will be queried. |
| columns | Array<string> | Yes | Columns to query. If this parameter is empty, all columns will be queried. |
**Return value**
**Return value**
...
@@ -451,7 +451,7 @@ This API can be used only in the stage model.
...
@@ -451,7 +451,7 @@ This API can be used only in the stage model.
| uri | string | Yes | URI of the data to update. |
| uri | string | Yes | URI of the data to update. |
| predicates | [DataSharePredicates](js-apis-data-DataSharePredicates.md#datasharepredicates) | Yes | Filter criteria.<br>The predicate methods supported by **update()** vary depending on the database used. For example, only the relational database (RDB) supports predicates.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes | Filter criteria.<br>The predicate methods supported by **update()** vary depending on the database used. For example, only the relational database (RDB) supports predicates.|
| value | [ValuesBucket](js-apis-data-ValuesBucket.md#valuesbucket) | Yes | New data. |
| value | [ValuesBucket](js-apis-data-ValuesBucket.md#valuesbucket) | Yes | New data. |
| callback | AsyncCallback<number> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined** and **data** is the number of updated data records. Otherwise, **err** is an error object.<br>The number of updated data records is not returned if the APIs of the database (for example, KVDB) in use do not support it.|
| callback | AsyncCallback<number> | Yes | Callback invoked to return the result. If the operation is successful, **err** is **undefined** and **data** is the number of updated data records. Otherwise, **err** is an error object.<br>The number of updated data records is not returned if the APIs of the database (for example, KVDB) in use do not support it.|
...
@@ -493,7 +493,7 @@ This API can be used only in the stage model.
...
@@ -493,7 +493,7 @@ This API can be used only in the stage model.
| uri | string | Yes | URI of the data to update. |
| uri | string | Yes | URI of the data to update. |
| predicates | [DataSharePredicates](js-apis-data-DataSharePredicates.md#datasharepredicates) | Yes | Filter criteria.<br>The predicate methods supported by **update()** vary depending on the database used. For example, only the RDB supports predicates.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes | Filter criteria.<br>The predicate methods supported by **update()** vary depending on the database used. For example, only the RDB supports predicates.|
| value | [ValuesBucket](js-apis-data-ValuesBucket.md#valuesbucket) | Yes | New data. |
| value | [ValuesBucket](js-apis-data-ValuesBucket.md#valuesbucket) | Yes | New data. |
@@ -1109,7 +1109,7 @@ Updates data in the RDB store based on the specified **DataSharePredicates** obj
...
@@ -1109,7 +1109,7 @@ Updates data in the RDB store based on the specified **DataSharePredicates** obj
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| table | string | Yes| Name of the target table.|
| table | string | Yes| Name of 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.|
| 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.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates)| Yes| Update conditions specified by the **DataSharePredicates** object.|
| callback | AsyncCallback<number> | Yes| Callback invoked to return the number of rows updated.|
| callback | AsyncCallback<number> | Yes| Callback invoked to return the number of rows updated.|
**Example**
**Example**
...
@@ -1144,7 +1144,7 @@ Updates data in the RDB store based on the specified **DataSharePredicates** obj
...
@@ -1144,7 +1144,7 @@ Updates data in the RDB store based on the specified **DataSharePredicates** obj
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| table | string | Yes| Name of the target table.|
| table | string | Yes| Name of 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.|
| 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.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes| Update conditions specified by the **DataSharePredicates** object.|
**Return value**
**Return value**
| Type| Description|
| Type| Description|
...
@@ -1242,7 +1242,7 @@ Deletes data from the RDB store based on the specified **DataSharePredicates** o
...
@@ -1242,7 +1242,7 @@ Deletes data from the RDB store based on the specified **DataSharePredicates** o
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| table | string | Yes| Name of the target table.|
| table | string | Yes| Name of the target table.|
| predicates | [DataSharePredicates](js-apis-data-DataSharePredicates.md#datasharepredicates) | Yes| Conditions specified by the **DataSharePredicates** object for deleting data.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes| Conditions specified by the **DataSharePredicates** object for deleting data.|
| callback | AsyncCallback<number> | Yes| Callback invoked to return the number of rows updated.|
| callback | AsyncCallback<number> | Yes| Callback invoked to return the number of rows updated.|
**Example**
**Example**
...
@@ -1270,7 +1270,7 @@ Deletes data from the RDB store based on the specified **DataSharePredicates** o
...
@@ -1270,7 +1270,7 @@ Deletes data from the RDB store based on the specified **DataSharePredicates** o
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| table | string | Yes| Name of the target table.|
| table | string | Yes| Name of the target table.|
| predicates | [DataSharePredicates](js-apis-data-DataSharePredicates.md#datasharepredicates) | Yes| Conditions specified by the **DataSharePredicates** object for deleting data.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes| Conditions specified by the **DataSharePredicates** object for deleting data.|
**Return value**
**Return value**
| Type| Description|
| Type| Description|
...
@@ -1363,7 +1363,7 @@ Queries data in the RDB store based on specified conditions. This API uses an as
...
@@ -1363,7 +1363,7 @@ Queries data in the RDB store based on specified conditions. This API uses an as
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| predicates | [DataSharePredicates](js-apis-data-DataSharePredicates.md#datasharepredicates) | Yes| Query conditions specified by the **DataSharePredicates** object.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes| Query conditions specified by the **DataSharePredicates** object.|
| columns | Array<string> | Yes| Columns to query. If this parameter is not specified, the query applies to all columns.|
| columns | Array<string> | Yes| Columns to query. If this parameter is not specified, the query applies to all columns.|
| callback | AsyncCallback<[ResultSet](js-apis-data-resultset.md)> | Yes| Callback invoked to return the result. If the operation is successful, a **ResultSet** object will be returned.|
| callback | AsyncCallback<[ResultSet](js-apis-data-resultset.md)> | Yes| Callback invoked to return the result. If the operation is successful, a **ResultSet** object will be returned.|
...
@@ -1393,7 +1393,7 @@ Queries data in the RDB store based on specified conditions. This API uses a pro
...
@@ -1393,7 +1393,7 @@ Queries data in the RDB store based on specified conditions. This API uses a pro
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| predicates | [DataSharePredicates](js-apis-data-DataSharePredicates.md#datasharepredicates) | Yes| Query conditions specified by the **DataSharePredicates** object.|
| predicates | [DataSharePredicates](js-apis-data-dataSharePredicates.md#datasharepredicates) | Yes| Query conditions specified by the **DataSharePredicates** object.|
| columns | Array<string> | No| Columns to query. If this parameter is not specified, the query applies to all columns.|
| columns | Array<string> | No| Columns to query. If this parameter is not specified, the query applies to all columns.|