提交 bdec4940 编写于 作者: G ge-yafang

update docs

Signed-off-by: Nge-yafang <geyafang@huawei.com>
上级 0368e671
......@@ -35,6 +35,8 @@ Ability框架在API 8及更早版本使用FA模型。FA模型中Ability分为Pag
![fa-threading-nodel](figures/fa-threading-model.png)
## 相关实例
针对Ability开发,有以下相关实例可供参考:
- [`DistributeCalc`:分布式计算器(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/Preset/DistributeCalc)
- [`DistributeGraffti`:分布式涂鸦(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/ability/DistributedGraffiti)
- [分布式调度启动远程FA](https://gitee.com/openharmony/codelabs/tree/master/Distributed/RemoteStartFA)
- [分布式新闻客户端](https://gitee.com/openharmony/codelabs/tree/master/Distributed/NewsDemo)
- [分布式手写板(eTS)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/DistributeDatabaseDrawEts)
......
......@@ -261,4 +261,4 @@ export default {
```
## 相关实例
针对PageAbility开发,有以下相关实例可供参考:
- [`DMS`:分布式Demo(eTS)(API7)](https://gitee.com/openharmony/app_samples/tree/master/ability/DMS)
\ No newline at end of file
- [`DMS`:分布式Demo(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/ability/DMS)
\ No newline at end of file
......@@ -399,4 +399,4 @@ export default {
针对ServiceAbility开发,有以下相关实例可供参考:
- [`ServiceAbility`:ServiceAbility的创建与使用(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/ability/ServiceAbility)
- [`DMS`:分布式Demo(eTS)(API7](https://gitee.com/openharmony/app_samples/tree/master/ability/DMS)
- [`DMS`:分布式Demo(eTS)(API8](https://gitee.com/openharmony/app_samples/tree/master/ability/DMS)
......@@ -89,29 +89,29 @@ Ability类拥有context属性,context属性为AbilityContext类,AbilityConte
onCreate(want, launchParam) {
console.log("MainAbility onCreate")
}
onDestroy() {
console.log("MainAbility onDestroy")
}
onWindowStageCreate(windowStage) {
console.log("MainAbility onWindowStageCreate")
windowStage.loadContent("pages/index").then((data) => {
console.log("MainAbility load content succeed with data: " + JSON.stringify(data))
}).catch((error) => {
console.error("MainAbility load content failed with error: "+ JSON.stringify(error))
})
}
onWindowStageDestroy() {
console.log("MainAbility onWindowStageDestroy")
}
onForeground() {
console.log("MainAbility onForeground")
}
onBackground() {
console.log("MainAbility onBackground")
}
......@@ -273,4 +273,4 @@ export default class MainAbility extends Ability { {
## 相关实例
针对Stage模型Ability开发,有以下相关示例可供参考:
- [`StageCallAbility`:StageAbility的创建与使用(eTS)(API9)](https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility)
- [`StageCallAbility`:StageCallAbility的创建与使用(eTS)(API9)](https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility)
......@@ -244,4 +244,4 @@ try {
## 相关实例
针对Stage模型本地Call功能开发,有以下相关实例可供参考:
- [`StageCallAbility`:StageAbility的创建与使用(eTS)(API9)](https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility)
- [`StageCallAbility`:StageCallAbility的创建与使用(eTS)(API9)](https://gitee.com/openharmony/app_samples/tree/master/ability/StageCallAbility)
......@@ -79,4 +79,4 @@ ExtensionAbility,是Stage模型中新增的扩展组件的基类,一般用
## 相关实例
针对ServiceExtensionAbility开发,有以下相关实例可供参考:
- [`ServiceExtAbility`:StageAbility的创建与使用(eTS)(API9)](https://gitee.com/openharmony/app_samples/tree/master/ability/ServiceExtAbility)
- [`ServiceExtAbility`:StageExtAbility的创建与使用(eTS)(API9)](https://gitee.com/openharmony/app_samples/tree/master/ability/ServiceExtAbility)
......@@ -309,4 +309,5 @@
## 相关实例
针对关系型数据库开发,有以下相关实例可供参考:
- [`Rdb`:关系型数据库(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/data/Rdb)
- [关系型数据库](https://gitee.com/openharmony/codelabs/tree/master/Data/JSRelationshipData)
\ No newline at end of file
- [`DistributedRdb`:分布式关系型数据库(eTS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/data/DistributedRdb)
- [关系型数据库](https://gitee.com/openharmony/codelabs/tree/master/Data/JSRelationshipData)
......@@ -214,4 +214,4 @@
恭喜您已经使用JS语言开发(传统代码方式)完成了第一个OpenHarmony应用,快来[探索更多的OpenHarmony功能](../application-dev-guide.md)吧。
## 相关实例
针对使用JS语言(传统代码方式)开发快速入门,有以下相关实例可供参考:
- [`JsHelloWorld`:你好世界(JS)(API7)](https://gitee.com/openharmony/app_samples/tree/master/common/JsHelloWorld)
\ No newline at end of file
- [`JsHelloWorld`:你好世界(JS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/common/JsHelloWorld)
\ No newline at end of file
# DataAbility 谓词
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
......@@ -19,9 +19,10 @@ createRdbPredicates(name: string, dataAbilityPredicates: DataAbilityPredicates):
从DataAabilityPredicates对象创建RdbPredicates对象。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| name | string | 是 | 数据库表中的表名。 |
......@@ -53,7 +54,7 @@ equalTo(field: string, value: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType且值等于指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -81,7 +82,7 @@ notEqualTo(field: string, value: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType且值不等于指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -109,7 +110,7 @@ beginWrap(): DataAbilityPredicates
向谓词添加左括号。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**返回值:**
| 类型 | 说明 |
......@@ -136,7 +137,7 @@ endWrap(): DataAbilityPredicates
向谓词添加右括号。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**返回值:**
| 类型 | 说明 |
......@@ -163,7 +164,7 @@ or(): DataAbilityPredicates
将或条件添加到谓词中。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**返回值:**
| 类型 | 说明 |
......@@ -187,7 +188,7 @@ and(): DataAbilityPredicates
将和条件添加到谓词中。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**返回值:**
| 类型 | 说明 |
......@@ -211,7 +212,7 @@ contains(field: string, value: string): DataAbilityPredicates
配置谓词以匹配数据类型为string且value包含指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -239,7 +240,7 @@ beginsWith(field: string, value: string): DataAbilityPredicates
配置谓词以匹配数据类型为string且值以指定字符串开头的字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -267,7 +268,7 @@ endsWith(field: string, value: string): DataAbilityPredicates
配置谓词以匹配数据类型为string且值以指定字符串结尾的字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -295,7 +296,7 @@ isNull(field: string): DataAbilityPredicates
配置谓词以匹配值为null的字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -322,7 +323,7 @@ isNotNull(field: string): DataAbilityPredicates
配置谓词以匹配值不为null的指定字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -349,7 +350,7 @@ like(field: string, value: string): DataAbilityPredicates
配置谓词以匹配数据类型为string且值类似于指定字符串的字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -377,7 +378,7 @@ glob(field: string, value: string): DataAbilityPredicates
配置谓词以匹配数据类型为string的指定字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -405,7 +406,7 @@ between(field: string, low: ValueType, high: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType且value在指定范围内的指定字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -434,7 +435,7 @@ notBetween(field: string, low: ValueType, high: ValueType): DataAbilityPredicate
配置谓词以匹配数据类型为ValueType且value超出给定范围的指定字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -463,7 +464,7 @@ greaterThan(field: string, value: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType且值大于指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -491,7 +492,7 @@ lessThan(field: string, value: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为valueType且value小于指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -519,7 +520,7 @@ greaterThanOrEqualTo(field: string, value: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType且value大于或等于指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -547,7 +548,7 @@ lessThanOrEqualTo(field: string, value: ValueType): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType且value小于或等于指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -575,7 +576,7 @@ orderByAsc(field: string): DataAbilityPredicates
配置谓词以匹配其值按升序排序的列。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -602,7 +603,7 @@ orderByDesc(field: string): DataAbilityPredicates
配置谓词以匹配其值按降序排序的列。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -629,7 +630,7 @@ distinct(): DataAbilityPredicates
配置谓词以过滤重复记录并仅保留其中一个。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**返回值:**
| 类型 | 说明 |
......@@ -657,7 +658,7 @@ limitAs(value: number): DataAbilityPredicates
设置最大数据记录数的谓词。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -684,7 +685,7 @@ offsetAs(rowOffset: number): DataAbilityPredicates
配置谓词以指定返回结果的起始位置。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -711,7 +712,7 @@ groupBy(fields: Array&lt;string&gt;): DataAbilityPredicates
配置谓词按指定列分组查询结果。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -763,7 +764,7 @@ in(field: string, value: Array&lt;ValueType&gt;): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType数组且值在给定范围内的指定字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -792,7 +793,7 @@ notIn(field: string, value: Array&lt;ValueType&gt;): DataAbilityPredicates
配置谓词以匹配数据类型为ValueType数组且值不在给定范围内的指定字段。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -816,7 +817,7 @@ notIn(field: string, value: Array&lt;ValueType&gt;): DataAbilityPredicates
用于表示允许的数据字段类型。
**系统能力**SystemCapability.DistributedDataManager.DataShare.Core。
**系统能力:** SystemCapability.DistributedDataManager.DataShare.Core。
| 名称 | 说明 |
| ------- | -------------------- |
......
# 分布式数据对象
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
......@@ -10,8 +10,6 @@
import distributedObject from '@ohos.data.distributedDataObject';
```
## distributedDataObject.createDistributedObject
createDistributedObject(source: object): DistributedObject
......@@ -19,7 +17,7 @@ createDistributedObject(source: object): DistributedObject
创建一个分布式对象。
**系统能力**SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -46,7 +44,7 @@ genSessionId(): string
随机创建一个sessionId。
**系统能力**SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**返回值:**
| 类型 | 说明 |
......@@ -70,7 +68,7 @@ setSessionId(sessionId?: string): boolean
设置同步的sessionId,当可信组网中有多个设备时,多个设备间的对象如果设置为同一个sessionId,就能自动同步。
**系统能力**SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**参数:**
......@@ -103,7 +101,7 @@ on(type: 'change', callback: Callback<{ sessionId: string, fields: Array&lt;stri
监听分布式对象的变更。
**系统能力**SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -132,7 +130,7 @@ off(type: 'change', callback?: Callback<{ sessionId: string, fields: Array&lt;st
当不再进行数据变更监听时,使用此接口删除对象的变更监听。
**系统能力**SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -163,7 +161,7 @@ on(type: 'status', callback: Callback<{ sessionId: string, networkId: string, st
监听分布式对象的上下线。
**系统能力**SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -188,7 +186,7 @@ off(type: 'status', callback?: Callback<{ sessionId: string, deviceId: string, s
当不再进行对象上下线监听时,使用此接口删除对象的上下线监听。
**系统能力**SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**系统能力:** SystemCapability.DistributedDataManager.DataObject.DistributedObject。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......
# 关系型数据库
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
```js
......@@ -17,7 +15,7 @@ getRdbStore(config: StoreConfig, version: number, callback: AsyncCallback&lt;Rdb
获得一个相关的RdbStore,操作关系型数据库,用户可以根据自己的需求配置RdbStore的参数,然后通过RdbStore调用相关接口可以执行相关的数据操作,结果以callback形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
......@@ -44,7 +42,7 @@ getRdbStore(config: StoreConfig, version: number): Promise&lt;RdbStore&gt;
获得一个相关的RdbStore,操作关系型数据库,用户可以根据自己的需求配置RdbStore的参数,然后通过RdbStore调用相关接口可以执行相关的数据操作,结果以Promise形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
......@@ -84,7 +82,7 @@ getRdbStore(context: Context, config: StoreConfig, version: number, callback: As
获得一个相关的RdbStore,操作关系型数据库,用户可以根据自己的需求配置RdbStore的参数,然后通过RdbStore调用相关接口可以执行相关的数据操作,结果以callback形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
......@@ -113,7 +111,7 @@ getRdbStore(context: Context, config: StoreConfig, version: number): Promise&lt;
获得一个相关的RdbStore,操作关系型数据库,用户可以根据自己的需求配置RdbStore的参数,然后通过RdbStore调用相关接口可以执行相关的数据操作,结果以Promise形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
......@@ -153,7 +151,7 @@ deleteRdbStore(name: string, callback: AsyncCallback&lt;void&gt;): void
删除数据库,结果以callback形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -173,7 +171,7 @@ deleteRdbStore(name: string): Promise&lt;void&gt;
使用指定的数据库文件配置删除数据库,结果以Promise形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -201,7 +199,7 @@ deleteRdbStore(context: Context, name: string, callback: AsyncCallback&lt;void&g
删除数据库,结果以callback形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -223,7 +221,7 @@ deleteRdbStore(context: Context, name: string): Promise&lt;void&gt;
使用指定的数据库文件配置删除数据库,结果以Promise形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -259,7 +257,7 @@ constructor(name: string)
构造函数。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -278,7 +276,7 @@ inDevices(devices: Array&lt;string&gt;): RdbPredicates
同步分布式数据库时指定组网内的远程设备。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -303,7 +301,7 @@ inAllDevices(): RdbPredicates
同步分布式数据库时连接到组网内的所有远程设备。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值**
| 类型 | 说明 |
......@@ -323,7 +321,7 @@ equalTo(field: string, value: ValueType): RdbPredicates
配置谓词以匹配数据字段为ValueType且值等于指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -350,7 +348,7 @@ notEqualTo(field: string, value: ValueType): RdbPredicates
配置谓词以匹配数据字段为ValueType且值不等于指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -377,7 +375,7 @@ beginWrap(): RdbPredicates
向谓词添加左括号。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值**
| 类型 | 说明 |
......@@ -403,7 +401,7 @@ endWrap(): RdbPredicates
向谓词添加右括号。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值**
| 类型 | 说明 |
......@@ -429,7 +427,7 @@ or(): RdbPredicates
将或条件添加到谓词中。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值**
| 类型 | 说明 |
......@@ -452,7 +450,7 @@ and(): RdbPredicates
向谓词添加和条件。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值**
| 类型 | 说明 |
......@@ -474,7 +472,7 @@ contains(field: string, value: string): RdbPredicates
配置谓词以匹配数据字段为string且value包含指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -501,7 +499,7 @@ beginsWith(field: string, value: string): RdbPredicates
配置谓词以匹配数据字段为string且值以指定字符串开头的字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -528,7 +526,7 @@ endsWith(field: string, value: string): RdbPredicates
配置谓词以匹配数据字段为string且值以指定字符串结尾的字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -555,7 +553,7 @@ isNull(field: string): RdbPredicates
配置谓词以匹配值为null的字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -581,7 +579,7 @@ isNotNull(field: string): RdbPredicates
配置谓词以匹配值不为null的指定字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -607,7 +605,7 @@ like(field: string, value: string): RdbPredicates
配置谓词以匹配数据字段为string且值类似于指定字符串的字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -634,7 +632,7 @@ glob(field: string, value: string): RdbPredicates
配置RdbPredicates匹配数据字段为string的指定字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -661,7 +659,7 @@ between(field: string, low: ValueType, high: ValueType): RdbPredicates
将谓词配置为匹配数据字段为ValueType且value在给定范围内的指定字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -689,7 +687,7 @@ notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates
配置RdbPredicates以匹配数据字段为ValueType且value超出给定范围的指定字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -716,7 +714,7 @@ greaterThan(field: string, value: ValueType): RdbPredicates
配置谓词以匹配数据字段为ValueType且值大于指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -743,7 +741,7 @@ lessThan(field: string, value: ValueType): RdbPredicates
配置谓词以匹配数据字段为valueType且value小于指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -771,7 +769,7 @@ greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates
配置谓词以匹配数据字段为ValueType且value大于或等于指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -799,7 +797,7 @@ lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates
配置谓词以匹配数据字段为ValueType且value小于或等于指定值的字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -827,7 +825,7 @@ orderByAsc(field: string): RdbPredicates
配置谓词以匹配其值按升序排序的列。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -854,7 +852,7 @@ orderByDesc(field: string): RdbPredicates
配置谓词以匹配其值按降序排序的列。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -880,7 +878,7 @@ distinct(): RdbPredicates
配置谓词以过滤重复记录并仅保留其中一个。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值**
| 类型 | 说明 |
......@@ -908,7 +906,7 @@ limitAs(value: number): RdbPredicates
设置最大数据记录数的谓词。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -934,7 +932,7 @@ offsetAs(rowOffset: number): RdbPredicates
配置RdbPredicates以指定返回结果的起始位置。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -960,7 +958,7 @@ groupBy(fields: Array&lt;string&gt;): RdbPredicates
配置RdbPredicates按指定列分组查询结果。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -985,7 +983,7 @@ indexedBy(field: string): RdbPredicates
配置RdbPredicates以指定索引列。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1012,7 +1010,7 @@ in(field: string, value: Array&lt;ValueType&gt;): RdbPredicates
配置RdbPredicates以匹配数据字段为ValueType数组且值在给定范围内的指定字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1040,7 +1038,7 @@ notIn(field: string, value: Array&lt;ValueType&gt;): RdbPredicates
将RdbPredicates配置为匹配数据字段为ValueType且值超出给定范围的指定字段。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1072,7 +1070,7 @@ insert(name: string, values: ValuesBucket, callback: AsyncCallback&lt;number&gt;
向目标表中插入一行数据,结果以callback形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1101,7 +1099,7 @@ insert(name: string, values: ValuesBucket):Promise&lt;number&gt;
向目标表中插入一行数据,结果以Promise形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1137,7 +1135,7 @@ update(values: ValuesBucket, rdbPredicates: RdbPredicates, callback: AsyncCallba
根据RdbPredicates的指定实例对象更新数据库中的数据,结果以callback形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1167,7 +1165,7 @@ update(values: ValuesBucket, rdbPredicates: RdbPredicates):Promise&lt;number&gt;
根据RdbPredicates的指定实例对象更新数据库中的数据,结果以Promise形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1206,7 +1204,7 @@ delete(rdbPredicates: RdbPredicates, callback: AsyncCallback&lt;number&gt;):void
根据rdbPredicates的指定实例对象从数据库中删除数据,结果以callback形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1230,7 +1228,7 @@ delete(rdbPredicates: RdbPredicates):Promise&lt;number&gt;
根据rdbPredicates的指定实例对象从数据库中删除数据,结果以Promise形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1261,7 +1259,7 @@ query(rdbPredicates: RdbPredicates, columns: Array&lt;string&gt;, callback: Asyn
根据指定条件查询数据库中的数据,结果以callback形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1287,7 +1285,7 @@ query(rdbPredicates: RdbPredicates, columns?: Array&lt;string&gt;):Promise&lt;Re
根据指定条件查询数据库中的数据,结果以Promise形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1320,7 +1318,7 @@ querySql(sql: string, bindArgs: Array&lt;ValueType&gt;, callback: AsyncCallback&
根据指定SQL语句查询数据库中的数据,结果以callback形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1344,7 +1342,7 @@ querySql(sql: string, bindArgs?: Array&lt;ValueType&gt;):Promise&lt;ResultSet&gt
根据指定SQL语句查询数据库中的数据,结果以Promise形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1375,7 +1373,7 @@ executeSql(sql: string, bindArgs: Array&lt;ValueType&gt;, callback: AsyncCallbac
执行包含指定参数但不返回值的SQL语句,结果以callbck形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1398,7 +1396,7 @@ executeSql(sql: string, bindArgs?: Array&lt;ValueType&gt;):Promise&lt;void&gt;
执行包含指定参数但不返回值的SQL语句,结果以Promise形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1427,7 +1425,7 @@ beginTransaction():void
在开始执行SQL语句之前,开始事务。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**示例**
```js
......@@ -1451,7 +1449,7 @@ commit():void
提交已执行的SQL语句。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**示例**
```js
......@@ -1476,7 +1474,7 @@ rollBack():void;
回滚已经执行的SQL语句。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**示例**
```js
......@@ -1505,7 +1503,7 @@ setDistributedTables(tables: Array&lt;string&gt;, callback: AsyncCallback&lt;voi
设置分布式列表,结果以callbck形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1531,7 +1529,7 @@ setDistributedTables(tables: Array&lt;string&gt;, callback: AsyncCallback&lt;voi
设置分布式列表,结果以Promise形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1559,7 +1557,7 @@ obtainDistributedTableName(device: string, table: string, callback: AsyncCallbac
根据本地表名获取指定远程设备的分布式表名。在查询远程设备数据库时,需要使用分布式表名, 结果以callbck形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1586,7 +1584,7 @@ obtainDistributedTableName(device: string, table: string, callback: AsyncCallbac
根据本地表名获取指定远程设备的分布式表名。在查询远程设备数据库时,需要使用分布式表名,结果以Promise形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1615,7 +1613,7 @@ sync(mode: SyncMode, predicates: RdbPredicates, callback: AsyncCallback&lt;Array
在设备之间同步数据, 结果以callbck形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1647,7 +1645,7 @@ sync(mode: SyncMode, predicates: RdbPredicates, callback: AsyncCallback&lt;Array
在设备之间同步数据,结果以Promise形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -1682,7 +1680,7 @@ on(event: 'dataChange', type: SubscribeType, observer: Callback&lt;Array&lt;stri
注册数据库的观察者。当分布式数据库中的数据发生更改时,将调用回调。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
......@@ -1712,7 +1710,7 @@ off(event:'dataChange', type: SubscribeType, observer: Callback&lt;Array&lt;stri
从数据库中删除指定类型的指定观察者, 结果以callbck形式返回。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数**
......@@ -1741,7 +1739,7 @@ off(event:'dataChange', type: SubscribeType, observer: Callback&lt;Array&lt;stri
管理关系数据库配置。
**系统能力**以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
......@@ -1752,7 +1750,7 @@ off(event:'dataChange', type: SubscribeType, observer: Callback&lt;Array&lt;stri
用于表示允许的数据字段类型。
**系统能力**以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
| 名称 | 说明 |
| -------- | -------- |
......@@ -1765,7 +1763,7 @@ off(event:'dataChange', type: SubscribeType, observer: Callback&lt;Array&lt;stri
用于存储键值对。
**系统能力**以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
| 名称 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
......@@ -1776,7 +1774,7 @@ off(event:'dataChange', type: SubscribeType, observer: Callback&lt;Array&lt;stri
指数据库同步模式。
**系统能力**以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
| 名称 | 默认值 | 说明 |
| -------- | ----- |----- |
......@@ -1787,7 +1785,7 @@ off(event:'dataChange', type: SubscribeType, observer: Callback&lt;Array&lt;stri
描述订阅类型。
**系统能力**以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
| 名称 | 默认值 | 说明 |
| -------- | ----- |---- |
......
# 结果集
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
......@@ -25,7 +25,7 @@ promise.then((resultSet) => {
### 属性
**系统能力**以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.RelationalStore.Core。
| 名称 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
......@@ -46,7 +46,7 @@ getColumnIndex(columnName: string): number
根据指定的列名获取列索引。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -74,7 +74,7 @@ getColumnName(columnIndex: number): string
根据指定的列索引获取列名。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -100,7 +100,7 @@ goTo(offset:number): boolean
向前或向后转至结果集的指定行,相对于其当前位置偏移。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -131,7 +131,7 @@ goToRow(position: number): boolean
转到结果集的指定行。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -163,7 +163,7 @@ goToFirstRow(): boolean
转到结果集的第一行。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值:**
| 类型 | 说明 |
......@@ -189,7 +189,7 @@ goToLastRow(): boolean
转到结果集的最后一行。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值:**
| 类型 | 说明 |
......@@ -215,7 +215,7 @@ goToNextRow(): boolean
转到结果集的下一行。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值:**
| 类型 | 说明 |
......@@ -241,7 +241,7 @@ goToPreviousRow(): boolean
转到结果集的上一行。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**返回值:**
| 类型 | 说明 |
......@@ -267,7 +267,7 @@ getBlob(columnIndex: number): Uint8Array
以字节数组的形式获取当前行中指定列的值。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -291,7 +291,7 @@ getString(columnIndex: number): string
以字符串形式获取当前行中指定列的值。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -315,7 +315,7 @@ getLong(columnIndex: number): number
以Long形式获取当前行中指定列的值。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -339,7 +339,7 @@ getDouble(columnIndex: number): number
以double形式获取当前行中指定列的值。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -363,7 +363,7 @@ isColumnNull(columnIndex: number): boolean
检查当前行中指定列的值是否为null。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -387,7 +387,7 @@ close(): void
关闭结果集。
**系统能力**SystemCapability.DistributedDataManager.RelationalStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.RelationalStore.Core。
**示例:**
```js
......
......@@ -3,9 +3,9 @@
轻量级存储为应用提供key-value键值型的文件数据处理能力,支持应用对数据进行轻量级存储及查询。数据存储形式为键值对,键的类型为字符串型,值的存储数据类型包括数字型、字符型、布尔型。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
>
> - 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
......@@ -16,7 +16,7 @@ import dataStorage from '@ohos.data.storage';
## 常量
**系统能力**以下各项对应的系统能力均为SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.Preferences.Core
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
......@@ -28,9 +28,9 @@ import dataStorage from '@ohos.data.storage';
getStorageSync(path: string): Storage
读取指定文件,将数据加载到Storage实例,用于数据操作,此方法为同步方法
读取指定文件,将数据加载到Storage实例,用于数据操作。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -65,9 +65,9 @@ getStorageSync(path: string): Storage
getStorage(path: string, callback: AsyncCallback&lt;Storage&gt;): void
读取指定文件,将数据加载到Storage实例,用于数据操作,使用callback形式返回结果
读取指定文件,将数据加载到Storage实例,用于数据操作,使用callback方式返回结果,此方法为异步方法
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -103,9 +103,9 @@ getStorage(path: string, callback: AsyncCallback&lt;Storage&gt;): void
getStorage(path: string): Promise&lt;Storage&gt;
读取指定文件,将数据加载到Storage实例,用于数据操作,使用Promise方式为异步方法。
读取指定文件,将数据加载到Storage实例,用于数据操作,使用Promise方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -144,9 +144,9 @@ getStorage(path: string): Promise&lt;Storage&gt;
deleteStorageSync(path: string): void
从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,此方法为同步方法
从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -154,7 +154,7 @@ deleteStorageSync(path: string): void
| path | string | 是 | 应用程序内部数据存储路径。 |
**示例:**
```
```js
dataStorage.deleteStorageSync(path + '/mystore')
```
......@@ -163,9 +163,9 @@ deleteStorageSync(path: string): void
deleteStorage(path: string, callback: AsyncCallback&lt;void&gt;): void
从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,使用callback方式为异步方法。
从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,使用callback方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -189,9 +189,9 @@ deleteStorage(path: string, callback: AsyncCallback&lt;void&gt;): void
deleteStorage(path: string): Promise&lt;void&gt;
从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,使用promise方式为异步方法。
从内存中移除指定文件对应的Storage单实例,并删除指定文件及其备份文件、损坏文件。删除指定文件时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题,使用promise方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -220,9 +220,7 @@ removeStorageFromCacheSync(path: string): void
从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。
此方法为同步方法。
**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -239,11 +237,9 @@ removeStorageFromCacheSync(path: string): void
removeStorageFromCache(path: string, callback: AsyncCallback&lt;void&gt;): void
从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。
此方法为异步方法。
从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。使用callback方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -267,11 +263,9 @@ removeStorageFromCache(path: string, callback: AsyncCallback&lt;void&gt;): void
removeStorageFromCache(path: string): Promise&lt;void&gt;
从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。
此方法为异步方法。
从内存中移除指定文件对应的Storage单实例。移除Storage单实例时,应用不允许再使用该实例进行数据操作,否则会出现数据一致性问题。使用Promise方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -305,9 +299,7 @@ getSync(key: string, defValue: ValueType): ValueType
获取键对应的值,如果值为null或者非默认值类型,返回默认数据。
此方法为同步方法。
**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -331,11 +323,9 @@ getSync(key: string, defValue: ValueType): ValueType
get(key: string, defValue: ValueType, callback: AsyncCallback&lt;ValueType&gt;): void
获取键对应的值,如果值为null或者非默认值类型,返回默认数据。
获取键对应的值,如果值为null或者非默认值类型,返回默认数据。使用callback方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -360,11 +350,9 @@ get(key: string, defValue: ValueType, callback: AsyncCallback&lt;ValueType&gt;):
get(key: string, defValue: ValueType): Promise&lt;ValueType&gt;
获取键对应的值,如果值为null或者非默认值类型,返默认数据。
此方法为异步方法。
获取键对应的值,如果值为null或者非默认值类型,返默认数据。使用Promise方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
......@@ -395,9 +383,7 @@ putSync(key: string, value: ValueType): void
首先获取指定文件对应的Storage实例,然后借助Storage API将数据写入Storage实例,通过flush或者flushSync将Storage实例持久化。
此方法为同步方法。
**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -415,11 +401,9 @@ putSync(key: string, value: ValueType): void
put(key: string, value: ValueType, callback: AsyncCallback&lt;void&gt;): void
首先获取指定文件对应的Storage实例,然后借助Storage API将数据写入Storage实例,通过flush或者flushSync将Storage实例持久化。
此方法为异步方法。
首先获取指定文件对应的Storage实例,然后借助Storage API将数据写入Storage实例,通过flush或者flushSync将Storage实例持久化。使用callback方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -444,11 +428,9 @@ put(key: string, value: ValueType, callback: AsyncCallback&lt;void&gt;): void
put(key: string, value: ValueType): Promise&lt;void&gt;
首先获取指定文件对应的Storage实例,然后借助Storage API将数据写入Storage实例,通过flush或者flushSync将Storage实例持久化。
此方法为异步方法。
首先获取指定文件对应的Storage实例,然后借助Storage API将数据写入Storage实例,通过flush或者flushSync将Storage实例持久化。使用Promise方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -478,9 +460,7 @@ hasSync(key: string): boolean
检查存储对象是否包含名为给定key的存储。
此方法为同步方法。
**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -505,11 +485,9 @@ hasSync(key: string): boolean
has(key: string, callback: AsyncCallback&lt;boolean&gt;): boolean
检查存储对象是否包含名为给定key的存储。
此方法为异步方法。
检查存储对象是否包含名为给定key的存储。使用callback方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -540,11 +518,9 @@ has(key: string, callback: AsyncCallback&lt;boolean&gt;): boolean
has(key: string): Promise&lt;boolean&gt;
检查存储对象是否包含名为给定key的存储。
检查存储对象是否包含名为给定key的存储。使用Promise方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -575,9 +551,7 @@ deleteSync(key: string): void
从存储对象中删除名为给定key的存储。
此方法为同步方法。
**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -590,15 +564,13 @@ deleteSync(key: string): void
```
### deletej
### delete
delete(key: string, callback: AsyncCallback&lt;void&gt;): void
从存储对象中删除名为给定key的存储。
此方法为异步方法。
从存储对象中删除名为给定key的存储。使用callback方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -622,11 +594,9 @@ delete(key: string, callback: AsyncCallback&lt;void&gt;): void
delete(key: string): Promise&lt;void&gt;
从存储对象删除名为给定key的存储。
此方法为异步方法。
从存储对象删除名为给定key的存储。使用Promise方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -655,9 +625,7 @@ flushSync(): void
将当前storage对象中的修改保存到当前的storage,并同步存储到文件中。
此方法为同步方法。
**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**示例:**
```js
......@@ -669,11 +637,9 @@ flushSync(): void
flush(callback: AsyncCallback&lt;void&gt;): void
将当前storage对象中的修改保存到当前的storage,并异步存储到文件中。
此方法为异步方法。
将当前storage对象中的修改保存到当前的storage,并异步存储到文件中。使用callback方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -696,11 +662,9 @@ flush(callback: AsyncCallback&lt;void&gt;): void
flush(): Promise&lt;void&gt;
将当前storage对象中的修改保存到当前的storage,并异步存储到文件中。
将当前storage对象中的修改保存到当前的storage,并异步存储到文件中。使用Promise方式返回结果,此方法为异步方法。
此方法为异步方法。
**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**返回值:**
| 类型 | 说明 |
......@@ -724,9 +688,7 @@ clearSync(): void
清除此存储对象中的所有存储。
此方法为同步方法。
**系统能力**:SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**示例:**
```js
......@@ -738,11 +700,9 @@ clearSync(): void
clear(callback: AsyncCallback&lt;void&gt;): void
清除此存储对象中的所有存储。
此方法为异步方法。
清除此存储对象中的所有存储。使用callback方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -765,11 +725,9 @@ clear(callback: AsyncCallback&lt;void&gt;): void
clear(): Promise&lt;void&gt;
清除此存储对象中的所有存储。
此方法为异步方法。
清除此存储对象中的所有存储。使用Promise方式返回结果,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**返回值:**
| 类型 | 说明 |
......@@ -793,7 +751,7 @@ on(type: 'change', callback: Callback&lt;StorageObserver&gt;): void
订阅数据变更者类需要实现StorageObserver接口,订阅的key的值发生变更后,在执行flush/flushSync方法后,callback方法会被回调。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 说明 |
......@@ -818,7 +776,7 @@ off(type: 'change', callback: Callback&lt;StorageObserver&gt;): void
当不再进行订阅数据变更时,使用此接口取消订阅。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
| 参数名 | 类型 | 说明 |
......@@ -837,7 +795,7 @@ off(type: 'change', callback: Callback&lt;StorageObserver&gt;): void
## StorageObserver
**系统能力**以下各项对应的系统能力均为SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** 以下各项对应的系统能力均为SystemCapability.DistributedDataManager.Preferences.Core
| 名称 | 参数类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
......@@ -847,7 +805,7 @@ off(type: 'change', callback: Callback&lt;StorageObserver&gt;): void
用于表示允许的数据字段类型。
**系统能力**SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
| 名称 | 说明 |
| ------- | -------------------- |
......
# 屏幕属性
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
......@@ -14,7 +14,7 @@ import display from '@ohos.display';
用于表示显示设备的状态。
**系统能力**以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 默认值 | 说明 |
| -------- | -------- | -------- |
......@@ -31,7 +31,7 @@ import display from '@ohos.display';
描述display对象的属性。
**系统能力**以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
......@@ -56,7 +56,7 @@ getDefaultDisplay(callback: AsyncCallback&lt;Display&gt;): void
获取当前默认的display对象。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -82,7 +82,7 @@ getDefaultDisplay(): Promise&lt;Display&gt;
获取当前默认的display对象。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**返回值:**
......@@ -107,7 +107,7 @@ getAllDisplay(callback: AsyncCallback&lt;Array&lt;Display&gt;&gt;): void
获取当前所有的display对象。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -133,7 +133,7 @@ getAllDisplay(): Promise&lt;Array&lt;Display&gt;&gt;
获取当前所有的display对象。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**返回值:**
......@@ -158,7 +158,7 @@ on(type: 'add'|'remove'|'change', callback: Callback&lt;number&gt;): void
开启监听。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -182,7 +182,7 @@ off(type: 'add'|'remove'|'change', callback?: Callback&lt;number&gt;): void
关闭监听。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......
......@@ -2,7 +2,7 @@
分布式数据管理为应用程序提供不同设备间数据库的分布式协同能力。通过调用分布式数据各个接口,应用程序可将数据保存到分布式数据库中,并可对分布式数据库中的数据进行增/删/改/查等各项操作。
>![](../../public_sys-resources/icon-note.gif) **说明:**
>**说明:**
>本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
......@@ -19,7 +19,7 @@ createKVManager(config: KVManagerConfig, callback: AsyncCallback&lt;KVManager&gt
创建一个KVManager对象实例,用于管理数据库对象,并通过callback方式返回,此方法为异步方法。
**系统能力**SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -58,7 +58,7 @@ createKVManager(config: KVManagerConfig): Promise&lt;KVManager&gt;
创建一个KVManager对象实例,用于管理数据库对象,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -99,7 +99,7 @@ try {
提供KVManager实例的配置信息,包括调用方的包名和用户信息。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
| 参数名 | 参数类型 | 必填 | 说明 |
| ----- | ------ | ------ | ------ |
......@@ -110,7 +110,7 @@ try {
用户信息。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
| 名称 | 参数类型 | 必填 | 说明 |
| ----- | ------ | ------ | ------ |
......@@ -122,7 +122,7 @@ try {
用户类型。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
| 名称 | 默认值 | 说明 |
| ----- | ------ | ------ |
......@@ -139,7 +139,7 @@ getKVStore&lt;T extends KVStore&gt;(storeId: string, options: Options, callback:
通过指定Options和storeId,创建并获取KVStore数据库,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -183,7 +183,7 @@ getKVStore&lt;T extends KVStore&gt;(storeId: string, options: Options): Promise&
通过指定Options和storeId,创建并获取KVStore数据库,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -230,7 +230,7 @@ closeKVStore(appId: string, storeId: string, kvStore: KVStore, callback: AsyncCa
通过storeId的值关闭指定的KVStore数据库,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -276,7 +276,7 @@ closeKVStore(appId: string, storeId: string, kvStore: KVStore): Promise&lt;void&
通过storeId的值关闭指定的KVStore数据库,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -330,7 +330,7 @@ deleteKVStore(appId: string, storeId: string, callback: AsyncCallback&lt;void&gt
通过storeId的值删除指定的KVStore数据库,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -373,7 +373,7 @@ deleteKVStore(appId: string, storeId: string): Promise&lt;void&gt;
通过storeId的值删除指定的KVStore数据库,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -427,7 +427,7 @@ getAllKVStoreId(appId: string, callback: AsyncCallback&lt;string[]&gt;): void
获取所有通过[getKVStore](#getkvstore)方法创建的且没有调用[deleteKVStore](#deletekvstore8)方法删除的KVStore数据库的storeId,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -457,7 +457,7 @@ getAllKVStoreId(appId: string): Promise&lt;string[]&gt;
获取所有通过[getKVStore](#getkvstore)方法创建的且没有调用[deleteKVStore](#deletekvstore8)方法删除的KVStore数据库的storeId,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -496,7 +496,7 @@ on(event: 'distributedDataServiceDie', deathCallback: Callback&lt;void&gt;): voi
订阅服务状态变更通知,并通过callback方式返回,此方法为同步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -505,7 +505,7 @@ on(event: 'distributedDataServiceDie', deathCallback: Callback&lt;void&gt;): voi
| event | string | 是 | 订阅的事件名,固定为'distributedDataServiceDie',即服务状态变更事件。 |
| deathCallback | Callback&lt;void&gt; | 是 | 回调函数,在设备状态改变时获取通知。 |
**示例**
**示例**
```js
let kvManager;
......@@ -528,7 +528,7 @@ off(event: 'distributedDataServiceDie', deathCallback?: Callback&lt;void&gt;): v
取消订阅服务状态变更通知,并通过callback方式返回,此方法为同步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -538,7 +538,7 @@ off(event: 'distributedDataServiceDie', deathCallback?: Callback&lt;void&gt;): v
| deathCallback | Callback&lt;void&gt; | 否 | 回调函数,取消设备状态改变时获取通知。 |
**示例**
**示例**
```js
let kvManager;
......@@ -558,7 +558,7 @@ try {
用于提供创建数据库的配置信息。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
| 参数名 | 参数类型 | 必填 | 说明 |
| ----- | ------ | ---- | ----------------------- |
......@@ -575,7 +575,7 @@ try {
用于指定创建的数据库类型。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
| 名称 | 默认值 | 说明 |
| --- | ---- | ----------------------- |
......@@ -588,7 +588,7 @@ try {
用于指定创建的数据库的安全级别。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
| 名称 | 默认值 | 说明 |
| --- | ---- | ----------------------- |
......@@ -604,7 +604,7 @@ try {
KVStore常量。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
| 名称 | 默认值 | 说明 |
| --- | ---- | ----------------------- |
......@@ -619,7 +619,7 @@ KVStore常量。
表示数据库模式,可以在创建或打开数据库时创建 Schema 对象并将它们放入 Options 中。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
| 名称 | 类型 | 说明 |
| --- | ---- | ----------------------- |
......@@ -634,13 +634,13 @@ constructor()
用于创建Schema实例的构造函数。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
## FieldNode<sup>8+</sup> ##
表示 Schema 实例的节点,提供定义存储在数据库中的值的方法。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
| 名称 | 类型 | 说明 |
| --- | ---- | ----------------------- |
......@@ -654,7 +654,7 @@ constructor(name: string)
用于创建带有string字段FieldNode实例的构造函数。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -668,7 +668,7 @@ appendChild(child: FieldNode): boolean
向这个 FieldNode 添加一个子节点。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -682,7 +682,7 @@ appendChild(child: FieldNode): boolean
| ------------- | -------------- |
| boolean |如果子节点成功添加到这个FieldNode,则返回 true;否则返回 false。 |
**示例**
**示例**
```js
import ddm from '@ohos.data.distributedData';
......@@ -716,7 +716,7 @@ getCount(): number
获取结果集中的行数。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -724,7 +724,7 @@ getCount(): number
| ------ | -------------- |
| number |返回行数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -749,7 +749,7 @@ getPosition(): number
获取结果集中当前的读取位置。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -757,7 +757,7 @@ getPosition(): number
| ------ | -------------- |
| number |返回当前读取位置。 |
**示例**
**示例**
```js
let kvStore;
......@@ -783,7 +783,7 @@ moveToFirst(): boolean
将读取位置移动到第一行。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -791,7 +791,7 @@ moveToFirst(): boolean
| ------ | -------------- |
| boolean |如果操作成功则返回true,否则返回 false。 |
**示例**
**示例**
```js
let kvStore;
......@@ -817,7 +817,7 @@ moveToLast(): boolean
将读取位置移动到最后一行。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -825,7 +825,7 @@ moveToLast(): boolean
| ------ | -------------- |
| boolean |如果操作成功则返回true,否则返回 false。 |
**示例**
**示例**
```js
let kvStore;
......@@ -851,7 +851,7 @@ moveToNext(): boolean
将读取位置移动到下一行。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -859,7 +859,7 @@ moveToNext(): boolean
| ------ | -------------- |
| boolean |如果操作成功则返回true,否则返回 false。 |
**示例**
**示例**
```js
let kvStore;
......@@ -885,7 +885,7 @@ moveToPrevious(): boolean
将读取位置移动到上一行。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -893,7 +893,7 @@ moveToPrevious(): boolean
| ------ | -------------- |
| boolean |如果操作成功则返回true,否则返回 false。 |
**示例**
**示例**
```js
let kvStore;
......@@ -919,7 +919,7 @@ move(offset: number): boolean
将读取位置移动到当前位置的相对偏移量。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -933,7 +933,7 @@ move(offset: number): boolean
| ------ | -------------- |
| boolean |如果操作成功则返回true,否则返回 false。 |
**示例**
**示例**
```js
let kvStore;
......@@ -959,7 +959,7 @@ moveToPosition(position: number): boolean
将读取位置从 0 移动到绝对位置。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -973,7 +973,7 @@ moveToPosition(position: number): boolean
| ------ | -------------- |
| boolean |如果操作成功则返回true,否则返回 false。 |
**示例**
**示例**
```js
let kvStore;
......@@ -999,7 +999,7 @@ isFirst(): boolean
检查读取位置是否为第一行。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -1007,7 +1007,7 @@ isFirst(): boolean
| ------ | -------------- |
| boolean |如果读取位置是第一行,则返回 true;否则返回 false。 |
**示例**
**示例**
```js
let kvStore;
......@@ -1033,7 +1033,7 @@ isLast(): boolean
检查读取位置是否为最后一行。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -1041,7 +1041,7 @@ isLast(): boolean
| ------ | -------------- |
| boolean |如果读取位置是最后一行,则返回 true;否则返回 false。 |
**示例**
**示例**
```js
let kvStore;
......@@ -1066,7 +1066,7 @@ isBeforeFirst(): boolean
检查读取位置是否在第一行之前。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -1074,7 +1074,7 @@ isBeforeFirst(): boolean
| ------ | -------------- |
| boolean |如果读取位置在第一行之前,则返回 true;否则返回 false。 |
**示例**
**示例**
```js
let kvStore;
......@@ -1100,7 +1100,7 @@ isAfterLast(): boolean
检查读取位置是否在最后一行之后。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -1108,7 +1108,7 @@ isAfterLast(): boolean
| ------ | -------------- |
| boolean |如果读取位置在最后一行之后,则返回 true;否则返回 false。 |
**示例**
**示例**
```js
let kvStore;
......@@ -1134,7 +1134,7 @@ getEntry(): Entry
获取键值对。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -1142,7 +1142,7 @@ getEntry(): Entry
| ------ | ------- |
| [Entry](#entry) |返回键值对。|
**示例**
**示例**
```js
let kvStore;
......@@ -1167,7 +1167,7 @@ try {
使用谓词表示数据库查询,提供创建Query实例、查询数据库中的数据和添加谓词的方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
### constructor<sup>8+</sup> ###
......@@ -1175,7 +1175,7 @@ constructor()
用于创建Schema实例的构造函数。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
### reset<sup>8+</sup> ###
......@@ -1184,7 +1184,7 @@ reset(): Query
公共查询重置。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -1193,7 +1193,7 @@ reset(): Query
| ------ | ------- |
| [Query](#query8) |返回重置的 Query 对象。|
**示例**
**示例**
```js
try {
......@@ -1215,7 +1215,7 @@ equalTo(field: string, value: number|string|boolean): Query
构造一个Query对象来查询具有指定字段的条目,其值等于指定的值。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1230,7 +1230,7 @@ equalTo(field: string, value: number|string|boolean): Query
| ------ | ------- |
| [Query](#query8) |返回重置的 Query 对象。|
**示例**
**示例**
```js
try {
......@@ -1250,7 +1250,7 @@ notEqualTo(field: string, value: number|string|boolean): Query
构造一个Query对象以查询具有指定字段且值不等于指定值的条目。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1265,7 +1265,7 @@ notEqualTo(field: string, value: number|string|boolean): Query
| ------ | ------- |
| [Query](#query8) |返回重置的 Query 对象。|
**示例**
**示例**
```js
try {
......@@ -1285,7 +1285,7 @@ greaterThan(field: string, value: number|string|boolean): Query
构造一个Query对象以查询具有大于指定值的指定字段的条目。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1300,7 +1300,7 @@ greaterThan(field: string, value: number|string|boolean): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1320,7 +1320,7 @@ lessThan(field: string, value: number|string): Query
构造一个Query对象以查询具有小于指定值的指定字段的条目。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1335,7 +1335,7 @@ lessThan(field: string, value: number|string): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1355,7 +1355,7 @@ greaterThanOrEqualTo(field: string, value: number|string): Query
构造一个Query对象以查询具有指定字段且值大于或等于指定值的条目。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1370,7 +1370,7 @@ greaterThanOrEqualTo(field: string, value: number|string): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1390,7 +1390,7 @@ lessThanOrEqualTo(field: string, value: number|string): Query
构造一个Query对象以查询具有指定字段且值小于或等于指定值的条目。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1405,7 +1405,7 @@ lessThanOrEqualTo(field: string, value: number|string): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1426,7 +1426,7 @@ isNull(field: string): Query
构造一个Query对象以查询具有值为null的指定字段的条目。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1440,7 +1440,7 @@ isNull(field: string): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1461,7 +1461,7 @@ inNumber(field: string, valueList: number[]): Query
构造一个Query对象以查询具有指定字段的条目,其值在指定的值列表中。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1476,7 +1476,7 @@ inNumber(field: string, valueList: number[]): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1496,7 +1496,7 @@ inString(field: string, valueList: string[]): Query
构造一个Query对象以查询具有指定字段的条目,其值在指定的字符串值列表中。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1511,7 +1511,7 @@ inString(field: string, valueList: string[]): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1531,7 +1531,7 @@ notInNumber(field: string, valueList: number[]): Query
构造一个Query对象以查询具有指定字段的条目,该字段的值不在指定的值列表中。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1546,7 +1546,7 @@ notInNumber(field: string, valueList: number[]): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1566,7 +1566,7 @@ notInString(field: string, valueList: string[]): Query
构造一个Query对象以查询具有指定字段且值不在指定字符串值列表中的条目。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1581,7 +1581,7 @@ notInString(field: string, valueList: string[]): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1601,7 +1601,7 @@ like(field: string, value: string): Query
构造一个Query对象以查询具有与指定字符串值相似的指定字段的条目。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1616,7 +1616,7 @@ like(field: string, value: string): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1636,7 +1636,7 @@ unlike(field: string, value: string): Query
构造一个Query对象以查询具有与指定字符串值不相似的指定字段的条目。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1651,7 +1651,7 @@ unlike(field: string, value: string): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1671,7 +1671,7 @@ and(): Query
构造一个带有与条件的查询对象。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -1679,7 +1679,7 @@ and(): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1701,7 +1701,7 @@ or(): Query
构造一个带有或条件的Query对象。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -1709,7 +1709,7 @@ or(): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1731,7 +1731,7 @@ orderByAsc(field: string): Query
构造一个Query对象,将查询结果按升序排序。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1745,7 +1745,7 @@ orderByAsc(field: string): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1766,7 +1766,7 @@ orderByDesc(field: string): Query
构造一个Query对象,将查询结果按降序排序。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1780,7 +1780,7 @@ orderByDesc(field: string): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1801,7 +1801,7 @@ limit(total: number, offset: number): Query
构造一个Query对象来指定结果的数量和开始位置。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1816,7 +1816,7 @@ limit(total: number, offset: number): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1837,7 +1837,7 @@ isNotNull(field: string): Query
使用不为空的指定字段创建查询条件。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1851,7 +1851,7 @@ isNotNull(field: string): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1871,7 +1871,7 @@ beginGroup(): Query
创建一个带有左括号的查询条件组。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -1879,7 +1879,7 @@ beginGroup(): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1901,7 +1901,7 @@ endGroup(): Query
创建一个带有右括号的查询条件组。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -1909,7 +1909,7 @@ endGroup(): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1931,7 +1931,7 @@ prefixKey(prefix: string): Query
创建具有指定键前缀的查询条件。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1945,7 +1945,7 @@ prefixKey(prefix: string): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -1966,7 +1966,7 @@ setSuggestIndex(index: string): Query
设置一个指定的索引,将优先用于查询。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -1980,7 +1980,7 @@ setSuggestIndex(index: string): Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -2001,7 +2001,7 @@ deviceId(deviceId:string):Query
添加设备ID作为key的前缀。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2016,7 +2016,7 @@ deviceId(deviceId:string):Query
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -2035,7 +2035,7 @@ getSqlLike():string
获取指定Query对象的查询语句。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -2043,7 +2043,7 @@ getSqlLike():string
| ------ | ------- |
| [Query](#query8) |返回查询对象。|
**示例**
**示例**
```js
try {
......@@ -2060,7 +2060,7 @@ try {
KVStore数据库实例,提供增加数据、删除数据和订阅数据变更、订阅同步完成的方法。在调用KVStore的方法前,需要先通过getKVStore构建一个KVStore实例。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
### put
......@@ -2068,7 +2068,7 @@ put(key: string, value: Uint8Array | string | number | boolean, callback: AsyncC
添加指定类型键值对到数据库,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2078,7 +2078,7 @@ put(key: string, value: Uint8Array | string | number | boolean, callback: AsyncC
| value | Uint8Array \| string \| number \| boolean | 是 |要添加数据的value,支持Uint8Array、number 、 string 、boolean,Uint8Array、string 的长度不大于[MAX_VALUE_LENGTH](#constants)。 |
| callback | AsyncCallback&lt;void&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -2104,7 +2104,7 @@ put(key: string, value: Uint8Array | string | number | boolean): Promise&lt;void
添加指定类型键值对到数据库,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2119,7 +2119,7 @@ put(key: string, value: Uint8Array | string | number | boolean): Promise&lt;void
| ------ | ------- |
| Promise&lt;void&gt; |Promise实例,用于异步处理。|
**示例**
**示例**
```js
let kvStore;
......@@ -2143,7 +2143,7 @@ delete(key: string, callback: AsyncCallback&lt;void&gt;): void
从数据库中删除指定键值的数据,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2152,7 +2152,7 @@ delete(key: string, callback: AsyncCallback&lt;void&gt;): void
| key | string | 是 |要删除数据的key,不能为空且长度不大于[MAX_KEY_LENGTH](#constants)。 |
| callback | AsyncCallback&lt;void&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -2185,7 +2185,7 @@ delete(key: string): Promise&lt;void&gt;
从数据库中删除指定键值的数据,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2199,7 +2199,7 @@ delete(key: string): Promise&lt;void&gt;
| ------ | ------- |
| Promise&lt;void&gt; |Promise实例,用于异步处理。|
**示例**
**示例**
```js
let kvStore;
......@@ -2228,7 +2228,7 @@ on(event: 'dataChange', type: SubscribeType, observer: Callback&lt;ChangeNotific
订阅指定类型的数据变更通知,此方法为同步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2238,7 +2238,7 @@ on(event: 'dataChange', type: SubscribeType, observer: Callback&lt;ChangeNotific
| type |[SubscribeType](#subscribetype) | 是 |表示订阅的类型。 |
| observer |Callback&lt;[ChangeNotification](#changenotification)&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -2254,7 +2254,7 @@ on(event: 'syncComplete', syncCallback: Callback&lt;Array&lt;[string, number]&gt
订阅同步完成事件回调通知,此方法为同步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2263,7 +2263,7 @@ on(event: 'syncComplete', syncCallback: Callback&lt;Array&lt;[string, number]&gt
| event |string | 是 |订阅的事件名,固定为'syncComplete',表示同步完成事件。 |
| syncCallback |Callback&lt;Array&lt;[string, number]&gt;&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -2278,7 +2278,7 @@ off(event:'dataChange', observer?: Callback&lt;ChangeNotification&gt;): void
取消订阅数据变更通知,此方法为同步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2287,7 +2287,7 @@ off(event:'dataChange', observer?: Callback&lt;ChangeNotification&gt;): void
| event |string | 是 |取消订阅的事件名,固定为'dataChange',表示数据变更事件。 |
| observer |Callback&lt;[ChangeNotification](#changenotification)&gt; |否 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -2306,7 +2306,7 @@ putBatch(entries: Entry[], callback: AsyncCallback&lt;void&gt;): void
批量插入键值对到KVStore数据库中,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2315,7 +2315,7 @@ putBatch(entries: Entry[], callback: AsyncCallback&lt;void&gt;): void
| entries |[Entry](#entry)[] | 是 |表示要批量插入的键值对。 |
| callback |Asyncallback&lt;void&gt; |是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -2353,7 +2353,7 @@ putBatch(entries: Entry[]): Promise&lt;void&gt;
批量插入键值对到KVStore数据库中,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2367,7 +2367,7 @@ putBatch(entries: Entry[]): Promise&lt;void&gt;
| ------ | ------- |
| Promise&lt;void&gt; |Promise实例,用于异步处理。|
**示例**
**示例**
```js
let kvStore;
......@@ -2408,7 +2408,7 @@ deleteBatch(keys: string[], callback: AsyncCallback&lt;void&gt;): void
批量删除KVStore数据库中的键值对,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2417,7 +2417,7 @@ deleteBatch(keys: string[], callback: AsyncCallback&lt;void&gt;): void
| keys |string[] | 是 |表示要批量删除的键值对。 |
| callback |AsyncCallback&lt;void&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -2455,7 +2455,7 @@ deleteBatch(keys: string[]): Promise&lt;void&gt;
批量删除KVStore数据库中的键值对,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2469,7 +2469,7 @@ deleteBatch(keys: string[]): Promise&lt;void&gt;
| ------ | ------- |
| Promise&lt;void&gt; |Promise实例,用于异步处理。|
**示例**
**示例**
```js
let kvStore;
......@@ -2511,7 +2511,7 @@ startTransaction(callback: AsyncCallback&lt;void&gt;): void
启动KVStore数据库中的事务,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2519,7 +2519,7 @@ startTransaction(callback: AsyncCallback&lt;void&gt;): void
| ----- | ------ | ---- | ----------------------- |
| callback |AsyncCallback&lt;void&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -2563,7 +2563,7 @@ startTransaction(): Promise&lt;void&gt;
启动KVStore数据库中的事务,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -2571,7 +2571,7 @@ startTransaction(): Promise&lt;void&gt;
| ------ | ------- |
| Promise&lt;void&gt; |Promise实例,用于异步处理。|
**示例**
**示例**
```js
let kvStore;
......@@ -2598,7 +2598,7 @@ commit(callback: AsyncCallback&lt;void&gt;): void
提交KVStore数据库中的事务,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2606,7 +2606,7 @@ commit(callback: AsyncCallback&lt;void&gt;): void
| ----- | ------ | ---- | ----------------------- |
| callback |AsyncCallback&lt;void&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -2630,7 +2630,7 @@ commit(): Promise&lt;void&gt;
提交KVStore数据库中的事务,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -2638,7 +2638,7 @@ commit(): Promise&lt;void&gt;
| ------ | ------- |
| Promise&lt;void&gt; |Promise实例,用于异步处理。|
**示例**
**示例**
```js
let kvStore;
......@@ -2660,7 +2660,7 @@ rollback(callback: AsyncCallback&lt;void&gt;): void
在KVStore数据库中回滚事务,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2668,7 +2668,7 @@ rollback(callback: AsyncCallback&lt;void&gt;): void
| ----- | ------ | ---- | ----------------------- |
| callback |AsyncCallback&lt;void&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -2692,7 +2692,7 @@ rollback(): Promise&lt;void&gt;
在KVStore数据库中回滚事务,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -2700,7 +2700,7 @@ rollback(): Promise&lt;void&gt;
| ------ | ------- |
| Promise&lt;void&gt; |Promise实例,用于异步处理。|
**示例**
**示例**
```js
let kvStore;
......@@ -2722,7 +2722,7 @@ enableSync(enabled: boolean, callback: AsyncCallback&lt;void&gt;): void
设定是否开启同步,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2731,7 +2731,7 @@ enableSync(enabled: boolean, callback: AsyncCallback&lt;void&gt;): void
| enabled |boolean | 是 |指定是否开启同步,ture表示开启同步,false表示不启用同步。 |
| callback |AsyncCallback&lt;void&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -2755,7 +2755,7 @@ enableSync(enabled: boolean): Promise&lt;void&gt;
设定是否开启同步,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2769,7 +2769,7 @@ enableSync(enabled: boolean): Promise&lt;void&gt;
| ------ | ------- |
| Promise&lt;void&gt; |Promise实例,用于异步处理。|
**示例**
**示例**
```js
let kvStore;
......@@ -2791,7 +2791,7 @@ setSyncRange(localLabels: string[], remoteSupportLabels: string[], callback: Asy
设置同步范围标签,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2801,7 +2801,7 @@ setSyncRange(localLabels: string[], remoteSupportLabels: string[], callback: Asy
| remoteSupportLabels |string[] | 是 |表示要同步数据的设备的同步标签。 |
| callback |AsyncCallback&lt;void&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -2823,7 +2823,7 @@ setSyncRange(localLabels: string[], remoteSupportLabels: string[]): Promise&lt;v
设置同步范围标签,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2839,7 +2839,7 @@ setSyncRange(localLabels: string[], remoteSupportLabels: string[]): Promise&lt;v
| ------ | ------- |
| Promise&lt;void&gt; |Promise实例,用于异步处理。|
**示例**
**示例**
```js
let kvStore;
......@@ -2861,7 +2861,7 @@ try {
描述订阅类型。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
| 名称 | 默认值 | 说明 |
| ----- | ------ | ----------------------- |
......@@ -2873,7 +2873,7 @@ try {
数据变更时通知的对象,包括数据插入的数据、更新的数据、删除的数据和设备ID。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
| 名称 | 参数类型 |可读 |可写 | 说明 |
| ----- | ------- | -----| ------|------------------------ |
......@@ -2886,7 +2886,7 @@ try {
存储在数据库中的键值对。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
| 名称 | 参数类型 |可读 |可写 | 说明 |
| ----- | ------- | -----| ------|------------------------ |
......@@ -2898,7 +2898,7 @@ try {
存储在数据库中的对象。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
| 名称 | 参数类型 |可读 |可写 | 说明 |
| ----- | ------- | -----| ------|------------------------ |
......@@ -2911,7 +2911,7 @@ try {
只能被内部应用使用。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
| 名称 | 默认值 | 说明 |
| ----- | ------ | ----------------------- |
......@@ -2926,7 +2926,7 @@ try {
单版本分布式数据库,继承自KVStore,提供查询数据和同步数据的方法。在调用 SingleKVStore 的方法前,需要先通过 [getKVStore](#getkvstore) 构建一个 SingleKVStore 实例。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
### get
......@@ -2934,7 +2934,7 @@ get(key: string, callback: AsyncCallback&lt;Uint8Array | string | boolean | numb
获取指定键的值,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2943,7 +2943,7 @@ get(key: string, callback: AsyncCallback&lt;Uint8Array | string | boolean | numb
| key |string | 是 |要查询数据的key,不能为空且长度不大于[MAX_KEY_LENGTH](#constants)。 |
| callback |AsyncCallback&lt;Uint8Array \| string \| boolean \| number&gt;) | 是 |回调函数,获取查询的值。 |
**示例**
**示例**
```js
let kvStore;
......@@ -2972,7 +2972,7 @@ get(key: string): Promise&lt;Uint8Array | string | boolean | number&gt;
获取指定键的值,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -2987,7 +2987,7 @@ get(key: string): Promise&lt;Uint8Array | string | boolean | number&gt;
| ------ | ------- |
|Promise&lt;Uint8Array \| string \| boolean \| number&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -3015,7 +3015,7 @@ getEntries(keyPrefix: string, callback: AsyncCallback&lt;Entry[]&gt;): void
获取匹配指定键前缀的所有键值对,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3024,7 +3024,7 @@ getEntries(keyPrefix: string, callback: AsyncCallback&lt;Entry[]&gt;): void
| keyPrefix |string | 是 |表示要匹配的键前缀。 |
| callback |AsyncCallback&lt;[Entry](#entry)[]&gt; | 是 |回调函数,获取指定前缀的键值对列表。 |
**示例**
**示例**
```js
let kvStore;
......@@ -3061,7 +3061,7 @@ getEntries(keyPrefix: string): Promise&lt;Entry[]&gt;
获取匹配指定键前缀的所有键值对,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3075,7 +3075,7 @@ getEntries(keyPrefix: string): Promise&lt;Entry[]&gt;
| ------ | ------- |
|Promise&lt;[Entry](#entry)[]&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -3119,7 +3119,7 @@ getEntries(query: Query, callback: AsyncCallback&lt;Entry[]&gt;): void
获取与指定 Query 对象匹配的键值对列表,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3128,7 +3128,7 @@ getEntries(query: Query, callback: AsyncCallback&lt;Entry[]&gt;): void
| query |[Query](#query8) | 是 |表示要匹配的键前缀。 |
| callback |AsyncCallback&lt;[Entry](#entry)[]&gt; | 是 |回调函数,获取指定前缀的键值对列表。 |
**示例**
**示例**
```js
let kvStore;
......@@ -3170,7 +3170,7 @@ getEntries(query: Query): Promise&lt;Entry[]&gt;
获取匹配指定键前缀的所有键值对,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core
**参数:**
......@@ -3184,7 +3184,7 @@ getEntries(query: Query): Promise&lt;Entry[]&gt;
| ------ | ------- |
|Promise&lt;[Entry](#entry)[]&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
try {
......@@ -3227,7 +3227,7 @@ getResultSet(keyPrefix: string, callback: AsyncCallback&lt;KvStoreResultSet&gt;)
从 KvStore 数据库中获取具有指定前缀的结果集,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3236,7 +3236,7 @@ getResultSet(keyPrefix: string, callback: AsyncCallback&lt;KvStoreResultSet&gt;)
| keyPrefix |string | 是 |表示要匹配的键前缀。 |
| callback |AsyncCallback&lt;[KvStoreResultSet](#kvstoreresultset8)&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -3276,7 +3276,7 @@ getResultSet(keyPrefix: string): Promise&lt;KvStoreResultSet&gt;
从 KVStore 数据库中获取具有指定前缀的结果集,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3290,7 +3290,7 @@ getResultSet(keyPrefix: string): Promise&lt;KvStoreResultSet&gt;
| ------ | ------- |
|Promise&lt;[KvStoreResultSet](#kvstoreresultset8)&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -3336,7 +3336,7 @@ getResultSet(query: Query, callback: AsyncCallback&lt;KvStoreResultSet&gt;): voi
获取与指定 Query 对象匹配的 KvStoreResultSet 对象,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3345,7 +3345,7 @@ getResultSet(query: Query, callback: AsyncCallback&lt;KvStoreResultSet&gt;): voi
| query |Query | 是 |表示查询对象。 |
| callback |AsyncCallback&lt;[KvStoreResultSet](#kvstoreresultset8)&gt; | 是 |回调函数,获取与指定 Query 对象匹配的 KvStoreResultSet 对象。 |
**示例**
**示例**
```js
let kvStore;
......@@ -3384,7 +3384,7 @@ getResultSet(query: Query): Promise&lt;KvStoreResultSet&gt;
获取与指定 Query 对象匹配的 KvStoreResultSet 对象,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3398,7 +3398,7 @@ getResultSet(query: Query): Promise&lt;KvStoreResultSet&gt;
| ------ | ------- |
|Promise&lt;[KvStoreResultSet](#kvstoreresultset8)&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -3440,7 +3440,7 @@ closeResultSet(resultSet: KvStoreResultSet, callback: AsyncCallback&lt;void&gt;)
关闭由 getResultSet 返回的 KvStoreResultSet 对象,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3449,7 +3449,7 @@ closeResultSet(resultSet: KvStoreResultSet, callback: AsyncCallback&lt;void&gt;)
| resultSet |[KvStoreResultSet](#kvstoreresultset8) | 是 |表示要关闭的 KvStoreResultSet 对象。 |
| callback |AsyncCallback&lt;void&gt; | 是 |回调函数,获取由 getResultSet 返回的 KvStoreResultSet 对象。 |
**示例**
**示例**
```js
let kvStore;
......@@ -3474,7 +3474,7 @@ closeResultSet(resultSet: KvStoreResultSet): Promise&lt;void&gt;
关闭由 getResultSet 返回的 KvStoreResultSet 对象,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3488,7 +3488,7 @@ closeResultSet(resultSet: KvStoreResultSet): Promise&lt;void&gt;
| ------ | ------- |
|Promise&lt;void&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -3511,7 +3511,7 @@ getResultSize(query: Query, callback: AsyncCallback&lt;number&gt;): void
获取与指定 Query 对象匹配的结果数,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3520,7 +3520,7 @@ getResultSize(query: Query, callback: AsyncCallback&lt;number&gt;): void
| query |[Query](#query8) | 是 |表示查询对象。 |
| callback |AsyncCallback&lt;number&gt; | 是 |回调函数,获取与指定 Query 对象匹配的结果数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -3557,7 +3557,7 @@ getResultSize(query: Query): Promise&lt;number&gt;
获取与指定 Query 对象匹配的结果数,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3571,7 +3571,7 @@ getResultSize(query: Query): Promise&lt;number&gt;
| ------ | ------- |
|Promise&lt;number&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -3612,7 +3612,7 @@ removeDeviceData(deviceId: string, callback: AsyncCallback&lt;void&gt;): void
删除指定设备的数据,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3621,7 +3621,7 @@ removeDeviceData(deviceId: string, callback: AsyncCallback&lt;void&gt;): void
| deviceId |string | 是 |表示要删除设备的名称。 |
| callback |AsyncCallback&lt;void&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -3654,7 +3654,7 @@ removeDeviceData(deviceId: string): Promise&lt;void&gt;
删除指定设备的数据,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3668,7 +3668,7 @@ removeDeviceData(deviceId: string): Promise&lt;void&gt;
| ------ | ------- |
|Promise&lt;void&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -3703,7 +3703,7 @@ on(event: 'syncComplete', syncCallback: Callback&lt;Array&lt;[string, number]&gt
订阅同步完成事件回调通知,此方法为同步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3712,7 +3712,7 @@ on(event: 'syncComplete', syncCallback: Callback&lt;Array&lt;[string, number]&gt
| event |string | 是 |订阅的事件名,固定为'syncComplete',表示同步完成事件。 |
| syncCallback |Callback&lt;Array&lt;[string, number]&gt;&gt; | 是 |用于向调用方发送同步结果的回调。 |
**示例**
**示例**
```js
let kvStore;
......@@ -3739,7 +3739,7 @@ off(event: 'syncComplete', syncCallback?: Callback&lt;Array&lt;[string, number]&
取消订阅同步完成事件回调通知,此方法为同步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3748,7 +3748,7 @@ off(event: 'syncComplete', syncCallback?: Callback&lt;Array&lt;[string, number]&
| event |string | 是 |取消订阅的事件名,固定为'syncComplete',表示同步完成事件。 |
| syncCallback |Callback&lt;Array&lt;[string, number]&gt;&gt; | 否 |用于向调用方发送同步结果的回调。 |
**示例**
**示例**
```js
let kvStore;
......@@ -3772,7 +3772,7 @@ sync(deviceIdList: string[], mode: SyncMode, allowedDelayMs?: number): void
**需要权限**: ohos.permission.DISTRIBUTED_DATASYNC。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3795,7 +3795,7 @@ setSyncParam(defaultAllowedDelayMs: number, callback: AsyncCallback&lt;void&gt;)
设置允许数据库同步的默认延迟,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3804,7 +3804,7 @@ setSyncParam(defaultAllowedDelayMs: number, callback: AsyncCallback&lt;void&gt;)
| defaultAllowedDelayMs |number | 是 |表示数据库同步允许的默认延迟,以毫秒为单位。 |
| callback |AsyncCallback&lt;void&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -3825,7 +3825,7 @@ setSyncParam(defaultAllowedDelayMs: number): Promise&lt;void&gt;
设置允许数据库同步的默认延迟,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3840,7 +3840,7 @@ setSyncParam(defaultAllowedDelayMs: number): Promise&lt;void&gt;
| ------ | ------- |
|Promise&lt;void&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -3863,7 +3863,7 @@ getSecurityLevel(callback: AsyncCallback&lt;SecurityLevel&gt;): void
获取数据库的安全级别,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -3871,7 +3871,7 @@ getSecurityLevel(callback: AsyncCallback&lt;SecurityLevel&gt;): void
| ----- | ------ | ---- | ----------------------- |
| callback |AsyncCallback&lt;[SecurityLevel](#securitylevel)&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -3891,7 +3891,7 @@ getSecurityLevel(): Promise&lt;SecurityLevel&gt;
获取数据库的安全级别,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**返回值:**
......@@ -3899,7 +3899,7 @@ getSecurityLevel(): Promise&lt;SecurityLevel&gt;
| ------ | ------- |
|Promise&lt;[SecurityLevel](#securitylevel)&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -3919,7 +3919,7 @@ try {
在分布式系统中按设备管理分布式数据,继承自KVStore,提供查询数据和同步数据的方法。在调用DeviceKVStore的方法前,需要先通过[getKVStore](#getkvstore)构建一个DeviceKVStore实例。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
### get<sup>8+</sup> ###
......@@ -3927,7 +3927,7 @@ get(deviceId: string, key: string, callback: AsyncCallback&lt;boolean|string|num
获取与指定设备 ID 和 key 匹配的 String 值,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -3937,7 +3937,7 @@ get(deviceId: string, key: string, callback: AsyncCallback&lt;boolean|string|num
| key |string | 是 |表示要查询 key 值的键。 |
| callback |AsyncCallback&lt;boolean\|string\|number\|Uint8Array&gt; | 是 |回调函数,返回匹配给定条件的字符串值。 |
**示例**
**示例**
```js
let kvStore;
......@@ -3962,7 +3962,7 @@ get(deviceId: string, key: string): Promise&lt;boolean|string|number|Uint8Array&
获取与指定设备 ID 和 key 匹配的 String 值,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -3977,7 +3977,7 @@ get(deviceId: string, key: string): Promise&lt;boolean|string|number|Uint8Array&
| ------ | ------- |
|Promise&lt;boolean\|string\|number\|Uint8Array&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -4006,7 +4006,7 @@ getEntries(deviceId: string, keyPrefix: string, callback: AsyncCallback&lt;Entry
获取与指定设备 ID 和 key 前缀匹配的所有键值对,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4016,7 +4016,7 @@ getEntries(deviceId: string, keyPrefix: string, callback: AsyncCallback&lt;Entry
| keyPrefix |string | 是 |表示要匹配的键前缀。 |
| callback |AsyncCallback&lt;[Entry](#entry)[]&gt; | 是 |回调函数,返回满足给定条件的所有键值对的列表。 |
**示例**
**示例**
```js
let kvStore;
......@@ -4054,7 +4054,7 @@ getEntries(deviceId: string, keyPrefix: string): Promise&lt;Entry[]&gt;
获取与指定设备 ID 和 key 前缀匹配的所有键值对,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4069,7 +4069,7 @@ getEntries(deviceId: string, keyPrefix: string): Promise&lt;Entry[]&gt;
| ------ | ------- |
|Promise&lt;[Entry](#entry)[]&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -4113,7 +4113,7 @@ getEntries(query: Query, callback: AsyncCallback&lt;Entry[]&gt;): void
获取与指定 Query 对象匹配的键值对列表,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4122,7 +4122,7 @@ getEntries(query: Query, callback: AsyncCallback&lt;Entry[]&gt;): void
| query |[Query](#query8) | 是 |表示查询对象。 |
| callback |AsyncCallback&lt;[Entry](#entry)[]&gt; | 是 |回调函数,返回与指定 Query 对象匹配的键值对列表。 |
**示例**
**示例**
```js
let kvStore;
......@@ -4166,7 +4166,7 @@ getEntries(query: Query): Promise&lt;Entry[]&gt;
获取与指定 Query 对象匹配的键值对列表,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4180,7 +4180,7 @@ getEntries(query: Query): Promise&lt;Entry[]&gt;
| ------ | ------- |
|Promise&lt;[Entry](#entry)[]&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -4224,7 +4224,7 @@ getEntries(deviceId: string, query: Query, callback: AsyncCallback&lt;Entry[]&gt
获取与指定设备 ID 和 Query 对象匹配的键值对列表,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4234,7 +4234,7 @@ getEntries(deviceId: string, query: Query, callback: AsyncCallback&lt;Entry[]&gt
| query |[Query](#query8) | 是 |表示查询对象。 |
| callback |AsyncCallback&lt;[Entry](#entry)[]&gt; | 是 |回调函数,返回与指定 Query 对象匹配的键值对列表。 |
**示例**
**示例**
```js
let kvStore;
......@@ -4278,7 +4278,7 @@ getEntries(deviceId: string, query: Query): Promise&lt;Entry[]&gt;
获取与指定设备 ID 和 Query 对象匹配的键值对列表,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4293,7 +4293,7 @@ getEntries(deviceId: string, query: Query): Promise&lt;Entry[]&gt;
| ------ | ------- |
|Promise&lt;[Entry](#entry)[]&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -4338,7 +4338,7 @@ getResultSet(deviceId: string, keyPrefix: string, callback: AsyncCallback&lt;KvS
获取与指定设备 ID 和 key 前缀匹配的 KvStoreResultSet 对象,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4348,7 +4348,7 @@ getResultSet(deviceId: string, keyPrefix: string, callback: AsyncCallback&lt;KvS
| keyPrefix |string | 是 |表示要匹配的键前缀。 |
| callback |AsyncCallback&lt;[KvStoreResultSet](#kvstoreresultset8)[]&gt; | 是 |回调函数,返回 KvStoreResultSet 对象。 |
**示例**
**示例**
```js
let kvStore;
......@@ -4373,7 +4373,7 @@ getResultSet(deviceId: string, keyPrefix: string): Promise&lt;KvStoreResultSet&g
获取与指定设备 ID 和 key 前缀匹配的 KvStoreResultSet 对象,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4388,7 +4388,7 @@ getResultSet(deviceId: string, keyPrefix: string): Promise&lt;KvStoreResultSet&g
| ------ | ------- |
|Promise&lt;[KvStoreResultSet](#kvstoreresultset8)[]&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -4417,7 +4417,7 @@ getResultSet(query: Query, callback: AsyncCallback&lt;KvStoreResultSet&gt;): voi
获取与指定 Query 对象匹配的 KvStoreResultSet 对象,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4426,7 +4426,7 @@ getResultSet(query: Query, callback: AsyncCallback&lt;KvStoreResultSet&gt;): voi
| query |[Query](#query8) | 是 |表示查询对象。 |
| callback |AsyncCallback&lt;[KvStoreResultSet](#kvstoreresultset8)[]&gt; | 是 |回调函数,返回与指定 Query 对象匹配的 KvStoreResultSet 对象。 |
**示例**
**示例**
```js
let kvStore;
......@@ -4469,7 +4469,7 @@ getResultSet(query: Query): Promise&lt;KvStoreResultSet&gt;
获取与指定 Query 对象匹配的 KvStoreResultSet 对象,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4483,7 +4483,7 @@ getResultSet(query: Query): Promise&lt;KvStoreResultSet&gt;
| ------ | ------- |
|Promise&lt;[KvStoreResultSet](#kvstoreresultset8)[]&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -4533,7 +4533,7 @@ getResultSet(deviceId: string, query: Query, callback: AsyncCallback&lt;KvStoreR
获取与指定设备ID和Query对象匹配的KvStoreResultSet对象,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4543,7 +4543,7 @@ getResultSet(deviceId: string, query: Query, callback: AsyncCallback&lt;KvStoreR
| query |[Query](#query8) | 是 |表示查询对象。 |
| callback |AsyncCallback&lt;[KvStoreResultSet](#kvstoreresultset8)[]&gt; | 是 |回调函数,返回与指定 Query 对象匹配的 KvStoreResultSet 对象。 |
**示例**
**示例**
```js
let kvStore;
......@@ -4585,7 +4585,7 @@ getResultSet(deviceId: string, query: Query): Promise&lt;KvStoreResultSet&gt;
获取与指定设备ID和Query对象匹配的KvStoreResultSet对象,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4600,7 +4600,7 @@ getResultSet(deviceId: string, query: Query): Promise&lt;KvStoreResultSet&gt;
| ------ | ------- |
|Promise&lt;[KvStoreResultSet](#kvstoreresultset8)[]&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -4651,7 +4651,7 @@ closeResultSet(resultSet: KvStoreResultSet, callback: AsyncCallback&lt;void&gt;)
关闭由 getResultSet 返回的 KvStoreResultSet 对象,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4660,7 +4660,7 @@ closeResultSet(resultSet: KvStoreResultSet, callback: AsyncCallback&lt;void&gt;)
| resultSet |[KvStoreResultSet](#getresultset8) | 是 |指示要关闭的 KvStoreResultSet 对象。 |
| callback |AsyncCallback&lt;void&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -4686,7 +4686,7 @@ closeResultSet(resultSet: KvStoreResultSet): Promise&lt;void&gt;
关闭由 getResultSet 返回的 KvStoreResultSet 对象,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4700,7 +4700,7 @@ closeResultSet(resultSet: KvStoreResultSet): Promise&lt;void&gt;
| ------ | ------- |
|Promise&lt;void&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -4724,7 +4724,7 @@ getResultSize(query: Query, callback: AsyncCallback&lt;number&gt;): void
获取与指定 Query 对象匹配的结果数,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4733,7 +4733,7 @@ getResultSize(query: Query, callback: AsyncCallback&lt;number&gt;): void
| query |[Query](#query8) | 是 |表示查询对象。 |
| callback |AsyncCallback&lt;number&gt; | 是 |回调函数,返回与指定 Query 对象匹配的结果数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -4771,7 +4771,7 @@ getResultSize(query: Query): Promise&lt;number&gt;
获取与指定 Query 对象匹配的结果数,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4785,7 +4785,7 @@ getResultSize(query: Query): Promise&lt;number&gt;
| ------ | ------- |
|Promise&lt;number&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -4827,7 +4827,7 @@ getResultSize(deviceId: string, query: Query, callback: AsyncCallback&lt;number&
获取与指定设备 ID 和 Query 对象匹配的结果数,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4837,7 +4837,7 @@ getResultSize(deviceId: string, query: Query, callback: AsyncCallback&lt;number&
| query |[Query](#query8) | 是 |表示查询对象。 |
| callback |AsyncCallback&lt;number&gt; | 是 |回调函数,返回与指定 Query 对象匹配的结果数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -4874,7 +4874,7 @@ getResultSize(deviceId: string, query: Query): Promise&lt;number&gt;
获取与指定设备 ID 和 Query 对象匹配的结果数,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4889,7 +4889,7 @@ getResultSize(deviceId: string, query: Query): Promise&lt;number&gt;
| ------ | ------- |
|Promise&lt;number&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -4930,7 +4930,7 @@ removeDeviceData(deviceId: string, callback: AsyncCallback&lt;void&gt;): void
从当前数据库中删除指定设备的数据,并通过callback方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4939,7 +4939,7 @@ removeDeviceData(deviceId: string, callback: AsyncCallback&lt;void&gt;): void
| deviceId |string | 是 |标识要删除其数据的设备。 |
| callback |AsyncCallback&lt;void&gt; | 是 |回调函数。 |
**示例**
**示例**
```js
let kvStore;
......@@ -4972,7 +4972,7 @@ removeDeviceData(deviceId: string): Promise&lt;void&gt;
从当前数据库中删除指定设备的数据,并通过Promise方式返回,此方法为异步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.DistributedKVStore。
**参数:**
......@@ -4986,7 +4986,7 @@ removeDeviceData(deviceId: string): Promise&lt;void&gt;
| ------ | ------- |
|Promise&lt;void&gt; |Promise实例,用于获取异步返回结果。|
**示例**
**示例**
```js
let kvStore;
......@@ -5023,7 +5023,7 @@ sync(deviceIdList: string[], mode: SyncMode, allowedDelayMs?: number): void
**需要权限**: ohos.permission.DISTRIBUTED_DATASYNC。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -5033,7 +5033,7 @@ sync(deviceIdList: string[], mode: SyncMode, allowedDelayMs?: number): void
| mode |[SyncMode](#syncmode) | 是 |表示同步方式,PUSH、PULL或PUSH_PULL。 |
| allowedDelayMs |number | 否 |可选参数,允许延时时间,单位:ms(毫秒)。 |
**示例**
**示例**
```js
let kvStore;
......@@ -5060,7 +5060,7 @@ on(event: 'syncComplete', syncCallback: Callback&lt;Array&lt;[string, number]&gt
订阅同步完成事件回调通知,该方法为同步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -5069,7 +5069,7 @@ on(event: 'syncComplete', syncCallback: Callback&lt;Array&lt;[string, number]&gt
| event |string | 是 |订阅的事件名,固定为'syncComplete',表示同步完成事件。 |
| syncCallback |Callback<Array&lt;[string, number]&gt;> | 是 |用于向调用方发送同步结果的回调。 |
**示例**
**示例**
```js
const KEY_TEST_FLOAT_ELEMENT = 'key_test_float';
......@@ -5095,7 +5095,7 @@ off(event: 'syncComplete', syncCallback?: Callback&lt;Array&lt;[string, number]&
取消订阅同步完成事件回调通知,该方法为同步方法。
**系统能力** SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** SystemCapability.DistributedDataManager.KVStore.Core。
**参数:**
......@@ -5104,7 +5104,7 @@ off(event: 'syncComplete', syncCallback?: Callback&lt;Array&lt;[string, number]&
| event |string | 是 |取消订阅的事件名,固定为'syncComplete',表示同步完成事件。 |
| syncCallback |Callback<Array&lt;[string, number]&gt;&gt; | 否 |用于向调用方发送同步结果的回调。 |
**示例**
**示例**
```js
let kvStore;
......@@ -5124,7 +5124,7 @@ try {
用于指定同步模式。
**系统能力**以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.DistributedDataManager.KVStore.Core。
| 名称 | 默认值 | 说明 |
| ----- | ------ | ----------------------- |
......
# 屏幕截图
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
......@@ -13,7 +13,7 @@ import screenshot from '@ohos.screenshot';
设置截取图像的信息。
**系统能力**以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。
| 参数名 | 类型 | 必填 | 说明 |
......@@ -27,7 +27,7 @@ import screenshot from '@ohos.screenshot';
表示截取图像的区域。
**系统能力**以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | ------------------------------------------------------------ |
......@@ -41,7 +41,7 @@ import screenshot from '@ohos.screenshot';
表示截取图像的大小。
**系统能力**以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.WindowManager.WindowManager.Core。
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | ------------------------------------------------------------ |
......@@ -54,7 +54,7 @@ save(options?: ScreenshotOptions, callback: AsyncCallback&lt;image.PixelMap&gt;)
获取屏幕截图。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**需要权限**:ohos.permission.CAPTURE_SCREEN
......@@ -94,15 +94,15 @@ save(options?: ScreenshotOptions): Promise&lt;image.PixelMap&gt;
获取屏幕截图。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**需要权限**:ohos.permission.CAPTURE_SCREEN
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
| options | [ScreenshotOptions](#screenshotoptions) | 否 | 该类型的参数包含screenRect,imageSize,rotation三个参数,需要分别设置这三个参数。 |
| 参数名 | 类型 | 必填 | 说明 |
| ------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
| options | [ScreenshotOptions](#screenshotoptions) | 否 | 该类型的参数包含screenRect、imageSize、rotation三个参数,需要分别设置这三个参数。 |
**返回值:**
......
# 数据存储
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
>
> - 从API Version 6开始,该模块不再维护,可以使用模块[`@ohos.data.storage`](js-apis-data-storage.md)。
>
......@@ -21,7 +21,7 @@ get(Object): void
通过索引读取缓存中存储的值。
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
......@@ -61,7 +61,7 @@ set(Object): void
修改缓存中索引对应的值。
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
......@@ -99,7 +99,7 @@ clear(Object): void
清空缓存中存储的键值对。
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
......@@ -133,7 +133,7 @@ delete(Object): void
删除缓存中索引对应的键值对。
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**系统能力:** SystemCapability.DistributedDataManager.Preferences.Core
**参数:**
......
# USB管理
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
## 导入模块
......@@ -15,9 +15,10 @@ getDevices(): Array&lt;Readonly&lt;USBDevice&gt;&gt;
获取USB设备列表。
**系统能力**: SystemCapability.USB.USBManager
**系统能力:** SystemCapability.USB.USBManager
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| Array&lt;Readonly&lt;[USBDevice](#usbdevice)&gt;&gt; | 设备信息列表。 |
......@@ -87,7 +88,7 @@ connectDevice(device: USBDevice): Readonly&lt;USBDevicePipe&gt;
需要调用[usb.getDevices](#usbgetdevices)获取设备信息以及device;再调用[usb.requestRight](#usbrequestright)获取设备请求权限。
**系统能力**: SystemCapability.USB.USBManager
**系统能力:** SystemCapability.USB.USBManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -112,7 +113,7 @@ hasRight(deviceName: string): boolean
判断是否有权访问该设备。
**系统能力**: SystemCapability.USB.USBManager
**系统能力:** SystemCapability.USB.USBManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -138,7 +139,7 @@ requestRight(deviceName: string): Promise&lt;boolean&gt;
请求软件包的临时权限以访问设备。
**系统能力**: SystemCapability.USB.USBManager
**系统能力:** SystemCapability.USB.USBManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -167,7 +168,7 @@ claimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): numbe
需要调用[usb.getDevices](#usbgetdevices)获取设备信息以及interfaces;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)接口得到devicepipe作为参数。
**系统能力**: SystemCapability.USB.USBManager
**系统能力:** SystemCapability.USB.USBManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -196,7 +197,7 @@ releaseInterface(pipe: USBDevicePipe, iface: USBInterface): number
需要调用[usb.claimInterface](#usbclaiminterface)先获取接口,才能使用此方法释放接口。
**系统能力**: SystemCapability.USB.USBManager
**系统能力:** SystemCapability.USB.USBManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -224,7 +225,7 @@ setConfiguration(pipe: USBDevicePipe, config: USBConfig): number
需要调用[usb.getDevices](#usbgetdevices)获取设备信息以及config;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)得到devicepipe作为参数。
**系统能力**: SystemCapability.USB.USBManager
**系统能力:** SystemCapability.USB.USBManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -252,7 +253,7 @@ setInterface(pipe: USBDevicePipe, iface: USBInterface): number
需要调用[usb.getDevices](#usbgetdevices)获取设备列表以及interfaces;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)得到devicepipe作为参数。
**系统能力**: SystemCapability.USB.USBManager
**系统能力:** SystemCapability.USB.USBManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -280,7 +281,7 @@ getRawDescriptor(pipe: USBDevicePipe): Uint8Array
需要调用[usb.getDevices](#usbgetdevices)获取设备列表;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)接口得到devicepipe作为参数。
**系统能力**: SystemCapability.USB.USBManager
**系统能力:** SystemCapability.USB.USBManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -306,17 +307,18 @@ getFileDescriptor(pipe: USBDevicePipe): number
需要调用[usb.getDevices](#usbgetdevices)获取设备列表;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)接口得到devicepipe作为参数。
**系统能力**: SystemCapability.USB.USBManager
**系统能力:** SystemCapability.USB.USBManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| pipe | [USBDevicePipe](#usbdevicepipe) | 是 | 用于确定总线号和设备地址。 |
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
| number | 返回设备对应的文件描述符。 |
**返回值:**
| 类型 | 说明 |
| -------- | -------- |
| number | 返回设备对应的文件描述符。 |
**示例:**
```js
......@@ -332,7 +334,7 @@ controlTransfer(pipe: USBDevicePipe, contrlparam: USBControlParams, timeout?: nu
需要调用[usb.getDevices](#usbgetdevices)获取设备列表;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)接口得到devicepipe作为参数。
**系统能力**: SystemCapability.USB.USBManager
**系统能力:** SystemCapability.USB.USBManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -362,7 +364,7 @@ bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, tim
需要调用[usb.getDevices](#usbgetdevices)获取设备信息列表以及endpoint;再调用[usb.requestRight](#usbrequestright)获取设备请求权限;然后调用[usb.connectDevice](#usbconnectdevice)接口得到返回数据devicepipe之后,再次获取接口[usb.claimInterface](#usbclaiminterface);再调用usb.bulkTransfer接口。
**系统能力**: SystemCapability.USB.USBManager
**系统能力:** SystemCapability.USB.USBManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......@@ -396,7 +398,7 @@ closePipe(pipe: USBDevicePipe): number
需要调用[usb.getDevices](#usbgetdevices)获取设备列表;调用[usb.requestRight](#usbrequestright)获取设备请求权限;调用[usb.connectDevice](#usbconnectdevice)得到devicepipe作为参数。
**系统能力**: SystemCapability.USB.USBManager
**系统能力:** SystemCapability.USB.USBManager
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
......
# webgl
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
......@@ -34,7 +34,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
## Type
**系统能力**以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。
**表1** Type
......@@ -62,7 +62,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
## Interface
**系统能力**以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。
**表2** Interface
......
# webgl2
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> **说明:**
> 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
......@@ -34,7 +34,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
## Type
**系统能力**以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL2。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL2。
**表1** Type
......@@ -48,7 +48,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
## Interface
**系统能力**以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL2。
**系统能力:** 以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL2。
**表2** Interface
......
......@@ -2,10 +2,10 @@
窗口提供管理窗口的一些基础能力,包括对窗口的创建、销毁,以及对窗口的属性设置等各项功能。
> ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:**
> 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
> **说明:**
> 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
>
> API 9当前为Canary版本,仅供试用,不保证接口可稳定调用。
> API 9当前为Canary版本,仅供试用,不保证接口可稳定调用。
## 导入模块
......@@ -17,7 +17,7 @@ import window from '@ohos.window';
窗口类型。
**系统能力**以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 默认值 | 说明 |
| ----------------- | ------ | ------------------ |
......@@ -28,7 +28,7 @@ import window from '@ohos.window';
窗口内容需要规避区域的类型。
**系统能力**以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 默认值 | 说明 |
| ----------- | ------ | ------------------ |
......@@ -41,7 +41,7 @@ import window from '@ohos.window';
此接口为系统接口,三方应用不支持调用。
**系统能力**以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 默认值 | 说明 |
| ---------- | ------ | ----------------------------- |
......@@ -55,7 +55,7 @@ import window from '@ohos.window';
状态栏导航栏的属性。
**系统能力**以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------------------------------------- | -------- | ---- | ---- | ------------------------------------------------------------ |
......@@ -72,7 +72,7 @@ import window from '@ohos.window';
此接口为系统接口,三方应用不支持调用。
**系统能力**以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| --------------- | ------------------------- | ---- | ---- | ------------------------------------------------------------ |
......@@ -88,7 +88,7 @@ import window from '@ohos.window';
此接口为系统接口,三方应用不支持调用。
**系统能力**以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| ---------- | --------------------------------------------------- | ---- | ---- | -------------------------- |
......@@ -97,9 +97,9 @@ import window from '@ohos.window';
## Rect<sup>7+</sup>
矩形
窗口矩形区域
**系统能力**以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| ------ | -------- | ---- | ---- | ------------------ |
......@@ -112,7 +112,7 @@ import window from '@ohos.window';
表示窗口内容规避区域。
**系统能力**以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| ---------- | ------------- | ---- | ---- | ------------------ |
......@@ -125,7 +125,7 @@ import window from '@ohos.window';
窗口大小。
**系统能力**以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| ------ | -------- | ---- | ---- | ---------- |
......@@ -136,7 +136,7 @@ import window from '@ohos.window';
窗口属性。
**系统能力**以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| ------------------------------- | ------------------------- | ---- | ---- | ------------------------------------------------------------ |
......@@ -157,7 +157,7 @@ import window from '@ohos.window';
色域模式。
**系统能力**以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core。
| 名称 | 默认值 | 说明 |
| ---------- | ------ | -------------- |
......@@ -172,7 +172,7 @@ create(id: string, type: WindowType, callback: AsyncCallback&lt;Window&gt;): voi
从API version 8开始,此接口废弃,推荐使用[window.create<sup>8+</sup>](#windowcreate8)接口。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -205,7 +205,7 @@ create(id: string, type: WindowType): Promise&lt;Window&gt;
从API version 8开始,此接口废弃,推荐使用[window.create<sup>8+</sup>](#windowcreate8)接口。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -239,15 +239,15 @@ create(ctx: Context, id: string, type: WindowType, callback: AsyncCallback&lt;Wi
创建子窗口,使用callback方式作为异步方法,其中Context详见[Context](js-apis-Context.md)
从API version 9开始,当Context为[ServiceExtAbilityContext](js-apis-serviceExtAbilityContext.md)时,创建系统窗口,使用callback方式作为异步方法。
从API version 9开始,当Context为[ServiceExtensionContext](js-apis-service-extension-context.md)时,创建系统窗口,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------------------------------------- | ---- | ------------------------------------------------------------ |
| ctx | Context | 是 | 当前应用上下文信息。<br>API version 8的Context定义见[Context](js-apis-Context.md)<br>API version 9的Context定义见[Context](js-apis-serviceExtAbilityContext.md)。 |
| ctx | Context | 是 | 当前应用上下文信息。<br>API version 8的Context定义见[Context](js-apis-Context.md)<br>API version 9的Context定义见[Context](js-apis-service-extension-context.md)。 |
| id | string | 是 | 窗口id。 |
| type | [WindowType](#windowtype) | 是 | 窗口类型。 |
| callback | AsyncCallback&lt;[Window](#window)&gt; | 是 | 回调返回当前窗口对象。 |
......@@ -273,15 +273,15 @@ create(ctx: Context, id: string, type: WindowType): Promise&lt;Window&gt;
创建子窗口,使用Promise方式作为异步方法,其中Context详见[Context](js-apis-Context.md)
从API version 9开始,当Context为[ServiceExtAbilityContext](js-apis-serviceExtAbilityContext.md)时,创建系统窗口,使用Promise方式作为异步方法。
从API version 9开始,当Context为[ServiceExtensionContext](js-apis-service-extension-context.md)时,创建系统窗口,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------------------------- | ---- | ------------------------------------------------------------ |
| ctx | Context | 是 | 当前应用上下文信息。<br/>API version 8的Context定义见[Context](js-apis-Context.md)<br/>API version 9的Context定义见[Context](js-apis-serviceExtAbilityContext.md)。 |
| ctx | Context | 是 | 当前应用上下文信息。<br/>API version 8的Context定义见[Context](js-apis-Context.md)<br/>API version 9的Context定义见[Context](js-apis-service-extension-context.md)。 |
| id | string | 是 | 窗口id。 |
| type | [WindowType](#windowtype) | 是 | 窗口类型。 |
......@@ -310,7 +310,7 @@ find(id: string, callback: AsyncCallback&lt;Window&gt;): void
查找id所对应的窗口,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -339,7 +339,7 @@ find(id: string): Promise&lt;Window&gt;
查找id所对应的窗口,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -372,7 +372,9 @@ getTopWindow(callback: AsyncCallback&lt;Window&gt;): void
获取当前应用内最后显示的窗口,使用callback方式作为异步方法。
**系统能力**:SystemCapability.WindowManager.WindowManager.Core
从API version 8开始,此接口废弃,推荐使用[window.getTopWindow<sup>8+</sup>](#windowgettopwindow8)接口。
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -400,7 +402,9 @@ getTopWindow(): Promise&lt;Window&gt;
获取当前应用内最后显示的窗口,使用Promise方式作为异步方法。
**系统能力**:SystemCapability.WindowManager.WindowManager.Core
从API version 8开始,此接口废弃,推荐使用[window.getTopWindow<sup>8+</sup>](#windowgettopwindow8)接口。
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**返回值:**
......@@ -427,7 +431,7 @@ getTopWindow(ctx: Context, callback: AsyncCallback&lt;Window&gt;): void
获取当前应用内最后显示的窗口,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -456,7 +460,7 @@ getTopWindow(ctx: Context): Promise&lt;Window&gt;
获取当前应用内最后显示的窗口,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -491,7 +495,7 @@ on(type: 'systemBarTintChange', callback: Callback&lt;SystemBarTintState&gt;): v
此接口为系统接口,三方应用不支持调用。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -517,7 +521,7 @@ off(type: 'systemBarTintChange', callback?: Callback&lt;SystemBarTintState &gt;)
此接口为系统接口,三方应用不支持调用。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -545,7 +549,7 @@ hide (callback: AsyncCallback&lt;void&gt;): void
此接口为系统接口,三方应用不支持调用。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -573,7 +577,7 @@ hide(): Promise&lt;void&gt;
此接口为系统接口,三方应用不支持调用。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**返回值:**
......@@ -598,7 +602,7 @@ show(callback: AsyncCallback&lt;void&gt;): void
显示当前窗口,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -624,7 +628,7 @@ show(): Promise&lt;void&gt;
显示当前窗口,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**返回值:**
......@@ -649,7 +653,7 @@ destroy(callback: AsyncCallback&lt;void&gt;): void
销毁当前窗口,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -675,7 +679,7 @@ destroy(): Promise&lt;void&gt;
销毁当前窗口,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**返回值:**
......@@ -700,7 +704,7 @@ moveTo(x: number, y: number, callback: AsyncCallback&lt;void&gt;): void
移动窗口位置,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -729,7 +733,7 @@ moveTo(x: number, y: number): Promise&lt;void&gt;
移动窗口位置,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -761,7 +765,7 @@ resetSize(width: number, height: number, callback: AsyncCallback&lt;void&gt;): v
改变当前窗口大小,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -789,7 +793,7 @@ resetSize(width: number, height: number): Promise&lt;void&gt;
改变当前窗口大小,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -823,7 +827,7 @@ setWindowType(type: WindowType, callback: AsyncCallback&lt;void&gt;): void
此接口为系统接口,三方应用不支持调用。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -853,7 +857,7 @@ setWindowType(type: WindowType): Promise&lt;void&gt;
此接口为系统接口,三方应用不支持调用。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -885,7 +889,7 @@ getProperties(callback: AsyncCallback&lt;WindowProperties&gt;): void
获取当前窗口的属性,使用callback方式作为异步方法返回WindowProperties。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -911,7 +915,7 @@ getProperties(): Promise&lt;WindowProperties&gt;
获取当前窗口的属性,使用promise方式作为异步方法返回WindowProperties。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**返回值:**
......@@ -936,7 +940,7 @@ getAvoidArea(type: AvoidAreaType, callback: AsyncCallback&lt;AvoidArea&gt;): voi
获取窗口内容规避的区域,如系统的系统栏区域、凹凸区域。使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -964,7 +968,7 @@ getAvoidArea(type: AvoidAreaType): Promise&lt;AvoidArea&gt;
获取窗口内容规避的区域,如系统的系统栏区域、凹凸区域。使用promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -995,7 +999,7 @@ setFullScreen(isFullScreen: boolean, callback: AsyncCallback&lt;void&gt;): void
设置是否为全屏状态,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1023,7 +1027,7 @@ setFullScreen(isFullScreen: boolean): Promise&lt;void&gt;
设置是否为全屏状态,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1055,7 +1059,7 @@ setLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback&lt;void
设置窗口的布局是否为全屏显示状态,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1083,7 +1087,7 @@ setLayoutFullScreen(isLayoutFullScreen: boolean): Promise&lt;void&gt;
设置窗口的布局是否为全屏显示状态,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1115,7 +1119,7 @@ setSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallbac
设置导航栏、状态栏的可见模式,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1143,7 +1147,7 @@ setSystemBarEnable(names: Array<'status' | 'navigation'>): Promise&lt;void&gt;
设置导航栏、状态栏的可见模式,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1175,7 +1179,7 @@ setSystemBarProperties(systemBarProperties: SystemBarProperties, callback: Async
设置窗口内导航栏、状态栏的属性,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1212,7 +1216,7 @@ setSystemBarProperties(systemBarProperties: SystemBarProperties): Promise&lt;voi
设置窗口内导航栏、状态栏的属性,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1253,7 +1257,7 @@ loadContent(path: string, callback: AsyncCallback&lt;void&gt;): void
当前窗口加载具体页面内容,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1280,7 +1284,7 @@ loadContent(path: string): Promise&lt;void&gt;
当前窗口加载具体页面内容,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1311,7 +1315,7 @@ isShowing(callback: AsyncCallback&lt;boolean&gt;): void
判断当前窗口是否已显示,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1337,7 +1341,7 @@ isShowing(): Promise&lt;boolean&gt;
判断当前窗口是否已显示,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**返回值:**
......@@ -1362,7 +1366,7 @@ on(type: 'windowSizeChange', callback: Callback&lt;Size&gt;): void
开启监听。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1386,7 +1390,7 @@ off(type: 'windowSizeChange', callback?: Callback&lt;Size &gt;): void
关闭监听。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1408,7 +1412,7 @@ on(type: 'systemAvoidAreaChange', callback: Callback&lt;AvoidArea&gt;): void
开启监听。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1432,7 +1436,7 @@ off(type: 'systemAvoidAreaChange', callback?: Callback&lt;AvoidArea&gt;): void
关闭监听。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1456,7 +1460,7 @@ on(type: 'keyboardHeightChange', callback: Callback&lt;number&gt;): void
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1482,7 +1486,7 @@ off(type: 'keyboardHeightChange', callback?: Callback&lt;number&gt;): void
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1504,7 +1508,7 @@ isSupportWideGamut(callback: AsyncCallback&lt;boolean&gt;): void
判断当前窗口是否支持广色域模式,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1530,7 +1534,7 @@ isSupportWideGamut(): Promise&lt;boolean&gt;
判断当前窗口是否支持广色域模式,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**返回值:**
......@@ -1555,7 +1559,7 @@ setColorSpace(colorSpace:ColorSpace, callback: AsyncCallback&lt;void&gt;): void
设置当前窗口为广色域模式或默认色域模式,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1582,7 +1586,7 @@ setColorSpace(colorSpace:ColorSpace): Promise&lt;void&gt;
设置当前窗口为广色域模式或默认色域模式,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1613,7 +1617,7 @@ getColorSpace(callback: AsyncCallback&lt;ColorSpace&gt;): void
获取当前窗口色域模式,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1639,7 +1643,7 @@ getColorSpace(): Promise&lt;ColorSpace&gt;
获取当前窗口色域模式,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**返回值:**
......@@ -1666,7 +1670,7 @@ setBackgroundColor(color: string, callback: AsyncCallback&lt;void&gt;): void
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1696,7 +1700,7 @@ setBackgroundColor(color: string): Promise&lt;void&gt;
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1730,7 +1734,7 @@ setBrightness(brightness: number, callback: AsyncCallback&lt;void&gt;): void
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1760,7 +1764,7 @@ setBrightness(brightness: number): Promise&lt;void&gt;
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1794,7 +1798,7 @@ setDimBehind(dimBehindValue: number, callback: AsyncCallback&lt;void&gt;): void
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1823,7 +1827,7 @@ setDimBehind(dimBehindValue: number): Promise&lt;void&gt;
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1856,7 +1860,7 @@ setFocusable(isFocusable: boolean, callback: AsyncCallback&lt;void&gt;): void
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1886,7 +1890,7 @@ setFocusable(isFocusable: boolean): Promise&lt;void&gt;
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1920,7 +1924,7 @@ setKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback&lt;void&gt;): v
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1950,7 +1954,7 @@ setKeepScreenOn(isKeepScreenOn: boolean): Promise&lt;void&gt;
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -1984,7 +1988,7 @@ setOutsideTouchable(touchable: boolean, callback: AsyncCallback&lt;void&gt;): vo
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -2013,7 +2017,7 @@ setOutsideTouchable(touchable: boolean): Promise&lt;void&gt;
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -2046,7 +2050,7 @@ setPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback&lt;void&gt;): voi
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -2077,7 +2081,7 @@ setPrivacyMode(isPrivacyMode: boolean): Promise&lt;void&gt;
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -2111,7 +2115,7 @@ setTouchable(isTouchable: boolean, callback: AsyncCallback&lt;void&gt;): void
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -2142,7 +2146,7 @@ setTouchable(isTouchable: boolean): Promise&lt;void&gt;
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -2172,7 +2176,7 @@ setTouchable(isTouchable: boolean): Promise&lt;void&gt;
WindowStage生命周期。
**系统能力**以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core
**系统能力:** 以下各项对应的系统能力均为SystemCapability.WindowManager.WindowManager.Core
| 名称 | 默认值 | 说明 |
| ---------- | ------ | -------- |
......@@ -2191,7 +2195,7 @@ getMainWindow(): Promise&lt;Window&gt;
获取该WindowStage实例下的主窗口,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**返回值:**
......@@ -2223,7 +2227,7 @@ getMainWindow(callback: AsyncCallback&lt;Window&gt;): void
获取该WindowStage实例下的主窗口,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -2256,7 +2260,7 @@ createSubWindow(name: string): Promise&lt;Window&gt;
创建该WindowStage实例下的子窗口,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -2294,7 +2298,7 @@ createSubWindow(name: string, callback: AsyncCallback&lt;Window&gt;): void
创建该WindowStage实例下的子窗口,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -2329,7 +2333,7 @@ getSubWindow(): Promise&lt;Array&lt;Window&gt;&gt;
获取该WindowStage实例下的所有子窗口,使用Promise方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**返回值:**
......@@ -2361,7 +2365,7 @@ getSubWindow(callback: AsyncCallback&lt;Array&lt;Window&gt;&gt;): void
获取该WindowStage实例下的所有子窗口,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -2394,7 +2398,7 @@ loadContent(path: string, callback: AsyncCallback&lt;void&gt;): void
为当前WindowStage的主窗口加载具体页面内容,使用callback方式作为异步方法。
**系统能力**SystemCapability.WindowManager.WindowManager.Coretype为'windowSizeChange'
**系统能力:** SystemCapability.WindowManager.WindowManager.Coretype为'windowSizeChange'
**参数:**
......@@ -2426,7 +2430,7 @@ on(eventType: 'windowStageEvent', callback: Callback&lt;WindowStageEventType&gt;
开启WindowStage生命周期变化的监听。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......@@ -2455,7 +2459,7 @@ off(eventType: 'windowStageEvent', callback?: Callback&lt;WindowStageEventType&g
关闭WindowStage生命周期变化的监听。
**系统能力**SystemCapability.WindowManager.WindowManager.Core
**系统能力:** SystemCapability.WindowManager.WindowManager.Core
**参数:**
......
......@@ -699,3 +699,9 @@ WebGL主要帮助开发者在前端开发中完成图形图像的相关处理,
**图2** 点击按钮绘制彩色三角形的效果图
![zh-cn_image_0000001192429306](figures/zh-cn_image_0000001192429306.gif)
## 相关实例
针对WebGL开发,有以下相关实例可供参考:
- [`JsWbgGL`:WebGL(JS)(API8)](https://gitee.com/openharmony/app_samples/tree/master/Graphics/JsWebGL)
......@@ -37,4 +37,4 @@ screenshot.save(ScreenshotOptions).then((image) => {
```
## 相关实例
针对屏幕截图开发,有以下相关实例可供参考:
- [`Screenshot`:基础功能-屏幕截图(eTS)(API8](https://gitee.com/openharmony/app_samples/tree/master/Basic/Screenshot)
- [`Screenshot`:屏幕截图(eTS)(API9](https://gitee.com/openharmony/app_samples/tree/master/Basic/Screenshot)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册