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

!6068 翻译完成:5826 master:screenshot与data-ability一致性工具修改 Cherry-Pick到master

Merge pull request !6068 from wusongqing/cherry-pick-1656465779
# DataAbilityPredicates # DataAbilityPredicates
> **NOTE**<br/> > **NOTE**
> >
> 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 +24,15 @@ Creates an **RdbPredicates** object from a **DataAbilityPredicates** object. ...@@ -24,15 +24,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| Table name in the RDB store.|
| 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 +58,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -58,15 +58,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 +85,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -85,15 +85,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 +112,9 @@ Adds a left parenthesis to this **DataAbilityPredicates**. ...@@ -112,9 +112,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 +138,9 @@ Adds a right parenthesis to this **DataAbilityPredicates**. ...@@ -138,9 +138,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 +164,9 @@ Adds the OR condition to this **DataAbilityPredicates**. ...@@ -164,9 +164,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 +187,9 @@ Adds the AND condition to this **DataAbilityPredicates**. ...@@ -187,9 +187,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 +210,15 @@ Sets a **DataAbilityPredicates** object to match a string containing the specifi ...@@ -210,15 +210,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 +237,15 @@ Sets a **DataAbilityPredicates** object to match a string that starts with the s ...@@ -237,15 +237,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 +264,15 @@ Sets a **DataAbilityPredicates** object to match a string that ends with the spe ...@@ -264,15 +264,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 +291,14 @@ Sets a **DataAbilityPredicates** object to match the field whose value is null. ...@@ -291,14 +291,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 +317,14 @@ Sets a **DataAbilityPredicates** object to match the field whose value is not nu ...@@ -317,14 +317,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 +343,15 @@ Sets a **DataAbilityPredicates** object to match a string that is similar to the ...@@ -343,15 +343,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 +370,15 @@ Sets a **DataAbilityPredicates** object to match the specified string. ...@@ -370,15 +370,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 +397,16 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -397,16 +397,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 +425,16 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -425,16 +425,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 +453,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -453,15 +453,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 +480,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -480,15 +480,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 +507,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -507,15 +507,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 +534,15 @@ Sets a **DataAbilityPredicates** object to match the field with data type **Valu ...@@ -534,15 +534,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 +561,14 @@ Sets a **DataAbilityPredicates** object to match the column with values sorted i ...@@ -561,14 +561,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 +587,14 @@ Sets a **DataAbilityPredicates** object to match the column with values sorted i ...@@ -587,14 +587,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 +613,9 @@ Sets a **DataAbilityPredicates** object to filter out duplicate records. ...@@ -613,9 +613,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 +634,14 @@ Set a **DataAbilityPredicates** object to specify the maximum number of records. ...@@ -634,14 +634,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 +660,14 @@ Sets a **DataAbilityPredicates** object to specify the start position of the ret ...@@ -660,14 +660,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 +686,14 @@ Sets a **DataAbilityPredicates** object to group rows that have the same value i ...@@ -686,14 +686,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,19 +705,20 @@ Sets a **DataAbilityPredicates** object to group rows that have the same value i ...@@ -705,19 +705,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. 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
...@@ -736,16 +737,16 @@ Sets a **DataAbilityPredicates** object to match the field with data type Array< ...@@ -736,16 +737,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
...@@ -764,16 +765,16 @@ Sets a **DataAbilityPredicates** object to match the field with data type Array< ...@@ -764,16 +765,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
......
# Screenshot # Screenshot
Provides APIs for you to set information such as the region to capture and the size of the screen region when capturing a screen.
> **NOTE** > **NOTE**
> >
> 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.
>
> The APIs provided by this module are system APIs.
## Modules to Import ## Modules to Import
...@@ -18,10 +21,11 @@ Describes screenshot options. ...@@ -18,10 +21,11 @@ Describes screenshot options.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------- | ------------- | ---- | ------------------------------------------------------------ | | ---------------------- | ------------- | ---- | ------------------------------------------------------------ |
| screenRect | [Rect](#rect) | No | Region of the screen to capture. If this parameter is null, the full screen will be captured.| | screenRect | [Rect](#rect) | No | Region of the screen to capture. If this parameter is null, the full screen will be captured. |
| imageSize | [Size](#size) | No | Size of the screen region to capture. If this parameter is null, the full screen will be captured.| | imageSize | [Size](#size) | No | Size of the screen region to capture. If this parameter is null, the full screen will be captured. |
| rotation | number | No | Rotation angle of the screenshot. Currently, the value can be **0** only. The default value is **0**.| | rotation | number | No | Rotation angle of the screenshot. Currently, the value can be **0** only. The default value is **0**. |
| displayId<sup>8+</sup> | number | No | ID of the [display](js-apis-display.md#display) device on which the screen region is to be captured.|
## Rect ## Rect
...@@ -63,7 +67,7 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a cal ...@@ -63,7 +67,7 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a cal
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ------------------------------------------------------------ | | -------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
| options | [ScreenshotOptions](#screenshotoptions) | No | Screenshot options, which consist of **screenRect**, **imageSize**, and **rotation**. You need to set these parameters.| | options | [ScreenshotOptions](#screenshotoptions) | No | Consists of **screenRect**, **imageSize**, **rotation**, and **displayId**. You can set them separately.|
| callback | AsyncCallback&lt;image.PixelMap&gt; | Yes | Callback used to return a **PixelMap** object. | | callback | AsyncCallback&lt;image.PixelMap&gt; | Yes | Callback used to return a **PixelMap** object. |
**Example** **Example**
...@@ -78,7 +82,8 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a cal ...@@ -78,7 +82,8 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a cal
"imageSize": { "imageSize": {
"width": 300, "width": 300,
"height": 300}, "height": 300},
"rotation": 0 "rotation": 0,
"displayId": 0
}; };
screenshot.save(ScreenshotOptions, (err, data) => { screenshot.save(ScreenshotOptions, (err, data) => {
if (err) { if (err) {
...@@ -103,13 +108,13 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a pro ...@@ -103,13 +108,13 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a pro
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------- | --------------------------------------- | ---- | ------------------------------------------------------------ | | ------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
| options | [ScreenshotOptions](#screenshotoptions) | No | Screenshot options, which consist of **screenRect**, **imageSize**, and **rotation**. You need to set these parameters.| | options | [ScreenshotOptions](#screenshotoptions) | No | Consists of **screenRect**, **imageSize**, **rotation**, and **displayId**. You can set them separately.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------------------- | ----------------------------------------------- | | ----------------------------- | ----------------------------------------------- |
| Promise&lt;image.PixelMap&gt; | Promise used to return an **image.PixelMap** object.| | Promise&lt;image.PixelMap&gt; | Promise used to return a **PixelMap** object.|
**Example** **Example**
...@@ -123,7 +128,8 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a pro ...@@ -123,7 +128,8 @@ Takes a screenshot and saves it as a **PixelMap** object. This method uses a pro
"imageSize": { "imageSize": {
"width": 300, "width": 300,
"height": 300}, "height": 300},
"rotation": 0 "rotation": 0,
"displayId": 0
}; };
let promise = screenshot.save(ScreenshotOptions); let promise = screenshot.save(ScreenshotOptions);
promise.then(() => { promise.then(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册