diff --git a/api/@ohos.data.rdb.d.ts b/api/@ohos.data.rdb.d.ts index d77415c1bd1a037c2d2b5a9985eb892b9b20753b..99b51199aa3c8b3bf8d7781ed8817e3eb4cdf290 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 './app/context'; /** * Provides methods for rdbStore create and delete. @@ -37,11 +38,12 @@ declare namespace rdb { * @devices phone, tablet, tv, wearable, car * @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 context Indicates the context * @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(config: StoreConfig, context: Context, version: number, callback: AsyncCallback): void; + function getRdbStore(config: StoreConfig, context: Context, version: number): Promise; /** * Deletes the database with a specified name. @@ -51,10 +53,11 @@ declare namespace rdb { * @sysCap SystemCapability.Data.DATA_APPDATAMGR * @devices phone, tablet, tv, wearable, car * @param name Indicates the database name. + * @param context Indicates the context * @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(name: string, context: Context, callback: AsyncCallback): void; + function deleteRdbStore(name: string, context: Context): Promise; /** * Provides methods for managing the relational database (RDB).