提交 4fb1f654 编写于 作者: W wuyongning

ohos file update

Signed-off-by: Nwuyongning <wuyongning@huawei.com>

 Changes to be committed:
	modified:   zh-cn/application-dev/reference/apis/js-apis-data-distributedobject.md
	modified:   zh-cn/application-dev/reference/apis/js-apis-data-resultset.md
上级 408c03a8
...@@ -11,10 +11,6 @@ import distributedObject from '@ohos.data.distributedDataObject' ...@@ -11,10 +11,6 @@ import distributedObject from '@ohos.data.distributedDataObject'
``` ```
## 系统能力
SystemCapability.DistributedDataManager.DataObject.DistributedObject
## distributedDataObject.createDistributedObject ## distributedDataObject.createDistributedObject
...@@ -22,6 +18,9 @@ createDistributedObject(source: object): DistributedObject ...@@ -22,6 +18,9 @@ createDistributedObject(source: object): DistributedObject
创建一个分布式对象distributedObject,用户可以通过source指定分布式对象中的属性,属性支持基本类型以及复杂类型,返回值是创建好的分布式对象。 创建一个分布式对象distributedObject,用户可以通过source指定分布式对象中的属性,属性支持基本类型以及复杂类型,返回值是创建好的分布式对象。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.DataObject.DistributedObject。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -42,6 +41,7 @@ genSessionId(): string ...@@ -42,6 +41,7 @@ genSessionId(): string
随机创建一个sessionId,返回值是随机创建的sessionId。 随机创建一个sessionId,返回值是随机创建的sessionId。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.DataObject.DistributedObject。
- 返回值: - 返回值:
| 类型 | 说明 | | 类型 | 说明 |
...@@ -64,6 +64,8 @@ setSessionId(sessionId?: string): boolean ...@@ -64,6 +64,8 @@ setSessionId(sessionId?: string): boolean
设置同步的sessionId,当可信组网中有多个设备时,多个设备间的对象如果设置为同一个sessionId,就能自动同步。sessionId是指定的sessionId,如果要退出分布式组网,设置为""或不设置均可。结果以boolean形式返回,true标识设置sessionId成功 设置同步的sessionId,当可信组网中有多个设备时,多个设备间的对象如果设置为同一个sessionId,就能自动同步。sessionId是指定的sessionId,如果要退出分布式组网,设置为""或不设置均可。结果以boolean形式返回,true标识设置sessionId成功
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.DataObject.DistributedObject。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -87,6 +89,7 @@ on(type: 'change', callback: Callback<{ sessionId: string, fields: Array&lt;stri ...@@ -87,6 +89,7 @@ on(type: 'change', callback: Callback<{ sessionId: string, fields: Array&lt;stri
监听分布式对象的变更,type需固定为'change',callback是变更时触发的回调,回调参数sessionId标识变更对象的sessionId,fields标识对象变更的属性名 监听分布式对象的变更,type需固定为'change',callback是变更时触发的回调,回调参数sessionId标识变更对象的sessionId,fields标识对象变更的属性名
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.DataObject.DistributedObject。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
...@@ -117,6 +120,8 @@ off(type: 'change', callback?: Callback<{ sessionId: string, fields: Array&lt;st ...@@ -117,6 +120,8 @@ off(type: 'change', callback?: Callback<{ sessionId: string, fields: Array&lt;st
当不再进行数据变更监听时,使用此接口删除对象的变更监听,type固定为'change',callback为可选参数,若不设置则表示删除该对象所有的变更监听 当不再进行数据变更监听时,使用此接口删除对象的变更监听,type固定为'change',callback为可选参数,若不设置则表示删除该对象所有的变更监听
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.DataObject.DistributedObject。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -146,6 +151,8 @@ on(type: 'status', callback: Callback<{ sessionId: string, networkId: string, st ...@@ -146,6 +151,8 @@ on(type: 'status', callback: Callback<{ sessionId: string, networkId: string, st
监听分布式对象的上下线,type需固定为'status',callback是分布式对象上下线时触发的回调,回调参数sessionId标识变更对象的sessionId,networkId标识对象设备的networkId,status标识对象为'online'(上线)或'offline'(下线)的状态 监听分布式对象的上下线,type需固定为'status',callback是分布式对象上下线时触发的回调,回调参数sessionId标识变更对象的sessionId,networkId标识对象设备的networkId,status标识对象为'online'(上线)或'offline'(下线)的状态
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.DataObject.DistributedObject。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -171,6 +178,7 @@ off(type: 'status', callback?: Callback<{ sessionId: string, deviceId: string, s ...@@ -171,6 +178,7 @@ off(type: 'status', callback?: Callback<{ sessionId: string, deviceId: string, s
当不再进行对象上下线监听时,使用此接口删除对象的上下线监听,type固定为'status',callback为可选参数,若不设置则表示删除该对象所有的上下线监听 当不再进行对象上下线监听时,使用此接口删除对象的上下线监听,type固定为'status',callback为可选参数,若不设置则表示删除该对象所有的上下线监听
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.DataObject.DistributedObject。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** > ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 > 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 系统能力
SystemCapability.DistributedDataManager.RelationalStore.Core
## 使用说明 ## 使用说明
...@@ -31,6 +29,7 @@ promise.then((resultSet) => { ...@@ -31,6 +29,7 @@ promise.then((resultSet) => {
### 属性 ### 属性
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
| 名称 | 参数类型 | 必填 | 说明 | | 名称 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -51,6 +50,8 @@ getColumnIndex(columnName: string): number ...@@ -51,6 +50,8 @@ getColumnIndex(columnName: string): number
根据指定的列名获取列索引。 根据指定的列名获取列索引。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -77,6 +78,8 @@ getColumnName(columnIndex: number): string ...@@ -77,6 +78,8 @@ getColumnName(columnIndex: number): string
根据指定的列索引获取列名。 根据指定的列索引获取列名。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -101,6 +104,8 @@ goTo(offset:number): boolean ...@@ -101,6 +104,8 @@ goTo(offset:number): boolean
向前或向后转至结果集的指定行,相对于其当前位置偏移。 向前或向后转至结果集的指定行,相对于其当前位置偏移。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -127,6 +132,8 @@ goToRow(position: number): boolean ...@@ -127,6 +132,8 @@ goToRow(position: number): boolean
转到结果集的指定行。 转到结果集的指定行。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -154,6 +161,7 @@ goToFirstRow(): boolean ...@@ -154,6 +161,7 @@ goToFirstRow(): boolean
转到结果集的第一行。 转到结果集的第一行。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 返回值: - 返回值:
| 类型 | 说明 | | 类型 | 说明 |
...@@ -176,6 +184,8 @@ goToLastRow(): boolean ...@@ -176,6 +184,8 @@ goToLastRow(): boolean
转到结果集的最后一行。 转到结果集的最后一行。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 返回值: - 返回值:
| 类型 | 说明 | | 类型 | 说明 |
| -------- | -------- | | -------- | -------- |
...@@ -197,6 +207,8 @@ goToNextRow(): boolean ...@@ -197,6 +207,8 @@ goToNextRow(): boolean
转到结果集的下一行。 转到结果集的下一行。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 返回值: - 返回值:
| 类型 | 说明 | | 类型 | 说明 |
| -------- | -------- | | -------- | -------- |
...@@ -218,6 +230,8 @@ goToPreviousRow(): boolean ...@@ -218,6 +230,8 @@ goToPreviousRow(): boolean
转到结果集的上一行。 转到结果集的上一行。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 返回值: - 返回值:
| 类型 | 说明 | | 类型 | 说明 |
| -------- | -------- | | -------- | -------- |
...@@ -239,6 +253,8 @@ getBlob(columnIndex: number): Uint8Array ...@@ -239,6 +253,8 @@ getBlob(columnIndex: number): Uint8Array
以字节数组的形式获取当前行中指定列的值。 以字节数组的形式获取当前行中指定列的值。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -261,6 +277,8 @@ getString(columnIndex: number): string ...@@ -261,6 +277,8 @@ getString(columnIndex: number): string
以字符串形式获取当前行中指定列的值。 以字符串形式获取当前行中指定列的值。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -283,6 +301,8 @@ getLong(columnIndex: number): number ...@@ -283,6 +301,8 @@ getLong(columnIndex: number): number
以Long形式获取当前行中指定列的值。 以Long形式获取当前行中指定列的值。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -305,6 +325,8 @@ getDouble(columnIndex: number): number ...@@ -305,6 +325,8 @@ getDouble(columnIndex: number): number
以double形式获取当前行中指定列的值。 以double形式获取当前行中指定列的值。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -327,6 +349,8 @@ isColumnNull(columnIndex: number): boolean ...@@ -327,6 +349,8 @@ isColumnNull(columnIndex: number): boolean
检查当前行中指定列的值是否为null。 检查当前行中指定列的值是否为null。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 参数: - 参数:
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
...@@ -349,6 +373,7 @@ close(): void ...@@ -349,6 +373,7 @@ close(): void
关闭结果集。 关闭结果集。
**系统能力**:以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
- 示例: - 示例:
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册