Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
1795e66a
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看板
未验证
提交
1795e66a
编写于
11月 05, 2022
作者:
葛
葛亚芳
提交者:
Gitee
11月 05, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update zh-cn/application-dev/reference/apis/js-apis-data-resultset.md.
Signed-off-by:
N
葛亚芳
<
geyafang@huawei.com
>
上级
13331c08
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
7 addition
and
7 deletion
+7
-7
zh-cn/application-dev/reference/apis/js-apis-data-resultset.md
.../application-dev/reference/apis/js-apis-data-resultset.md
+7
-7
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-data-resultset.md
浏览文件 @
1795e66a
...
...
@@ -124,7 +124,7 @@ goTo(offset:number): boolean
```
js
let
predicatesgoto
=
new
dataRdb
.
RdbPredicates
(
"
EMPLOYEE
"
);
let
promisequerygoto
=
rdbStore
.
query
(
predicatesgoto
,
[
"
ID
"
,
"
NAME
"
,
"
AGE
"
,
"
SALARY
"
,
"
CODES
"
]);
promisequerygoto
.
then
((
resultSet
)
{
promisequerygoto
.
then
((
resultSet
)
=>
{
resultSet
.
goTo
(
1
);
resultSet
.
close
();
}).
catch
((
err
)
=>
{
...
...
@@ -157,7 +157,7 @@ goToRow(position: number): boolean
```
js
let
predicatesgotorow
=
new
dataRdb
.
RdbPredicates
(
"
EMPLOYEE
"
);
let
promisequerygotorow
=
rdbStore
.
query
(
predicatesgotorow
,
[
"
ID
"
,
"
NAME
"
,
"
AGE
"
,
"
SALARY
"
,
"
CODES
"
]);
promisequerygotorow
.
then
((
resultSet
)
{
promisequerygotorow
.
then
((
resultSet
)
=>
{
resultSet
.
goToRow
(
5
);
resultSet
.
close
();
}).
catch
((
err
)
=>
{
...
...
@@ -185,7 +185,7 @@ goToFirstRow(): boolean
```
js
let
predicatesgoFirst
=
new
dataRdb
.
RdbPredicates
(
"
EMPLOYEE
"
);
let
promisequerygoFirst
=
rdbStore
.
query
(
predicatesgoFirst
,
[
"
ID
"
,
"
NAME
"
,
"
AGE
"
,
"
SALARY
"
,
"
CODES
"
]);
promisequerygoFirst
.
then
((
resultSet
)
{
promisequerygoFirst
.
then
((
resultSet
)
=>
{
resultSet
.
goToFirstRow
();
resultSet
.
close
();
}).
catch
((
err
)
=>
{
...
...
@@ -212,7 +212,7 @@ goToLastRow(): boolean
```
js
let
predicatesgoLast
=
new
dataRdb
.
RdbPredicates
(
"
EMPLOYEE
"
);
let
promisequerygoLast
=
rdbStore
.
query
(
predicatesgoLast
,
[
"
ID
"
,
"
NAME
"
,
"
AGE
"
,
"
SALARY
"
,
"
CODES
"
]);
promisequerygoLast
.
then
((
resultSet
)
{
promisequerygoLast
.
then
((
resultSet
)
=>
{
resultSet
.
goToLastRow
();
resultSet
.
close
();
}).
catch
((
err
)
=>
{
...
...
@@ -239,7 +239,7 @@ goToNextRow(): boolean
```
js
let
predicatesgoNext
=
new
dataRdb
.
RdbPredicates
(
"
EMPLOYEE
"
);
let
promisequerygoNext
=
rdbStore
.
query
(
predicatesgoNext
,
[
"
ID
"
,
"
NAME
"
,
"
AGE
"
,
"
SALARY
"
,
"
CODES
"
]);
promisequerygoNext
.
then
((
resultSet
)
{
promisequerygoNext
.
then
((
resultSet
)
=>
{
resultSet
.
goToNextRow
();
resultSet
.
close
();
}).
catch
((
err
)
=>
{
...
...
@@ -266,7 +266,7 @@ goToPreviousRow(): boolean
```
js
let
predicatesgoPrev
=
new
dataRdb
.
RdbPredicates
(
"
EMPLOYEE
"
);
let
promisequerygoPrev
=
rdbStore
.
query
(
predicatesgoPrev
,
[
"
ID
"
,
"
NAME
"
,
"
AGE
"
,
"
SALARY
"
,
"
CODES
"
]);
promisequerygoPrev
.
then
((
resultSet
)
{
promisequerygoPrev
.
then
((
resultSet
)
=>
{
resultSet
.
goToPreviousRow
();
resultSet
.
close
();
}).
catch
((
err
)
=>
{
...
...
@@ -417,7 +417,7 @@ close(): void
```
js
let
predicatesClose
=
new
dataRdb
.
RdbPredicates
(
"
EMPLOYEE
"
);
let
promiseClose
=
rdbStore
.
query
(
predicatesClose
,
[
"
ID
"
,
"
NAME
"
,
"
AGE
"
,
"
SALARY
"
,
"
CODES
"
]);
promiseClose
.
then
((
resultSet
)
{
promiseClose
.
then
((
resultSet
)
=>
{
resultSet
.
close
();
}).
catch
((
err
)
=>
{
console
.
log
(
'
resultset close failed
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录