From 084262642bbb95043ae45affe41befb77bde48cf Mon Sep 17 00:00:00 2001 From: wangkai Date: Wed, 18 Jan 2023 16:15:29 +0800 Subject: [PATCH] fixed 78069bd from https://gitee.com/wangkai0102/docs/pulls/13773 change 1_18 Signed-off-by: wangkai --- .../application-dev/database/database-mdds-guidelines.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zh-cn/application-dev/database/database-mdds-guidelines.md b/zh-cn/application-dev/database/database-mdds-guidelines.md index 7d5a418246..5739c6454c 100644 --- a/zh-cn/application-dev/database/database-mdds-guidelines.md +++ b/zh-cn/application-dev/database/database-mdds-guidelines.md @@ -17,9 +17,9 @@ | getKVStore<T extends KVStore>(storeId: string, options: Options, callback: AsyncCallback<T>): void
getKVStore<T extends KVStore>(storeId: string, options: Options): Promise<T> | 指定`Options`和`storeId`,创建并获取指定类型`KVStore`数据库。 | | put(key: string, value: Uint8Array\|string\|number\|boolean, callback: AsyncCallback<void>): void
put(key: string, value: Uint8Array\|string\|number\|boolean): Promise<void> | 插入和更新数据。 | | delete(key: string, callback: AsyncCallback<void>): void
delete(key: string): Promise<void> | 删除数据。 | -| get(key: string, callback: AsyncCallback<Uint8Array\|string\|boolean\|number>): void
get(key: string): Promise<Uint8Array\|string\|boolean\|number> | 查询数据。 | +| get(key: string, callback: AsyncCallback<Uint8Array\|string\|boolean\|number>): void
get(key: string): Promise<Uint8Array\|string\|boolean\|number> | 获取数据。 | | on(event: 'dataChange', type: SubscribeType, observer: Callback<ChangeNotification>): void
on(event: 'syncComplete', syncCallback: Callback<Array<[string,number]>>): void | 订阅数据库中数据的变化。 | -| sync(deviceIdList: string[], mode: SyncMode, allowedDelayMs?: number): void | 在手动模式下,触发数据库同步。 | +| sync(deviceIdList: string[], mode: SyncMode, delayMs?: number): void | 在手动模式下,触发数据库同步。 | ## 开发步骤 @@ -61,7 +61,7 @@ context.requestPermissionsFromUser(['ohos.permission.DISTRIBUTED_DATASYNC'], 666).then((data) => { console.info('success: ${data}'); }).catch((error) => { - console.info('failed: ${error}'); + console.error('failed: ${error}'); }) } @@ -83,7 +83,7 @@ context.requestPermissionsFromUser(permissions).then((data) => { console.log('success: ${data}'); }).catch((error) => { - console.log('failed: ${error}'); + console.error('failed: ${error}'); }); } -- GitLab