| 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.|
**Example**
...
...
@@ -336,7 +336,7 @@ This API can be used only in the stage model.
| 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**
...
...
@@ -374,7 +374,7 @@ This API can be used only in the stage model.
| 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. |
| 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.
| 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. |
**Return value**
...
...
@@ -451,7 +451,7 @@ This API can be used only in the stage model.
| 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. |
| 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.
| 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. |