From 2d3b87ec816150bee70cee7a7f0f21b5ad9dd41e Mon Sep 17 00:00:00 2001 From: smagicyun Date: Wed, 29 Sep 2021 22:03:12 +0800 Subject: [PATCH] add parameter context to getRdbstore and deleteRdbstore Signed-off-by: smagicyun --- api/@ohos.data.rdb.d.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/api/@ohos.data.rdb.d.ts b/api/@ohos.data.rdb.d.ts index d77415c1bd..99b51199aa 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). -- Gitee