lifecycledata-switch.md 4.5 KB
Newer Older
Z
zengyawen 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# LifecycleData接口切换


  | FA模型接口 | Stage模型接口对应d.ts文件 | Stage模型对应接口 | 
| -------- | -------- | -------- |
| update?(uri: string, valueBucket: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback<number>): void; | \@ohos.application.DataShareExtensionAbility.d.ts | [update?(uri: string, predicates: dataSharePredicates.DataSharePredicates, valueBucket: ValuesBucket, callback: AsyncCallback<number>): void;](../reference/apis/js-apis-application-DataShareExtensionAbility.md#update) |
| query?(uri: string, columns: Array<string>, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback<ResultSet>): void; | \@ohos.application.DataShareExtensionAbility.d.ts | [query?(uri: string, predicates: dataSharePredicates.DataSharePredicates, columns: Array<string>, callback: AsyncCallback<Object>): void;](../reference/apis/js-apis-application-DataShareExtensionAbility.md#query) |
| delete?(uri: string, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback<number>): void; | \@ohos.application.DataShareExtensionAbility.d.ts | [delete?(uri: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback<number>): void;](../reference/apis/js-apis-application-DataShareExtensionAbility.md#delete) |
| normalizeUri?(uri: string, callback: AsyncCallback<string>): void; | \@ohos.application.DataShareExtensionAbility.d.ts | [normalizeUri?(uri: string, callback: AsyncCallback<string>): void;](../reference/apis/js-apis-application-DataShareExtensionAbility.md#normalizeuri) |
| batchInsert?(uri: string, valueBuckets: Array<rdb.ValuesBucket>, callback: AsyncCallback<number>): void; | \@ohos.application.DataShareExtensionAbility.d.ts | [batchInsert?(uri: string, valueBuckets: Array<ValuesBucket>, callback: AsyncCallback<number>): void;](../reference/apis/js-apis-application-DataShareExtensionAbility.md#batchinsert) |
| denormalizeUri?(uri: string, callback: AsyncCallback<string>): void; | \@ohos.application.DataShareExtensionAbility.d.ts | [denormalizeUri?(uri: string, callback: AsyncCallback<string>): void;](../reference/apis/js-apis-application-DataShareExtensionAbility.md#denormalizeuri) |
| insert?(uri: string, valueBucket: rdb.ValuesBucket, callback: AsyncCallback<number>): void; | \@ohos.application.DataShareExtensionAbility.d.ts | [insert?(uri: string, valueBucket: ValuesBucket, callback: AsyncCallback<number>): void;](../reference/apis/js-apis-application-DataShareExtensionAbility.md#insert) |
| openFile?(uri: string, mode: string, callback: AsyncCallback<number>): void; | Stage模型无对应接口 | Stage模型不支持uri跨进程访问,建议通过[want携带fd和文件信息](data-share-via-want.md#开发步骤)进行跨进程文件访问 |
| getFileTypes?(uri: string, mimeTypeFilter: string, callback: AsyncCallback<Array<string>>): void; | Stage模型无对应接口 | Stage模型不支持uri跨进程访问,建议通过[want携带fd和文件信息](data-share-via-want.md#开发步骤)进行跨进程文件访问 |
| onInitialized?(info: AbilityInfo): void; | \@ohos.application.DataShareExtensionAbility.d.ts | [onCreate?(want: Want, callback: AsyncCallback<void>): void;](../reference/apis/js-apis-application-DataShareExtensionAbility.md#oncreate) |
| getType?(uri: string, callback: AsyncCallback<string>): void; | Stage模型无对应接口 | Stage模型不支持uri跨进程访问,建议通过[want携带fd和文件信息](data-share-via-want.md#开发步骤)进行跨进程文件访问 |
| executeBatch?(ops: Array<DataAbilityOperation>, callback: AsyncCallback<Array<DataAbilityResult>>): void; | Stage模型无对应接口 | 暂时未提供对应接口 |
| call?(method: string, arg: string, extras: PacMap, callback: AsyncCallback<PacMap>): void; | Stage模型无对应接口 | 暂时未提供对应接口 |