Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
f159eaa9
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f159eaa9
编写于
8月 01, 2023
作者:
Y
ylq121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xiugai
Signed-off-by:
N
ylq121
<
yangqing89@huawei.com
>
上级
685f4ab1
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
328 addition
and
0 deletion
+328
-0
zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.3/changelogs-distributeddatamgr.md
...logs/OpenHarmony_4.0.9.3/changelogs-distributeddatamgr.md
+328
-0
未找到文件。
zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.3/changelogs-distributeddatamgr.md
0 → 100644
浏览文件 @
f159eaa9
# 分布式数据子系统ChangeLog
## cl.data.cloudData修改Action接口改名为clearAction
**变更影响**
基于OpenHarmony4.0.9.3及之后的SDK版本开发的应用,可以使用clearAction接口指定清除本地下载的云端数据的行为枚举。
**关键接口/组件变更**
修改前的接口原型:
```
ts
/**
* Describes the clear action type.
*
* @enum { number }
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 10
*/
enum
Action
{
/**
* Indicates clearing cloud-related data only, which includes cloud meta data and cloud-related local data.
*
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 10
*/
CLEAR_CLOUD_INFO
,
/**
* Indicates clearing all cloud-related file data,which synchronized with the cloud.
*
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 10
*/
CLEAR_CLOUD_DATA_AND_INFO
}
```
修改后的接口原型:
```
ts
/**
* Describes the clear action type.
*
* @enum { number }
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 10
*/
enum
ClearAction
{
/**
* Indicates clearing cloud-related data only, which includes cloud meta data and cloud-related local data.
*
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 10
*/
CLEAR_CLOUD_INFO
,
/**
* Indicates clearing all cloud-related file data,which synchronized with the cloud.
*
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 10
*/
CLEAR_CLOUD_DATA_AND_INFO
}
```
##
## cl.data.cloudData修改clean接口改名为clear
**变更影响**
基于OpenHarmony4.0.9.3及之后的SDK版本开发的应用,可以使用clear接口清除本地下载的云端数据。
**关键接口/组件变更**
修改前的接口原型:
```
ts
/**
* deletes cloud information from local data.
*
* @permission ohos.permission.CLOUDDATA_CONFIG
* @param { string } accountId - Indicates the account ID. The account ID is required by hashing the information of specific opened cloud.
* @param { {[bundleName: string]: Action} } appActions - Indicates information about the application data need to clear in which way.
* @param { AsyncCallback<void> } callback - the callback of clean.
* @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
* @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 10
*/
static
clean
(
accountId
:
string
,
appActions
:
{
[
bundleName
:
string
]:
Action
},
callback
:
AsyncCallback
<
void
>
):
void
;
/**
* deletes cloud information from local data.
*
* @permission ohos.permission.CLOUDDATA_CONFIG
* @param { string } accountId - Indicates the account ID. The account ID is required by hashing the information of specific opened cloud.
* @param { {[bundleName: string]: Action} } appActions - Indicates information about the application data need to clear in which way.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
* @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 10
*/
static
clean
(
accountId
:
string
,
appActions
:
{
[
bundleName
:
string
]:
Action
}):
Promise
<
void
>
;
```
修改后的接口原型:
```
ts
/**
* deletes cloud information from local data.
*
* @permission ohos.permission.CLOUDDATA_CONFIG
* @param { string } accountId - Indicates the account ID. The account ID is required by hashing cloud account.
* @param { { [bundleName: string]: ClearAction } } appActions - Indicates the way in which the application data is to be cleared.
* @param { AsyncCallback<void> } callback - the callback of clear.
* @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
* @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 10
*/
static
clear
(
accountId
:
string
,
appActions
:
{
[
bundleName
:
string
]:
ClearAction
},
callback
:
AsyncCallback
<
void
>
):
void
;
/**
* deletes cloud information from local data.
*
* @permission ohos.permission.CLOUDDATA_CONFIG
* @param { string } accountId - Indicates the account ID. The account ID is required by hashing the information of specific opened cloud.
* @param { { [bundleName: string]: ClearAction } } appActions - Indicates the way in which the application data is to be cleared.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken.
* @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 801 - Capability not supported.
* @syscap SystemCapability.DistributedDataManager.CloudSync.Config
* @systemapi
* @since 10
*/
static
clear
(
accountId
:
string
,
appActions
:
{
[
bundleName
:
string
]:
ClearAction
}):
Promise
<
void
>
;
```
## cl.data.relationalStore修改Statistic中的success为successful
**变更影响**
基于OpenHarmony4.0.9.3及之后的SDK版本开发的应用,可以使用Statistic.successful表示数据库表中端云同步成功的行数。
**关键接口/组件变更**
修改前的接口原型:
```
ts
/**
* Describes the statistic of the cloud sync process.
*
* @interface Statistic
* @syscap SystemCapability.DistributedDataManager.RelationalStore.Core
* @since 10
*/
interface
Statistic
{
/**
* Describes the total number of data to sync.
*
* @syscap SystemCapability.DistributedDataManager.RelationalStore.Core
* @since 10
*/
total
:
number
;
/**
* Describes the number of successfully synced data.
*
* @syscap SystemCapability.DistributedDataManager.RelationalStore.Core
* @since 10
*/
success
:
number
;
/**
* Describes the number of data failed to sync.
*
* @syscap SystemCapability.DistributedDataManager.RelationalStore.Core
* @since 10
*/
failed
:
number
;
/**
* Describes the number of data remained to sync.
*
* @syscap SystemCapability.DistributedDataManager.RelationalStore.Core
* @since 10
*/
remained
:
number
;
}
```
修改后的接口原型:
```
ts
/**
* Describes the statistic of the cloud sync process.
*
* @interface Statistic
* @syscap SystemCapability.DistributedDataManager.RelationalStore.Core
* @since 10
*/
interface
Statistic
{
/**
* Describes the total number of data to sync.
*
* @syscap SystemCapability.DistributedDataManager.RelationalStore.Core
* @since 10
*/
total
:
number
;
/**
* Describes the number of successfully synced data.
*
* @syscap SystemCapability.DistributedDataManager.RelationalStore.Core
* @since 10
*/
successful
:
number
;
/**
* Describes the number of data failed to sync.
*
* @syscap SystemCapability.DistributedDataManager.RelationalStore.Core
* @since 10
*/
failed
:
number
;
/**
* Describes the number of data remained to sync.
*
* @syscap SystemCapability.DistributedDataManager.RelationalStore.Core
* @since 10
*/
remained
:
number
;
}
```
## cl.data.relationalStore修改setDistributedTables接口入参type类型由number变为DistributedType
**变更影响**
基于OpenHarmony4.0.9.3及之后的SDK版本开发的应用,setDistributedTables接口入参type类型由number变为DistributedType。
**关键接口/组件变更**
1.
修改前setDistributedTables接口:
```
ts
setDistributedTables
(
tables
:
Array
<
string
>
,
type
:
number
,
config
:
DistributedConfig
,
callback
:
AsyncCallback
<
void
>
):
void
;
```
修改后setDistributedTables接口:
```
ts
setDistributedTables
(
tables
:
Array
<
string
>
,
type
:
DistributedType
,
config
:
DistributedConfig
,
callback
:
AsyncCallback
<
void
>
):
void
;
```
2.
修改前setDistributedTables接口:
```
ts
setDistributedTables
(
tables
:
Array
<
string
>
,
type
?:
number
,
config
?:
DistributedConfig
):
Promise
<
void
>
;
```
修改后setDistributedTables接口:
```
ts
setDistributedTables
(
tables
:
Array
<
string
>
,
type
?:
DistributedType
,
config
?:
DistributedConfig
):
Promise
<
void
>
;
```
## cl.data.relationalStore接口新增
新增setDistributedTables(tables: Array
<
string
>
, type: DistributedType, callback: AsyncCallback
<
void
>
): void接口。
**变更影响**
基于OpenHarmony4.0.9.3及之后的SDK版本开发的应用,可使用setDistributedTables(tables: Array
<
string
>
, type: DistributedType, callback: AsyncCallback
<
void
>
): void设置分布式表。
**关键接口/组件变更**
@ohos.data.relationalStore.d.ts中新增setDistributedTables接口。
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
| ------------------------------- | -------- | ------------------------------------------------------------ | -------- |
| @ohos.data.relationalStore.d.ts | RdbStore | setDistributedTables(tables: Array
<
string
>
, type: DistributedType, callback: AsyncCallback
<
void
>
): void | 新增 |
**适配指导**
<br>
通过调用setDistributedTables接口设置分布式表。
```
ts
store
.
setDistributedTables
([
"
EMPLOYEE
"
],
relationalStore
.
DistributedType
.
DISTRIBUTED_CLOUD
,
function
(
err
)
{
if
(
err
)
{
console
.
error
(
`SetDistributedTables failed, code is
${
err
.
code
}
,message is
${
err
.
message
}
`
);
return
;
}
console
.
info
(
`SetDistributedTables successfully.`
);
})
```
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录