diff --git a/api/@ohos.data.rdb.d.ts b/api/@ohos.data.rdb.d.ts index 301969129c5248a7027ef5e565e574e01be742e6..abee9e3e36fe30b2ca94d2ef950cc7b1a9fca64a 100644 --- a/api/@ohos.data.rdb.d.ts +++ b/api/@ohos.data.rdb.d.ts @@ -200,9 +200,17 @@ declare namespace rdb { /** * Set table to be distributed table. * + * @deprecated since 9 * @since 8 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @param tables the tables name you want to set + */ + /** + * Set table to be distributed table. + * + * @since 9 + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @param tables the tables name you want to set * @permission ohos.permission.DISTRIBUTED_DATASYNC */ setDistributedTables(tables: Array, callback: AsyncCallback): void; @@ -212,10 +220,21 @@ declare namespace rdb { * Obtain distributed table name of specified remote device according to local table name. * When query remote device database, distributed table name is needed. * + * @deprecated since 9 * @since 8 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @param device Indicates the remote device. * @param table Indicates the local table name. + * @return the distributed table name. + */ + /** + * Obtain distributed table name of specified remote device according to local table name. + * When query remote device database, distributed table name is needed. + * + * @since 9 + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @param device Indicates the remote device. + * @param table Indicates the local table name. * @permission ohos.permission.DISTRIBUTED_DATASYNC * @return the distributed table name. */ @@ -225,11 +244,21 @@ declare namespace rdb { /** * Sync data between devices * + * @deprecated since 9 * @since 8 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @param mode Indicates the synchronization mode. The value can be PUSH, PULL. * @param predicates Constraint synchronized data and devices. * @param callback Indicates the callback used to send the synchronization result to the caller. + */ + /** + * Sync data between devices + * + * @since 9 + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @param mode Indicates the synchronization mode. The value can be PUSH, PULL. + * @param predicates Constraint synchronized data and devices. + * @param callback Indicates the callback used to send the synchronization result to the caller. * @permission ohos.permission.DISTRIBUTED_DATASYNC */ sync(mode: SyncMode, predicates: RdbPredicates, callback: AsyncCallback>): void; @@ -239,10 +268,20 @@ declare namespace rdb { * Registers an observer for the database. When data in the distributed database changes, * the callback will be invoked. * + * @deprecated since 9 * @since 8 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @param type Indicates the subscription type, which is defined in {@code SubscribeType}. * @param observer Indicates the observer of data change events in the distributed database. + */ + /** + * Registers an observer for the database. When data in the distributed database changes, + * the callback will be invoked. + * + * @since 9 + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @param type Indicates the subscription type, which is defined in {@code SubscribeType}. + * @param observer Indicates the observer of data change events in the distributed database. * @permission ohos.permission.DISTRIBUTED_DATASYNC */ on(event: 'dataChange', type: SubscribeType, observer: Callback>): void; @@ -250,10 +289,19 @@ declare namespace rdb { /** * Remove specified observer of specified type from the database. * + * @deprecated since 9 * @since 8 * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @param type Indicates the subscription type, which is defined in {@code SubscribeType}. - * @param observer Indicates the data change observer already registered . + * @param observer Indicates the data change observer already registered. + */ + /** + * Remove specified observer of specified type from the database. + * + * @since 9 + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @param type Indicates the subscription type, which is defined in {@code SubscribeType}. + * @param observer Indicates the data change observer already registered. * @permission ohos.permission.DISTRIBUTED_DATASYNC */ off(event:'dataChange', type: SubscribeType, observer: Callback>): void;