Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
d9905afe
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看板
提交
d9905afe
编写于
7月 21, 2022
作者:
G
ge-yafang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update docs
Signed-off-by:
N
ge-yafang
<
geyafang@huawei.com
>
上级
f3bfea1a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
55 addition
and
49 deletion
+55
-49
zh-cn/application-dev/reference/apis/js-apis-data-DataShareResultSet.md
...ion-dev/reference/apis/js-apis-data-DataShareResultSet.md
+19
-16
zh-cn/application-dev/reference/apis/js-apis-data-dataSharePredicates.md
...on-dev/reference/apis/js-apis-data-dataSharePredicates.md
+33
-30
zh-cn/application-dev/reference/apis/js-apis-distributed-data.md
...pplication-dev/reference/apis/js-apis-distributed-data.md
+2
-2
zh-cn/application-dev/reference/apis/js-apis-screen.md
zh-cn/application-dev/reference/apis/js-apis-screen.md
+1
-1
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-data-DataShareResultSet.md
浏览文件 @
d9905afe
...
...
@@ -44,7 +44,10 @@ dataShareHelper.query(uri, da, columns).then((data) => {
});
```
## 属性
## DataShareResultSet
提供通过查询数据库生成的结果集的相关访问方法。
### 属性
**系统能力:**
SystemCapability.DistributedDataManager.DataShare.Core
...
...
@@ -55,7 +58,7 @@ dataShareHelper.query(uri, da, columns).then((data) => {
| rowCount | number | 是 | 结果集中的行数。 |
| isClosed | boolean | 是 | 标识当前结果集是否关闭。 |
## goToFirstRow
##
#
goToFirstRow
goToFirstRow(): boolean
...
...
@@ -76,7 +79,7 @@ let isGoTOFirstRow = resultSet.goToFirstRow();
console
.
info
(
'
resultSet.goToFirstRow:
'
+
isGoTOFirstRow
);
```
## goToLastRow
##
#
goToLastRow
goToLastRow(): boolean
...
...
@@ -97,7 +100,7 @@ let isGoToLastRow = resultSet.goToLastRow();
console
.
info
(
'
resultSet.goToLastRow:
'
+
isGoToLastRow
);
```
## goToNextRow
##
#
goToNextRow
goToNextRow(): boolean
...
...
@@ -118,7 +121,7 @@ let isGoToNextRow = resultSet.goToNextRow();
console
.
info
(
'
resultSet.goToNextRow:
'
+
isGoToNextRow
);
```
## goToPreviousRow
##
#
goToPreviousRow
goToPreviousRow(): boolean
...
...
@@ -139,7 +142,7 @@ let isGoToPreviousRow = resultSet.goToPreviousRow();
console
.
info
(
'
resultSet.goToPreviousRow:
'
+
isGoToPreviousRow
);
```
## goTo
##
#
goTo
goTo(offset:number): boolean
...
...
@@ -167,7 +170,7 @@ let isGoTo = resultSet.goTo(goToNum);
console
.
info
(
'
resultSet.goTo:
'
+
isGoTo
);
```
## goToRow
##
#
goToRow
goToRow(position: number): boolean
...
...
@@ -195,7 +198,7 @@ let isGoToRow = resultSet.goToRow(goToRowNum);
console
.
info
(
'
resultSet.goToRow:
'
+
isGoToRow
);
```
## getBlob
##
#
getBlob
getBlob(columnIndex: number): Uint8Array
...
...
@@ -224,7 +227,7 @@ let getBlob = resultSet.getBlob(columnIndex);
console
.
info
(
'
resultSet.getBlob:
'
+
getBlob
);
```
## getString
##
#
getString
getString(columnIndex: number):
*string*
...
...
@@ -253,7 +256,7 @@ let getString = resultSet.getString(columnIndex);
console
.
info
(
'
resultSet.getString:
'
+
getString
);
```
## getLong
##
#
getLong
getLong(columnIndex: number): number
...
...
@@ -282,7 +285,7 @@ let getLong = resultSet.getLong(columnIndex);
console
.
info
(
'
resultSet.getLong:
'
+
getLong
);
```
## getDouble
##
#
getDouble
getDouble(columnIndex: number): number
...
...
@@ -311,7 +314,7 @@ let getDouble = resultSet.getDouble(columnIndex);
console
.
info
(
'
resultSet.getDouble:
'
+
getDouble
);
```
## close
##
#
close
close(): void
...
...
@@ -325,7 +328,7 @@ close(): void
resultSet
.
close
();
```
## getColumnIndex
##
#
getColumnIndex
getColumnIndex(columnName: string): number
...
...
@@ -353,7 +356,7 @@ let getColumnIndex = resultSet.getColumnIndex(ColumnName)
console
.
info
(
'
resultSet.getColumnIndex:
'
+
getColumnIndex
);
```
## getColumnName
##
#
getColumnName
getColumnName(columnIndex: number):
*string*
...
...
@@ -381,7 +384,7 @@ let getColumnName = resultSet.getColumnName(columnIndex)
console
.
info
(
'
resultSet.getColumnName:
'
+
getColumnName
);
```
## getDataType
##
#
getDataType
getDataType(columnIndex: number): DataType
...
...
@@ -409,7 +412,7 @@ let getDataType = resultSet.getDataType(columnIndex);
console
.
info
(
'
resultSet.getDataType:
'
+
getDataType
);
```
## DataType
##
#
DataType
数据类型枚举。
...
...
zh-cn/application-dev/reference/apis/js-apis-data-dataSharePredicates.md
浏览文件 @
d9905afe
...
...
@@ -13,7 +13,10 @@
import
dataSharePredicates
from
'
@ohos.data.dataSharePredicates
'
;
```
## equalTo
## DataSharePredicates
提供用于不同实现不同查询方法的数据共享谓词。
### equalTo
equalTo(field: string, value: ValueType): DataSharePredicates
...
...
@@ -43,7 +46,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
equalTo
(
"
NAME
"
,
"
Rose
"
)
```
## notEqualTo
##
#
notEqualTo
notEqualTo(field: string, value: ValueType): DataSharePredicates
...
...
@@ -73,7 +76,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
notEqualTo
(
"
NAME
"
,
"
Rose
"
)
```
## beginWrap
##
#
beginWrap
beginWrap(): DataSharePredicates
...
...
@@ -99,7 +102,7 @@ predicates.equalTo("NAME", "lisi")
.
endWrap
()
```
## endWrap
##
#
endWrap
endWrap(): DataSharePredicates
...
...
@@ -125,7 +128,7 @@ predicates.equalTo("NAME", "lisi")
.
endWrap
()
```
## or
##
#
or
or(): DataSharePredicates
...
...
@@ -150,7 +153,7 @@ predicates.equalTo("NAME", "lisi")
.
equalTo
(
"
NAME
"
,
"
Rose
"
)
```
## and
##
#
and
and(): DataSharePredicates
...
...
@@ -175,7 +178,7 @@ predicates.equalTo("NAME", "lisi")
.
equalTo
(
"
SALARY
"
,
200.5
)
```
## contains
##
#
contains
contains(field: string, value: string): DataSharePredicates
...
...
@@ -203,7 +206,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
contains
(
"
NAME
"
,
"
os
"
)
```
## beginsWith
##
#
beginsWith
beginsWith(field: string, value: string): DataSharePredicates
...
...
@@ -231,7 +234,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
beginsWith
(
"
NAME
"
,
"
os
"
)
```
## endsWith
##
#
endsWith
endsWith(field: string, value: string): DataSharePredicates
...
...
@@ -259,7 +262,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
endsWith
(
"
NAME
"
,
"
os
"
)
```
## isNull
##
#
isNull
isNull(field: string): DataSharePredicates
...
...
@@ -288,7 +291,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
isNull
(
"
NAME
"
)
```
## isNotNull
##
#
isNotNull
isNotNull(field: string): DataSharePredicates
...
...
@@ -317,7 +320,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
isNotNull
(
"
NAME
"
)
```
## like
##
#
like
like(field: string, value: string): DataSharePredicates
...
...
@@ -347,7 +350,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
like
(
"
NAME
"
,
"
%os%
"
)
```
## unlike
##
#
unlike
unlike(field: string, value: string): DataSharePredicates
...
...
@@ -377,7 +380,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
unlike
(
"
NAME
"
,
"
%os%
"
)
```
## glob
##
#
glob
glob(field: string, value: string): DataSharePredicates
...
...
@@ -405,7 +408,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
glob
(
"
NAME
"
,
"
?h*g
"
)
```
## between
##
#
between
between(field: string, low: ValueType, high: ValueType): DataSharePredicates
...
...
@@ -434,7 +437,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
between
(
"
AGE
"
,
10
,
50
)
```
## notBetween
##
#
notBetween
notBetween(field: string, low: ValueType, high: ValueType): DataSharePredicates
...
...
@@ -463,7 +466,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
notBetween
(
"
AGE
"
,
10
,
50
)
```
## greaterThan
##
#
greaterThan
greaterThan(field: string, value: ValueType): DataSharePredicates
...
...
@@ -493,7 +496,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
greaterThan
(
"
AGE
"
,
10
)
```
## lessThan
##
#
lessThan
lessThan(field: string, value: ValueType): DataSharePredicates
...
...
@@ -523,7 +526,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
lessThan
(
"
AGE
"
,
50
)
```
## greaterThanOrEqualTo
##
#
greaterThanOrEqualTo
greaterThanOrEqualTo(field: string, value: ValueType): DataSharePredicates
...
...
@@ -553,7 +556,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
greaterThanOrEqualTo
(
"
AGE
"
,
10
)
```
## lessThanOrEqualTo
##
#
lessThanOrEqualTo
lessThanOrEqualTo(field: string, value: ValueType): DataSharePredicates
...
...
@@ -583,7 +586,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
lessThanOrEqualTo
(
"
AGE
"
,
50
)
```
## orderByAsc
##
#
orderByAsc
orderByAsc(field: string): DataSharePredicates
...
...
@@ -612,7 +615,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
orderByAsc
(
"
AGE
"
)
```
## orderByDesc
##
#
orderByDesc
orderByDesc(field: string): DataSharePredicates
...
...
@@ -641,7 +644,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
orderByDesc
(
"
AGE
"
)
```
## distinct
##
#
distinct
distinct(): DataSharePredicates
...
...
@@ -662,7 +665,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
equalTo
(
"
NAME
"
,
"
Rose
"
).
distinct
()
```
## limit
##
#
limit
limit(total: number, offset: number): DataSharePredicates
...
...
@@ -692,7 +695,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
equalTo
(
"
NAME
"
,
"
Rose
"
).
limit
(
10
,
3
)
```
## groupBy
##
#
groupBy
groupBy(fields: Array
<
string
>
): DataSharePredicates
...
...
@@ -719,7 +722,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
groupBy
([
"
AGE
"
,
"
NAME
"
])
```
## indexedBy
##
#
indexedBy
indexedBy(field: string): DataSharePredicates
...
...
@@ -746,7 +749,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
indexedBy
(
"
SALARY_INDEX
"
)
```
## in
##
#
in
in(field: string, value: Array
<
ValueType
>
): DataSharePredicates
...
...
@@ -776,7 +779,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
in
(
"
AGE
"
,
[
18
,
20
])
```
## notIn
##
#
notIn
notIn(field: string, value: Array
<
ValueType
>
): DataSharePredicates
...
...
@@ -806,7 +809,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
notIn
(
"
NAME
"
,
[
"
Lisa
"
,
"
Rose
"
])
```
## prefixKey
##
#
prefixKey
prefixKey(prefix: string): DataSharePredicates
...
...
@@ -833,7 +836,7 @@ let predicates = new dataSharePredicates.DataSharePredicates()
predicates
.
prefixKey
(
"
NAME
"
)
```
## inKeys
##
#
inKeys
inKeys(keys: Array
<
string
>
): DataSharePredicates
...
...
zh-cn/application-dev/reference/apis/js-apis-distributed-data.md
浏览文件 @
d9905afe
...
...
@@ -3718,7 +3718,7 @@ getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: Asyn
| 参数名 | 参数类型 | 必填 | 说明 |
| ----- | ------ | ---- | ----------------------- |
| predicates |
[
DataSharePredicates
](
js-apis-data-DataSharePredicates.md#datasharepredicates
)
| 是 |指示筛选条件,当此参数为null时,应定义处理逻辑。 |
| callback |AsyncCallback
<
[KvStoreResultSet](#kvstoreresultset
sup8sup
)
>
| 是 |回调函数,获取与指定Predicates对象匹配的KvStoreResultSet对象。 |
| callback |AsyncCallback
<
[KvStoreResultSet](#kvstoreresultset
8
)
>
| 是 |回调函数,获取与指定Predicates对象匹配的KvStoreResultSet对象。 |
**示例:**
...
...
@@ -4202,7 +4202,7 @@ sync(deviceIds: string[], query: Query, mode: SyncMode, delayMs?: number): void
| ----- | ------ | ---- | ----------------------- |
| deviceIds |string[] | 是 |同一组网环境下,需要同步的设备的deviceId列表。 |
| mode |
[
SyncMode
](
#syncmode
)
| 是 |同步模式。 |
| query |
[
Query
](
#query
sup8sup
)
| 是 |表示数据库的查询谓词条件 |
| query |
[
Query
](
#query
8
)
| 是 |表示数据库的查询谓词条件 |
| delayMs |number | 否 |可选参数,允许延时时间,单位:ms(毫秒)。 |
**示例:**
...
...
zh-cn/application-dev/reference/apis/js-apis-screen.md
浏览文件 @
d9905afe
...
...
@@ -531,7 +531,7 @@ screen.setScreenRotationLocked(isLocked, (err, data) => {
| parent | number | 是 | 否 | 屏幕所属群组的id。 |
| supportedModeInfo | Array
<
[ScreenModeInfo](#screenmodeinfo)
>
| 是 | 否 | 屏幕支持的模式集合。 |
| activeModeIndex | number | 是 | 否 | 当前屏幕所处模式索引。 |
| orientation |
[
Orientation
](
#rientation
)
| 是 | 否 | 屏幕方向。 |
| orientation |
[
Orientation
](
#
o
rientation
)
| 是 | 否 | 屏幕方向。 |
### setOrientation
setOrientation(orientation: Orientation, callback: AsyncCallback
<
void
>
): void
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录