提交 798048e9 编写于 作者: A Annie_wang

update docs

Signed-off-by: NAnnie_wang <annie.wangli@huawei.com>
上级 93c4c64e
# DataAbilityPredicates # DataAbilityPredicates
> **NOTE** **DataAbility** provides APIs for creating predicates, which implement different query methods for relational database (RDB) stores.
> **NOTE**<br/>
> >
> The initial APIs of this module are supported since API version 7. 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 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...@@ -24,15 +26,15 @@ Creates an **RdbPredicates** object from a **DataAbilityPredicates** object. ...@@ -24,15 +26,15 @@ Creates an **RdbPredicates** object from a **DataAbilityPredicates** object.
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| name | string | Yes| Table name in the RDB store.| | name | string | Yes| Name of a database table.|
| dataAbilityPredicates | [DataAbilityPredicates](#dataabilitypredicates) | Yes| **DataAbilityPredicates** object. | | dataAbilityPredicates | [DataAbilityPredicates](#dataabilitypredicates) | Yes| **DataAbilityPredicates** object. |
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| rdb.[RdbPredicates](js-apis-data-rdb.md#rdbpredicates) | **RdbPredicates** object created.| | rdb.[RdbPredicates](js-apis-data-rdb.md#rdbpredicates) | **RdbPredicates** object created.|
**Example** **Example**
```js ```js
...@@ -58,15 +60,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -58,15 +60,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| value | [ValueType](#valuetype) | Yes| Value to match the **DataAbilityPredicates**.| | value | [ValueType](#valuetype) | Yes| Value to match the **DataAbilityPredicates**.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -85,15 +87,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -85,15 +87,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| value | [ValueType](#valuetype) | Yes| Value to match the **DataAbilityPredicates**.| | value | [ValueType](#valuetype) | Yes| Value to match the **DataAbilityPredicates**.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -112,9 +114,9 @@ Adds a left parenthesis to this **DataAbilityPredicates**. ...@@ -112,9 +114,9 @@ Adds a left parenthesis to this **DataAbilityPredicates**.
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object with a left parenthesis.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object with a left parenthesis.|
**Example** **Example**
```js ```js
...@@ -138,9 +140,9 @@ Adds a right parenthesis to this **DataAbilityPredicates**. ...@@ -138,9 +140,9 @@ Adds a right parenthesis to this **DataAbilityPredicates**.
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object with a right parenthesis.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object with a right parenthesis.|
**Example** **Example**
```js ```js
...@@ -164,9 +166,9 @@ Adds the OR condition to this **DataAbilityPredicates**. ...@@ -164,9 +166,9 @@ Adds the OR condition to this **DataAbilityPredicates**.
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object with the OR condition.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object with the OR condition.|
**Example** **Example**
```js ```js
...@@ -187,9 +189,9 @@ Adds the AND condition to this **DataAbilityPredicates**. ...@@ -187,9 +189,9 @@ Adds the AND condition to this **DataAbilityPredicates**.
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object with the AND condition.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object with the AND condition.|
**Example** **Example**
```js ```js
...@@ -210,15 +212,15 @@ Sets a **DataAbilityPredicates** object to match a string containing the specifi ...@@ -210,15 +212,15 @@ Sets a **DataAbilityPredicates** object to match a string containing the specifi
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| value | string | Yes| Value to match the **DataAbilityPredicates**.| | value | string | Yes| Value to match the **DataAbilityPredicates**.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -237,15 +239,15 @@ Sets a **DataAbilityPredicates** object to match a string that starts with the s ...@@ -237,15 +239,15 @@ Sets a **DataAbilityPredicates** object to match a string that starts with the s
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| value | string | Yes| Value to match the **DataAbilityPredicates**.| | value | string | Yes| Value to match the **DataAbilityPredicates**.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -264,15 +266,15 @@ Sets a **DataAbilityPredicates** object to match a string that ends with the spe ...@@ -264,15 +266,15 @@ Sets a **DataAbilityPredicates** object to match a string that ends with the spe
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| value | string | Yes| Value to match the **DataAbilityPredicates**.| | value | string | Yes| Value to match the **DataAbilityPredicates**.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
``` ```
...@@ -291,14 +293,14 @@ Sets a **DataAbilityPredicates** object to match the field whose value is null. ...@@ -291,14 +293,14 @@ Sets a **DataAbilityPredicates** object to match the field whose value is null.
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -317,14 +319,14 @@ Sets a **DataAbilityPredicates** object to match the field whose value is not nu ...@@ -317,14 +319,14 @@ Sets a **DataAbilityPredicates** object to match the field whose value is not nu
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -343,15 +345,15 @@ Sets a **DataAbilityPredicates** object to match a string that is similar to the ...@@ -343,15 +345,15 @@ Sets a **DataAbilityPredicates** object to match a string that is similar to the
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| value | string | Yes| Value to match the **DataAbilityPredicates**.| | value | string | Yes| Value to match the **DataAbilityPredicates**.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -370,15 +372,15 @@ Sets a **DataAbilityPredicates** object to match the specified string. ...@@ -370,15 +372,15 @@ Sets a **DataAbilityPredicates** object to match the specified string.
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| value | string | Yes| Value to match the **DataAbilityPredicates**.| | value | string | Yes| Value to match the **DataAbilityPredicates**.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -397,16 +399,16 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -397,16 +399,16 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| low | [ValueType](#valuetype) | Yes| Minimum value to match the **DataAbilityPredicates**.| | low | [ValueType](#valuetype) | Yes| Minimum value to match the **DataAbilityPredicates**.|
| high | [ValueType](#valuetype) | Yes| Maximum value to match the **DataAbilityPredicates**.| | high | [ValueType](#valuetype) | Yes| Maximum value to match the **DataAbilityPredicates**.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -425,16 +427,16 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -425,16 +427,16 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| low | [ValueType](#valuetype) | Yes| Minimum value to match the **DataAbilityPredicates**.| | low | [ValueType](#valuetype) | Yes| Minimum value to match the **DataAbilityPredicates**.|
| high | [ValueType](#valuetype) | Yes| Maximum value to match the **DataAbilityPredicates**.| | high | [ValueType](#valuetype) | Yes| Maximum value to match the **DataAbilityPredicates**.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -453,15 +455,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -453,15 +455,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| value | [ValueType](#valuetype) | Yes| Value to match the **DataAbilityPredicates**.| | value | [ValueType](#valuetype) | Yes| Value to match the **DataAbilityPredicates**.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -480,15 +482,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -480,15 +482,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| value | [ValueType](#valuetype) | Yes| Value to match the **DataAbilityPredicates**.| | value | [ValueType](#valuetype) | Yes| Value to match the **DataAbilityPredicates**.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -507,15 +509,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -507,15 +509,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| value | [ValueType](#valuetype) | Yes| Value to match the **DataAbilityPredicates**.| | value | [ValueType](#valuetype) | Yes| Value to match the **DataAbilityPredicates**.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -534,15 +536,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -534,15 +536,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| value | [ValueType](#valuetype) | Yes| Value to match the **DataAbilityPredicates**.| | value | [ValueType](#valuetype) | Yes| Value to match the **DataAbilityPredicates**.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -561,14 +563,14 @@ Sets a **DataAbilityPredicates** object to match the column with values sorted i ...@@ -561,14 +563,14 @@ Sets a **DataAbilityPredicates** object to match the column with values sorted i
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -587,14 +589,14 @@ Sets a **DataAbilityPredicates** object to match the column with values sorted i ...@@ -587,14 +589,14 @@ Sets a **DataAbilityPredicates** object to match the column with values sorted i
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -613,9 +615,9 @@ Sets a **DataAbilityPredicates** object to filter out duplicate records. ...@@ -613,9 +615,9 @@ Sets a **DataAbilityPredicates** object to filter out duplicate records.
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that can filter out duplicate records.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that can filter out duplicate records.|
**Example** **Example**
```js ```js
...@@ -634,14 +636,14 @@ Set a **DataAbilityPredicates** object to specify the maximum number of records. ...@@ -634,14 +636,14 @@ Set a **DataAbilityPredicates** object to specify the maximum number of records.
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| value | number | Yes| Maximum number of records.| | value | number | Yes| Maximum number of records.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that specifies the maximum number of records.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that specifies the maximum number of records.|
**Example** **Example**
```js ```js
...@@ -660,14 +662,14 @@ Sets a **DataAbilityPredicates** object to specify the start position of the ret ...@@ -660,14 +662,14 @@ Sets a **DataAbilityPredicates** object to specify the start position of the ret
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| rowOffset | number | Yes| Number of rows to offset from the beginning. The value is a positive integer.| | rowOffset | number | Yes| Number of rows to offset from the beginning. The value is a positive integer.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that specifies the start position of the returned result.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that specifies the start position of the returned result.|
**Example** **Example**
```js ```js
...@@ -686,14 +688,14 @@ Sets a **DataAbilityPredicates** object to group rows that have the same value i ...@@ -686,14 +688,14 @@ Sets a **DataAbilityPredicates** object to group rows that have the same value i
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| fields | Array&lt;string&gt; | Yes| Names of columns to group.| | fields | Array&lt;string&gt; | Yes| Names of columns to group.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that groups rows with the same value.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that groups rows with the same value.|
**Example** **Example**
```js ```js
...@@ -705,20 +707,20 @@ Sets a **DataAbilityPredicates** object to group rows that have the same value i ...@@ -705,20 +707,20 @@ Sets a **DataAbilityPredicates** object to group rows that have the same value i
indexedBy(field: string): DataAbilityPredicates indexedBy(field: string): DataAbilityPredicates
Sets a **DataAbilityPredicates** object to specify the index column.
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core Sets a **DataAbilityPredicates** object to specify the index column.
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| indexName | string | Yes| Name of the index column.| | indexName | string | Yes| Name of the index column.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that specifies the index column.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that specifies the index column.|
**Example** **Example**
```js ```js
...@@ -737,16 +739,16 @@ Sets a **DataAbilityPredicates** object to match the field with data type Array< ...@@ -737,16 +739,16 @@ Sets a **DataAbilityPredicates** object to match the field with data type Array<
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| value | Array&lt;[ValueType](#valuetype)&gt; | Yes| Array of **ValueType**s to match.| | value | Array&lt;[ValueType](#valuetype)&gt; | Yes| Array of **ValueType**s to match.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
...@@ -765,16 +767,16 @@ Sets a **DataAbilityPredicates** object to match the field with data type Array< ...@@ -765,16 +767,16 @@ Sets a **DataAbilityPredicates** object to match the field with data type Array<
**System capability**: SystemCapability.DistributedDataManager.DataShare.Core **System capability**: SystemCapability.DistributedDataManager.DataShare.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| field | string | Yes| Column name in the table.| | field | string | Yes| Column name in the table.|
| value | Array&lt;[ValueType](#valuetype)&gt; | Yes| Array of **ValueType**s to match.| | value | Array&lt;[ValueType](#valuetype)&gt; | Yes| Array of **ValueType**s to match.|
**Return value** **Return value**
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.| | [DataAbilityPredicates](#dataabilitypredicates) | **DataAbilityPredicates** object that matches the specified field.|
**Example** **Example**
```js ```js
......
# Result Set # Result Set
A result set is a set of results returned after the relational database (RDB) query APIs are called. You can use the **resultset** APIs to obtain required data.
> **NOTE**<br/> > **NOTE**<br/>
>
> The initial APIs of this module are supported since API version 7. 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 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Usage ## Usage
You need to use [RdbStore.query()](js-apis-data-rdb.md#query) to obtain the **resultSet** object. You need to use [RdbStore.query()](js-apis-data-rdb.md#query) to obtain a **resultSet** object.
```js ```js
import dataRdb from '@ohos.data.rdb'; import dataRdb from '@ohos.data.rdb';
...@@ -20,7 +23,7 @@ promise.then((resultSet) => { ...@@ -20,7 +23,7 @@ promise.then((resultSet) => {
## ResultSet ## ResultSet
Provides methods to access the result set, which is obtained by querying the relational database (RDB) store. Provides methods to access the result set, which is obtained by querying the RDB store.
### Attributes ### Attributes
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册