diff --git a/api/@ohos.data.rdb.d.ts b/api/@ohos.data.rdb.d.ts index dfbcea11dae41540078e23fd102a837239841a12..133939f94dae82643a95d7368e4498df1f70f162 100644 --- a/api/@ohos.data.rdb.d.ts +++ b/api/@ohos.data.rdb.d.ts @@ -14,6 +14,7 @@ */ import { AsyncCallback } from './basic'; import { ResultSet } from './data/rdb/resultSet'; +import Context from "./application/Context"; /** * Provides methods for rdbStore create and delete. @@ -32,29 +33,31 @@ declare namespace rdb { * to obtain a rdb store. * * @note N/A - * @since 7 + * @since 8 * @sysCap SystemCapability.Data.DATA_APPDATAMGR - * @devices phone, tablet, tv, wearable, car + * + * @param context Indicates the context of application or capability. * @param config Indicates the configuration of the database related to this RDB store. The configurations include * the database path, storage mode, and whether the database is read-only. * @param version Indicates the database version for upgrade or downgrade. * @return Returns an RDB store {@link ohos.data.rdb.RdbStore}. */ - function getRdbStore(config: StoreConfig, version: number, callback: AsyncCallback): void; - function getRdbStore(config: StoreConfig, version: number): Promise; + function getRdbStore(context: Context, config: StoreConfig, version: number, callback: AsyncCallback): void; + function getRdbStore(context: Context, config: StoreConfig, version: number): Promise; /** * Deletes the database with a specified name. * * @note N/A - * @since 7 + * @since 8 * @sysCap SystemCapability.Data.DATA_APPDATAMGR - * @devices phone, tablet, tv, wearable, car + * + * @param context Indicates the context of application or capability. * @param name Indicates the database name. * @return Returns true if the database is deleted; returns false otherwise. */ - function deleteRdbStore(name: string, callback: AsyncCallback): void; - function deleteRdbStore(name: string): Promise; + function deleteRdbStore(context: Context, name: string, callback: AsyncCallback): void; + function deleteRdbStore(context: Context, name: string): Promise; /** * Provides methods for managing the relational database (RDB).