分布式数据管理子系统JS API变更


分布式数据管理子系统JS API变更

OpenHarmony 3.2 Canary1版本相较于OpenHarmony 3.1 Release版本,分布式数据管理子系统的API变更如下:

接口变更

模块名 类名 方法/属性/枚举/常量 变更类型
ohos.data.dataShare DataShareHelper notifyChange(uri: string, callback: AsyncCallback): void;
notifyChange(uri: string): Promise;
新增
ohos.data.dataShare DataShareHelper denormalizeUri(uri: string, callback: AsyncCallback): void;
denormalizeUri(uri: string): Promise;
新增
ohos.data.dataShare DataShareHelper normalizeUri(uri: string, callback: AsyncCallback): void;
normalizeUri(uri: string): Promise;
新增
ohos.data.dataShare DataShareHelper getFileTypes(uri: string, mimeTypeFilter:string, callback: AsyncCallback<Array>): void;
getFileTypes(uri: string, mimeTypeFilter: string): Promise<Array>;
新增
ohos.data.dataShare DataShareHelper getType(uri: string, callback: AsyncCallback): void;
getType(uri: string): Promise;
新增
ohos.data.dataShare DataShareHelper batchInsert(uri: string, values: Array<rdb.ValuesBucket>, callback: AsyncCallback): void;
batchInsert(uri: string, values: Array<rdb.ValuesBucket>): Promise;
新增
ohos.data.dataShare DataShareHelper update(uri: string, value: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback): void;
update(uri: string, value: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates): Promise;
新增
ohos.data.dataShare DataShareHelper query(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback): void;
query(uri: string, columns: Array, predicates: dataAbility.DataAbilityPredicates): Promise;
新增
ohos.data.dataShare DataShareHelper delete(uri: string, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback): void;
delete(uri: string, predicates: dataAbility.DataAbilityPredicates): Promise;
新增
ohos.data.dataShare DataShareHelper insert(uri: string, value: rdb.ValuesBucket, callback: AsyncCallback): void;
insert(uri: string, value: rdb.ValuesBucket): Promise;
新增
ohos.data.dataShare DataShareHelper off(type: 'dataChange', uri: string, callback?: AsyncCallback): void; 新增
ohos.data.dataShare DataShareHelper on(type: 'dataChange', uri: string, callback: AsyncCallback): void; 新增
ohos.data.dataShare dataShare function createDataShareHelper(context: Context, want: Want, uri: string): DataShareHelper; 新增