• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# DataAbilityOperation
2
3The DataAbilityOperation module defines the operation on DataAbilities. It can be used as an input parameter of [executeBatch](js-apis-inner-ability-dataAbilityHelper.md#dataabilityhelperexecutebatch) to specify the database operation information.
4
5> **NOTE**
6>
7> 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.
8>
9> The APIs of this module can be used only in the FA model.
10
11## Modules to Import
12
13```ts
14import ability from '@ohos.ability.ability';
15```
16
17## Attributes
18
19**System capability**: SystemCapability.Ability.AbilityRuntime.FAModel
20
21| Name     | Template    | Read Only| Optional | Description      |
22| --------- | -------- |-----| ------| ---------- |
23| uri   | string | No |  No  | URI of the DataAbility. Example: 'dataability:///com.example.xxx.xxxx'. |
24| type   | [featureAbility.DataAbilityOperationType](js-apis-ability-featureAbility.md#dataabilityoperationtype7) | No | No  | Operation type. |
25| valuesBucket   |  [rdb.ValuesBucket](../apis-arkdata/js-apis-data-relationalStore.md#valuesbucket) | No | Yes   | Data value to set. |
26| valueBackReferences   | [rdb.ValuesBucket](../apis-arkdata/js-apis-data-relationalStore.md#valuesbucket) | No | Yes   | **ValuesBucket** object that contains a set of key-value pairs. |
27| predicates   | [dataAbility.DataAbilityPredicates](../apis-arkdata/js-apis-data-ability.md#dataabilitypredicates) | No | Yes  | Predicates to set. If no predicate is set, all data records are displayed. |
28| predicatesBackReferences   | Map\<number, number> | No | Yes   | Back references of the predicates. |
29| interrupted   | boolean | No | Yes   | Whether batch operations can be interrupted. |
30| expectedCount   | number | No | Yes   | Expected number of rows to be updated or deleted. |
31