未验证 提交 26f9b691 编写于 作者: 葛亚芳 提交者: Gitee

update zh-cn/application-dev/reference/apis/js-apis-data-dataSharePredicates.md.

Signed-off-by: N@ge-yafang <geyafang@huawei.com>
上级 39d735be
......@@ -11,7 +11,7 @@
## 导入模块
```js
```ts
import dataSharePredicates from '@ohos.data.dataSharePredicates';
```
......@@ -43,7 +43,7 @@ equalTo(field: string, value: ValueType): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.equalTo("NAME", "Rose")
```
......@@ -73,7 +73,7 @@ notEqualTo(field: string, value: ValueType): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.notEqualTo("NAME", "Rose")
```
......@@ -96,7 +96,7 @@ beginWrap(): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.equalTo("NAME", "lisi")
.beginWrap()
......@@ -124,7 +124,7 @@ endWrap(): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.equalTo("NAME", "lisi")
.beginWrap()
......@@ -152,7 +152,7 @@ or(): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.equalTo("NAME", "lisi")
.or()
......@@ -177,7 +177,7 @@ and(): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.equalTo("NAME", "lisi")
.and()
......@@ -209,7 +209,7 @@ contains(field: string, value: string): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.contains("NAME", "os")
```
......@@ -239,7 +239,7 @@ beginsWith(field: string, value: string): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.beginsWith("NAME", "os")
```
......@@ -269,7 +269,7 @@ endsWith(field: string, value: string): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.endsWith("NAME", "os")
```
......@@ -298,7 +298,7 @@ isNull(field: string): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.isNull("NAME")
```
......@@ -327,7 +327,7 @@ isNotNull(field: string): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.isNotNull("NAME")
```
......@@ -357,7 +357,7 @@ like(field: string, value: string): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.like("NAME", "%os%")
```
......@@ -387,7 +387,7 @@ unlike(field: string, value: string): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.unlike("NAME", "%os%")
```
......@@ -417,7 +417,7 @@ glob(field: string, value: string): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.glob("NAME", "?h*g")
```
......@@ -448,7 +448,7 @@ between(field: string, low: ValueType, high: ValueType): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.between("AGE", 10, 50)
```
......@@ -479,7 +479,7 @@ notBetween(field: string, low: ValueType, high: ValueType): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.notBetween("AGE", 10, 50)
```
......@@ -509,7 +509,7 @@ greaterThan(field: string, value: ValueType): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.greaterThan("AGE", 10)
```
......@@ -539,7 +539,7 @@ lessThan(field: string, value: ValueType): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.lessThan("AGE", 50)
```
......@@ -569,7 +569,7 @@ greaterThanOrEqualTo(field: string, value: ValueType): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.greaterThanOrEqualTo("AGE", 10)
```
......@@ -599,7 +599,7 @@ lessThanOrEqualTo(field: string, value: ValueType): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.lessThanOrEqualTo("AGE", 50)
```
......@@ -628,7 +628,7 @@ orderByAsc(field: string): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.orderByAsc("AGE")
```
......@@ -657,7 +657,7 @@ orderByDesc(field: string): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.orderByDesc("AGE")
```
......@@ -680,7 +680,7 @@ distinct(): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.equalTo("NAME", "Rose").distinct()
```
......@@ -710,7 +710,7 @@ limit(total: number, offset: number): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.equalTo("NAME", "Rose").limit(10, 3)
```
......@@ -739,7 +739,7 @@ groupBy(fields: Array&lt;string&gt;): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.groupBy(["AGE", "NAME"])
```
......@@ -768,7 +768,7 @@ indexedBy(field: string): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.indexedBy("SALARY_INDEX")
```
......@@ -798,7 +798,7 @@ in(field: string, value: Array&lt;ValueType&gt;): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.in("AGE", [18, 20])
```
......@@ -828,7 +828,7 @@ notIn(field: string, value: Array&lt;ValueType&gt;): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.notIn("NAME", ["Lisa", "Rose"])
```
......@@ -857,7 +857,7 @@ prefixKey(prefix: string): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.prefixKey("NAME")
```
......@@ -886,7 +886,7 @@ inKeys(keys: Array&lt;string&gt;): DataSharePredicates
**示例:**
```js
```ts
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.inKeys(["Lisa", "Rose"])
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册