Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
30e9341f
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
30e9341f
编写于
6月 14, 2022
作者:
S
songruirui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
predicates文档修改
Signed-off-by:
N
songruirui
<
songruirui1@huawei.com
>
上级
a80a0e4c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
66 addition
and
66 deletion
+66
-66
zh-cn/application-dev/reference/apis/js-apis-application-DataShareExtensionAbility.md
...nce/apis/js-apis-application-DataShareExtensionAbility.md
+2
-2
zh-cn/application-dev/reference/apis/js-apis-data-DataSharePredicates.md
...on-dev/reference/apis/js-apis-data-DataSharePredicates.md
+64
-64
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-application-DataShareExtensionAbility.md
浏览文件 @
30e9341f
...
...
@@ -4,9 +4,9 @@
>**说明:**
>
>本模块首批接口从API version 9开始支持
。
后续版本的新增接口,采用上角标单独标记接口的起始版本。
>本模块首批接口从API version 9开始支持
,
后续版本的新增接口,采用上角标单独标记接口的起始版本。
>
>本模块接口均为系统接口,
三方应用不支持调
用。
>本模块接口均为系统接口,
不支持第三方应用使
用。
## 导入模块
...
...
zh-cn/application-dev/reference/apis/js-apis-data-DataSharePredicates.md
浏览文件 @
30e9341f
...
...
@@ -10,7 +10,7 @@
## 导入模块
```
ts
import
D
ataSharePredicates
from
'
@ohos.data.DataSharePredicates
'
;
import
d
ataSharePredicates
from
'
@ohos.data.DataSharePredicates
'
;
```
## equalTo
...
...
@@ -39,8 +39,8 @@ equalTo(field: string, value: ValueType): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
equalTo
(
"
NAME
"
,
"
Rose
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
equalTo
(
"
NAME
"
,
"
Rose
"
)
```
## notEqualTo
...
...
@@ -69,8 +69,8 @@ notEqualTo(field: string, value: ValueType): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
notEqualTo
(
"
NAME
"
,
"
Rose
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
notEqualTo
(
"
NAME
"
,
"
Rose
"
)
```
## beginWrap
...
...
@@ -90,8 +90,8 @@ beginWrap(): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
equalTo
(
"
NAME
"
,
"
lisi
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
equalTo
(
"
NAME
"
,
"
lisi
"
)
.
beginWrap
()
.
equalTo
(
"
AGE
"
,
18
)
.
or
()
...
...
@@ -116,8 +116,8 @@ endWrap(): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
equalTo
(
"
NAME
"
,
"
lisi
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
equalTo
(
"
NAME
"
,
"
lisi
"
)
.
beginWrap
()
.
equalTo
(
"
AGE
"
,
18
)
.
or
()
...
...
@@ -144,8 +144,8 @@ or(): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
equalTo
(
"
NAME
"
,
"
lisi
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
equalTo
(
"
NAME
"
,
"
lisi
"
)
.
or
()
.
equalTo
(
"
NAME
"
,
"
Rose
"
)
```
...
...
@@ -169,8 +169,8 @@ and(): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
equalTo
(
"
NAME
"
,
"
lisi
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
equalTo
(
"
NAME
"
,
"
lisi
"
)
.
and
()
.
equalTo
(
"
SALARY
"
,
200.5
)
```
...
...
@@ -199,8 +199,8 @@ contains(field: string, value: string): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
contains
(
"
NAME
"
,
"
os
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
contains
(
"
NAME
"
,
"
os
"
)
```
## beginsWith
...
...
@@ -227,8 +227,8 @@ beginsWith(field: string, value: string): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
beginsWith
(
"
NAME
"
,
"
os
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
beginsWith
(
"
NAME
"
,
"
os
"
)
```
## endsWith
...
...
@@ -255,8 +255,8 @@ endsWith(field: string, value: string): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
endsWith
(
"
NAME
"
,
"
os
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
endsWith
(
"
NAME
"
,
"
os
"
)
```
## isNull
...
...
@@ -284,8 +284,8 @@ isNull(field: string): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
isNull
(
"
NAME
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
isNull
(
"
NAME
"
)
```
## isNotNull
...
...
@@ -313,8 +313,8 @@ isNotNull(field: string): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
isNotNull
(
"
NAME
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
isNotNull
(
"
NAME
"
)
```
## like
...
...
@@ -336,15 +336,15 @@ like(field: string, value: string): DataSharePredicates
**返回值:**
| 类型 | 说明 |
| ------------------------------------------- | -------------------------- |
|
[
DataSharePredicates
](
#datasharepredicates
)
|
返回与指定字段匹配的谓词。
|
| 类型 | 说明
|
| ------------------------------------------- | --------------------------
----------------------------------
|
|
[
DataSharePredicates
](
#datasharepredicates
)
|
openFile(uri: string, mode: string, callback: AsyncCallback
<
number
>
) { let err = {"code":0}; let fd = 0; callback(err,fd);}ts
|
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
like
(
"
NAME
"
,
"
%os%
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
like
(
"
NAME
"
,
"
%os%
"
)
```
## unlike
...
...
@@ -373,8 +373,8 @@ unlike(field: string, value: string): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
unlike
(
"
NAME
"
,
"
%os%
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
unlike
(
"
NAME
"
,
"
%os%
"
)
```
## glob
...
...
@@ -401,8 +401,8 @@ glob(field: string, value: string): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
glob
(
"
NAME
"
,
"
?h*g
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
glob
(
"
NAME
"
,
"
?h*g
"
)
```
## between
...
...
@@ -430,8 +430,8 @@ between(field: string, low: ValueType, high: ValueType): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
between
(
"
AGE
"
,
10
,
50
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
between
(
"
AGE
"
,
10
,
50
)
```
## notBetween
...
...
@@ -459,8 +459,8 @@ notBetween(field: string, low: ValueType, high: ValueType): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
notBetween
(
"
AGE
"
,
10
,
50
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
notBetween
(
"
AGE
"
,
10
,
50
)
```
## greaterThan
...
...
@@ -489,8 +489,8 @@ greaterThan(field: string, value: ValueType): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
greaterThan
(
"
AGE
"
,
10
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
greaterThan
(
"
AGE
"
,
10
)
```
## lessThan
...
...
@@ -519,8 +519,8 @@ lessThan(field: string, value: ValueType): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
lessThan
(
"
AGE
"
,
50
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
lessThan
(
"
AGE
"
,
50
)
```
## greaterThanOrEqualTo
...
...
@@ -549,8 +549,8 @@ greaterThanOrEqualTo(field: string, value: ValueType): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
greaterThanOrEqualTo
(
"
AGE
"
,
10
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
greaterThanOrEqualTo
(
"
AGE
"
,
10
)
```
## lessThanOrEqualTo
...
...
@@ -579,8 +579,8 @@ lessThanOrEqualTo(field: string, value: ValueType): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
lessThanOrEqualTo
(
"
AGE
"
,
50
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
lessThanOrEqualTo
(
"
AGE
"
,
50
)
```
## orderByAsc
...
...
@@ -608,8 +608,8 @@ orderByAsc(field: string): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
orderByAsc
(
"
AGE
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
orderByAsc
(
"
AGE
"
)
```
## orderByDesc
...
...
@@ -637,8 +637,8 @@ orderByDesc(field: string): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
orderByDesc
(
"
AGE
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
orderByDesc
(
"
AGE
"
)
```
## distinct
...
...
@@ -658,8 +658,8 @@ distinct(): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
equalTo
(
"
NAME
"
,
"
Rose
"
).
distinct
(
"
NAME
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
equalTo
(
"
NAME
"
,
"
Rose
"
).
distinct
(
"
NAME
"
)
```
## limit
...
...
@@ -688,8 +688,8 @@ limit(total: number, offset: number): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
equalTo
(
"
NAME
"
,
"
Rose
"
).
limit
(
10
,
3
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
equalTo
(
"
NAME
"
,
"
Rose
"
).
limit
(
10
,
3
)
```
## groupBy
...
...
@@ -715,8 +715,8 @@ groupBy(fields: Array<string>): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
groupBy
([
"
AGE
"
,
"
NAME
"
])
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
groupBy
([
"
AGE
"
,
"
NAME
"
])
```
## indexedBy
...
...
@@ -742,8 +742,8 @@ indexedBy(field: string): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
indexedBy
(
"
SALARY_INDEX
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
indexedBy
(
"
SALARY_INDEX
"
)
```
## in
...
...
@@ -772,8 +772,8 @@ in(field: string, value: Array<ValueType>): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
in
(
"
AGE
"
,
[
18
,
20
])
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
in
(
"
AGE
"
,
[
18
,
20
])
```
## notIn
...
...
@@ -802,8 +802,8 @@ notIn(field: string, value: Array<ValueType>): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
notIn
(
"
NAME
"
,
[
"
Lisa
"
,
"
Rose
"
])
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
notIn
(
"
NAME
"
,
[
"
Lisa
"
,
"
Rose
"
])
```
## prefixKey
...
...
@@ -829,8 +829,8 @@ prefixKey(prefix: string): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
prefixKey
(
"
NAME
"
)
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
prefixKey
(
"
NAME
"
)
```
## inKeys
...
...
@@ -856,6 +856,6 @@ inKeys(keys: Array<string>): DataSharePredicates
**示例:**
```
ts
let
dataSharePredicates
=
new
DataSharePredicates
()
dataShareP
redicates
.
inKeys
([
"
Lisa
"
,
"
Rose
"
])
let
predicates
=
new
dataSharePredicates
.
DataSharePredicates
()
p
redicates
.
inKeys
([
"
Lisa
"
,
"
Rose
"
])
```
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录