提交 e62a9c24 编写于 作者: W wuyongning

update files

Signed-off-by: Nwuyongning <wuyongning@huawei.com>
上级 314c6d32
...@@ -640,7 +640,12 @@ distinct(): DataAbilityPredicates ...@@ -640,7 +640,12 @@ distinct(): DataAbilityPredicates
``` ```
let predicates = new dataAbility.DataAbilityPredicates("EMPLOYEE") let predicates = new dataAbility.DataAbilityPredicates("EMPLOYEE")
predicates.equalTo("NAME", "Rose").distinct("NAME") predicates.equalTo("NAME", "Rose").distinct("NAME")
let resultSet = await rdbStore.query(predicates, ["NAME"]) let promiseDistinct = rdbStore.query(predicates, ["NAME"])
promiseDistinct.then((resultSet) => {
console.log("distinct")
}).catch((err) => {
expect(null).assertFail();
})
``` ```
......
...@@ -69,7 +69,7 @@ setSessionId(sessionId?: string): boolean ...@@ -69,7 +69,7 @@ setSessionId(sessionId?: string): boolean
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| sessionId | string | | 分布式对象在可信组网中的标识ID。 | | sessionId | string | | 分布式对象在可信组网中的标识ID。 |
- 示例: - 示例:
```js ```js
......
...@@ -23,7 +23,7 @@ getRdbStore(context?: Context, config: StoreConfig, version: number, callback: A ...@@ -23,7 +23,7 @@ getRdbStore(context?: Context, config: StoreConfig, version: number, callback: A
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| context<sup>8+</sup> | Context | | 应用程序或功能的上下文 | | context<sup>8+</sup> | Context | | 应用程序或功能的上下文 |
| config | [StoreConfig](#storeconfig) | 是 | 与此RDB存储相关的数据库配置。 | | config | [StoreConfig](#storeconfig) | 是 | 与此RDB存储相关的数据库配置。 |
| version | number | 是 | 数据库版本。 | | version | number | 是 | 数据库版本。 |
| callback | AsyncCallback&lt;[RdbStore](#rdbstore)&gt; | 是 | 指定callback回调函数。返回一个RdbStore。 | | callback | AsyncCallback&lt;[RdbStore](#rdbstore)&gt; | 是 | 指定callback回调函数。返回一个RdbStore。 |
...@@ -53,7 +53,7 @@ getRdbStore(context?: Context, config: StoreConfig, version: number): Promise&lt ...@@ -53,7 +53,7 @@ getRdbStore(context?: Context, config: StoreConfig, version: number): Promise&lt
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| context<sup>8+</sup> | Context | | 应用程序或功能的上下文 | | context<sup>8+</sup> | Context | | 应用程序或功能的上下文 |
| config | [StoreConfig](#storeconfig) | 是 | 与此RDB存储相关的数据库配置。 | | config | [StoreConfig](#storeconfig) | 是 | 与此RDB存储相关的数据库配置。 |
| version | number | 是 | 数据库版本。 | | version | number | 是 | 数据库版本。 |
...@@ -91,7 +91,7 @@ deleteRdbStore(context?: Context, name: string, callback: AsyncCallback&lt;void& ...@@ -91,7 +91,7 @@ deleteRdbStore(context?: Context, name: string, callback: AsyncCallback&lt;void&
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| context<sup>8+</sup> | Context | | 应用程序或功能的上下文 | | context<sup>8+</sup> | Context | | 应用程序或功能的上下文 |
| name | string | 是 | 数据库名称。 | | name | string | 是 | 数据库名称。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 指定callback回调函数。如果数据库已删除,则为true;否则返回false。 | | callback | AsyncCallback&lt;void&gt; | 是 | 指定callback回调函数。如果数据库已删除,则为true;否则返回false。 |
...@@ -116,7 +116,7 @@ deleteRdbStore(context?: Context, name: string): Promise&lt;void&gt; ...@@ -116,7 +116,7 @@ deleteRdbStore(context?: Context, name: string): Promise&lt;void&gt;
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| context<sup>8+</sup> | Context | | 应用程序或功能的上下文 | | context<sup>8+</sup> | Context | | 应用程序或功能的上下文 |
| name | string | 是 | 数据库名称。 | | name | string | 是 | 数据库名称。 |
- 返回值: - 返回值:
...@@ -660,6 +660,7 @@ greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates ...@@ -660,6 +660,7 @@ greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates
配置谓词以匹配数据字段为ValueType且value大于或等于指定值的字段。 配置谓词以匹配数据字段为ValueType且value大于或等于指定值的字段。
**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
...@@ -869,7 +870,7 @@ groupBy(fields: Array&lt;string&gt;): RdbPredicates ...@@ -869,7 +870,7 @@ groupBy(fields: Array&lt;string&gt;): RdbPredicates
### indexedBy ### indexedBy
indexedBy(field: string): RdbPredicates indexedBy(indexName: string): RdbPredicates
配置RdbPredicates以指定索引列。 配置RdbPredicates以指定索引列。
...@@ -1295,6 +1296,8 @@ beginTransaction():void ...@@ -1295,6 +1296,8 @@ beginTransaction():void
在开始执行SQL语句之前,开始事务。 在开始执行SQL语句之前,开始事务。
**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。
- 示例: - 示例:
``` ```
rdbStore.beginTransaction() rdbStore.beginTransaction()
...@@ -1317,6 +1320,8 @@ commit():void ...@@ -1317,6 +1320,8 @@ commit():void
提交已执行的SQL语句。 提交已执行的SQL语句。
**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。
- 示例: - 示例:
``` ```
rdbStore.beginTransaction() rdbStore.beginTransaction()
...@@ -1340,6 +1345,8 @@ rollBack():void; ...@@ -1340,6 +1345,8 @@ rollBack():void;
回滚已经执行的SQL语句。 回滚已经执行的SQL语句。
**系统能力**:SystemCapability.DistributedDataManager.RelationalStore.Core。
- 示例: - 示例:
``` ```
try { try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册