From c851a6e76e0a461d079b6fc175ceefe01d891676 Mon Sep 17 00:00:00 2001 From: PaDoBoo Date: Sat, 12 Feb 2022 17:34:52 +0800 Subject: [PATCH] support stage context for rdb Signed-off-by: PaDoBoo --- zh-cn/application-dev/reference/apis/js-apis-data-rdb.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-data-rdb.md b/zh-cn/application-dev/reference/apis/js-apis-data-rdb.md index 8665b3381c..3c80583520 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-data-rdb.md +++ b/zh-cn/application-dev/reference/apis/js-apis-data-rdb.md @@ -91,7 +91,7 @@ deleteRdbStore(context: Context, name: string, callback: AsyncCallback<void&g ``` import dataRdb from '@ohos.data.rdb' const context = this.context; - dataRdb.deleteRdbStore("RdbTest.db", function (err, rdbStore) { + dataRdb.deleteRdbStore(context, "RdbTest.db", function (err, rdbStore) { console.info(TAG + 'delete store done.')}) ``` @@ -116,8 +116,10 @@ deleteRdbStore(context: Context, name: string): Promise<void> ``` import dataRdb from '@ohos.data.rdb' const context = this.context; - dataRdb.deleteRdbStore("RdbTest.db", function (err, rdbStore) { - console.info(TAG + 'delete store done.')}) + let promise = dataRdb.deleteRdbStore(context, "RdbTest.db") + promise.then(()=>{ + console.info(TAG + 'delete store done.') + }) ``` ## RdbPredicates -- GitLab