Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
3c801ea5
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
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看板
提交
3c801ea5
编写于
1月 17, 2023
作者:
P
PaDaBoo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add relationalStore namespace, deprecated V9 interface
Signed-off-by:
N
PaDaBoo
<
xuejianwu@huawei.com
>
上级
251e2238
变更
3
展开全部
显示空白变更内容
内联
并排
Showing
3 changed file
with
3097 addition
and
403 deletion
+3097
-403
zh-cn/application-dev/reference/apis/js-apis-data-rdb.md
zh-cn/application-dev/reference/apis/js-apis-data-rdb.md
+70
-323
zh-cn/application-dev/reference/apis/js-apis-data-relationalStore.md
...cation-dev/reference/apis/js-apis-data-relationalStore.md
+3009
-0
zh-cn/application-dev/reference/apis/js-apis-data-resultset.md
.../application-dev/reference/apis/js-apis-data-resultset.md
+18
-80
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-data-rdb.md
浏览文件 @
3c801ea5
此差异已折叠。
点击以展开。
zh-cn/application-dev/reference/apis/js-apis-data-relationalStore.md
0 → 100644
浏览文件 @
3c801ea5
此差异已折叠。
点击以展开。
zh-cn/application-dev/reference/apis/js-apis-data-resultset.md
浏览文件 @
3c801ea5
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
> **说明:**
> **说明:**
>
>
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
>
> 从API Version 9开始,该接口不再维护,推荐使用新接口[@ohos.data.relationalStore#ResultSet](js-apis-data-relationalStore.md#resultset)。
## ResultSetV9<sup>9+</sup>
## ResultSetV9<sup>9+</sup>
...
@@ -536,14 +538,10 @@ promiseClose.then((resultSetV9) => {
...
@@ -536,14 +538,10 @@ promiseClose.then((resultSetV9) => {
| ------------ | ------------------------------------------------------------ |
| ------------ | ------------------------------------------------------------ |
| 14800012 | The result set is empty or the specified location is invalid. |
| 14800012 | The result set is empty or the specified location is invalid. |
## ResultSet
<sup>(deprecated)</sup>
## ResultSet
提供通过查询数据库生成的数据库结果集的访问方法。
提供通过查询数据库生成的数据库结果集的访问方法。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[ResultSetV9](#resultsetv99)替代。
### 使用说明
### 使用说明
需要通过
[
RdbStore.query()
](
js-apis-data-rdb.md#query
)
获取resultSet对象。
需要通过
[
RdbStore.query()
](
js-apis-data-rdb.md#query
)
获取resultSet对象。
...
@@ -559,11 +557,7 @@ promise.then((resultSet) => {
...
@@ -559,11 +557,7 @@ promise.then((resultSet) => {
});
});
```
```
### 属性<sup>(deprecated)</sup>
### 属性
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[属性](#属性9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
...
@@ -579,16 +573,12 @@ promise.then((resultSet) => {
...
@@ -579,16 +573,12 @@ promise.then((resultSet) => {
| isStarted | boolean | 是 | 检查指针是否移动过。 |
| isStarted | boolean | 是 | 检查指针是否移动过。 |
| isClosed | boolean | 是 | 检查当前结果集是否关闭。 |
| isClosed | boolean | 是 | 检查当前结果集是否关闭。 |
### getColumnIndex
<sup>(deprecated)</sup>
### getColumnIndex
getColumnIndex(columnName: string): number
getColumnIndex(columnName: string): number
根据指定的列名获取列索引。
根据指定的列名获取列索引。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[getColumnIndex](#getcolumnindex9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**参数:**
**参数:**
...
@@ -613,16 +603,12 @@ getColumnIndex(columnName: string): number
...
@@ -613,16 +603,12 @@ getColumnIndex(columnName: string): number
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
SALARY
"
));
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
SALARY
"
));
```
```
### getColumnName
<sup>(deprecated)</sup>
### getColumnName
getColumnName(columnIndex: number): string
getColumnName(columnIndex: number): string
根据指定的列索引获取列名。
根据指定的列索引获取列名。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[getColumnName](#getcolumnname9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**参数:**
**参数:**
...
@@ -645,16 +631,12 @@ getColumnName(columnIndex: number): string
...
@@ -645,16 +631,12 @@ getColumnName(columnIndex: number): string
const
age
=
resultSet
.
getColumnName
(
2
);
const
age
=
resultSet
.
getColumnName
(
2
);
```
```
### goTo
<sup>(deprecated)</sup>
### goTo
goTo(offset:number): boolean
goTo(offset:number): boolean
向前或向后转至结果集的指定行,相对于其当前位置偏移。
向前或向后转至结果集的指定行,相对于其当前位置偏移。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[goTo](#goto9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**参数:**
**参数:**
...
@@ -682,16 +664,12 @@ goTo(offset:number): boolean
...
@@ -682,16 +664,12 @@ goTo(offset:number): boolean
});
});
```
```
### goToRow
<sup>(deprecated)</sup>
### goToRow
goToRow(position: number): boolean
goToRow(position: number): boolean
转到结果集的指定行。
转到结果集的指定行。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[goToRow](#gotorow9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**参数:**
**参数:**
...
@@ -719,16 +697,12 @@ goToRow(position: number): boolean
...
@@ -719,16 +697,12 @@ goToRow(position: number): boolean
});
});
```
```
### goToFirstRow
<sup>(deprecated)</sup>
### goToFirstRow
goToFirstRow(): boolean
goToFirstRow(): boolean
转到结果集的第一行。
转到结果集的第一行。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[goToFirstRow](#gotofirstrow9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**返回值:**
**返回值:**
...
@@ -750,16 +724,12 @@ goToFirstRow(): boolean
...
@@ -750,16 +724,12 @@ goToFirstRow(): boolean
});
});
```
```
### goToLastRow
<sup>(deprecated)</sup>
### goToLastRow
goToLastRow(): boolean
goToLastRow(): boolean
转到结果集的最后一行。
转到结果集的最后一行。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[goToLastRow](#gotolastrow9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**返回值:**
**返回值:**
...
@@ -781,16 +751,12 @@ goToLastRow(): boolean
...
@@ -781,16 +751,12 @@ goToLastRow(): boolean
});
});
```
```
### goToNextRow
<sup>(deprecated)</sup>
### goToNextRow
goToNextRow(): boolean
goToNextRow(): boolean
转到结果集的下一行。
转到结果集的下一行。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[goToNextRow](#gotonextrow9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**返回值:**
**返回值:**
...
@@ -812,16 +778,12 @@ goToNextRow(): boolean
...
@@ -812,16 +778,12 @@ goToNextRow(): boolean
});
});
```
```
### goToPreviousRow
<sup>(deprecated)</sup>
### goToPreviousRow
goToPreviousRow(): boolean
goToPreviousRow(): boolean
转到结果集的上一行。
转到结果集的上一行。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[goToPreviousRow](#gotopreviousrow9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**返回值:**
**返回值:**
...
@@ -843,16 +805,12 @@ goToPreviousRow(): boolean
...
@@ -843,16 +805,12 @@ goToPreviousRow(): boolean
});
});
```
```
### getBlob
<sup>(deprecated)</sup>
### getBlob
getBlob(columnIndex: number): Uint8Array
getBlob(columnIndex: number): Uint8Array
以字节数组的形式获取当前行中指定列的值。
以字节数组的形式获取当前行中指定列的值。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[getBlob](#getblob9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**参数:**
**参数:**
...
@@ -873,16 +831,12 @@ getBlob(columnIndex: number): Uint8Array
...
@@ -873,16 +831,12 @@ getBlob(columnIndex: number): Uint8Array
const
codes
=
resultSet
.
getBlob
(
resultSet
.
getColumnIndex
(
"
CODES
"
));
const
codes
=
resultSet
.
getBlob
(
resultSet
.
getColumnIndex
(
"
CODES
"
));
```
```
### getString
<sup>(deprecated)</sup>
### getString
getString(columnIndex: number): string
getString(columnIndex: number): string
以字符串形式获取当前行中指定列的值。
以字符串形式获取当前行中指定列的值。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[getString](#getstring9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**参数:**
**参数:**
...
@@ -903,16 +857,12 @@ getString(columnIndex: number): string
...
@@ -903,16 +857,12 @@ getString(columnIndex: number): string
const
name
=
resultSet
.
getString
(
resultSet
.
getColumnIndex
(
"
NAME
"
));
const
name
=
resultSet
.
getString
(
resultSet
.
getColumnIndex
(
"
NAME
"
));
```
```
### getLong
<sup>(deprecated)</sup>
### getLong
getLong(columnIndex: number): number
getLong(columnIndex: number): number
以Long形式获取当前行中指定列的值。
以Long形式获取当前行中指定列的值。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[getLong](#getlong9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**参数:**
**参数:**
...
@@ -933,16 +883,12 @@ getLong(columnIndex: number): number
...
@@ -933,16 +883,12 @@ getLong(columnIndex: number): number
const
age
=
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
AGE
"
));
const
age
=
resultSet
.
getLong
(
resultSet
.
getColumnIndex
(
"
AGE
"
));
```
```
### getDouble
<sup>(deprecated)</sup>
### getDouble
getDouble(columnIndex: number): number
getDouble(columnIndex: number): number
以double形式获取当前行中指定列的值。
以double形式获取当前行中指定列的值。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[getDouble](#getdouble9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**参数:**
**参数:**
...
@@ -963,16 +909,12 @@ getDouble(columnIndex: number): number
...
@@ -963,16 +909,12 @@ getDouble(columnIndex: number): number
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
SALARY
"
));
const
salary
=
resultSet
.
getDouble
(
resultSet
.
getColumnIndex
(
"
SALARY
"
));
```
```
### isColumnNull
<sup>(deprecated)</sup>
### isColumnNull
isColumnNull(columnIndex: number): boolean
isColumnNull(columnIndex: number): boolean
检查当前行中指定列的值是否为null。
检查当前行中指定列的值是否为null。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[isColumnNull](#iscolumnnull9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**参数:**
**参数:**
...
@@ -993,16 +935,12 @@ isColumnNull(columnIndex: number): boolean
...
@@ -993,16 +935,12 @@ isColumnNull(columnIndex: number): boolean
const
isColumnNull
=
resultSet
.
isColumnNull
(
resultSet
.
getColumnIndex
(
"
CODES
"
));
const
isColumnNull
=
resultSet
.
isColumnNull
(
resultSet
.
getColumnIndex
(
"
CODES
"
));
```
```
### close
<sup>(deprecated)</sup>
### close
close(): void
close(): void
关闭结果集。
关闭结果集。
> **说明:**
>
> 从 API Version 7 开始支持,从 API Version 9 开始废弃,建议使用[close](#close9)替代。
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**系统能力:**
SystemCapability.DistributedDataManager.RelationalStore.Core
**示例:**
**示例:**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录