From 9ed4dd08ea6bafb9ba7e96152903f1d91e3dc893 Mon Sep 17 00:00:00 2001 From: annie_wangli Date: Sat, 19 Feb 2022 12:31:45 +0800 Subject: [PATCH 1/2] update docs Signed-off-by: annie_wangli --- .../reference/apis/js-apis-data-rdb.md | 67 +------------------ 1 file changed, 1 insertion(+), 66 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-data-rdb.md b/en/application-dev/reference/apis/js-apis-data-rdb.md index 50d8dbd9046..ffef95aa4dd 100644 --- a/en/application-dev/reference/apis/js-apis-data-rdb.md +++ b/en/application-dev/reference/apis/js-apis-data-rdb.md @@ -66,7 +66,7 @@ Obtains a relational database \(RDB\) store. You can set parameters for the RDB ``` import dataRdb from '@ohos.data.rdb' - const STORE_CONFIG = { name: "RdbTest.db", encryptKey: new Uint8Array([1, 2])} + const STORE_CONFIG = { name: "RdbTest.db"} const SQL_CREATE_TABLE = "CREATE TABLE IF NOT EXISTS EMPLOYEE (ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT NOT NULL, AGE INTEGER, SALARY REAL, CODES BLOB)" dataRdb.getRdbStore(STORE_CONFIG, 1, function (err, rdbStore) { rdbStore.executeSql(SQL_CREATE_TABLE) @@ -2607,63 +2607,6 @@ Changes the encryption key of the RDB store. This method uses a callback to retu ``` -### changeEncryptKey8+ - -changeEncryptKey\(newEncryptKey:Uint8Array\): Promise - -Changes the encryption key of the RDB store. This method uses a promise to return the result. - -- Parameters - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

newEncryptKey

-

Uint8Array

-

Yes

-

New encryption key. This parameter cannot be empty.

-
- -- Return values - - - - - - - - - - -

Type

-

Description

-

Promise<number>

-

Promise used to return the result.

-
- -- Example - - ``` - var newKey = new Uint8Array([1, 2]) - let promise = rdbStore.changeEncryptKey(newKey) - promise.then((ret) => { - console.info(TAG + "result is " + ret)}) - ``` - ## StoreConfig @@ -2689,14 +2632,6 @@ Manages the configuration of an RDB store.

Database file name.

-

encryptKey (BETA)8+

- -

Uint8Array

- -

No

- -

Key used to encrypt the RDB store. If a key is added during the creation of an RDB store, the key is required each time you open the RDB store.

- -- Gitee From 453bdcd959a3ab80a3542891c94e9daca9f9fc6a Mon Sep 17 00:00:00 2001 From: annie_wangli Date: Sat, 19 Feb 2022 12:36:39 +0800 Subject: [PATCH 2/2] update docs Signed-off-by: annie_wangli --- .../reference/apis/js-apis-data-rdb.md | 51 ------------------- 1 file changed, 51 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-data-rdb.md b/en/application-dev/reference/apis/js-apis-data-rdb.md index ffef95aa4dd..f8aa9aa6ee3 100644 --- a/en/application-dev/reference/apis/js-apis-data-rdb.md +++ b/en/application-dev/reference/apis/js-apis-data-rdb.md @@ -2557,57 +2557,6 @@ Runs the SQL statement that contains the specified parameters but does not retur ``` -### changeEncryptKey8+ - -changeEncryptKey\(newEncryptKey:Uint8Array, callback: AsyncCallback\):void - -Changes the encryption key of the RDB store. This method uses a callback to return the result. - -- Parameters - - - - - - - - - - - - - - - - - - - -

Name

-

Type

-

Mandatory

-

Description

-

newEncryptKey

-

Uint8Array

-

Yes

-

New encryption key. This parameter cannot be empty.

-

callback

-

AsyncCallback<number>

-

Yes

-

Callback invoked to return the result.

-
- - -- Example - - ``` - var newKey = new Uint8Array([1, 2]) - rdbStore.changeEncryptKey(newKey, function (ret) { - console.info(TAG + "result is " + ret)}) - ``` - - - ## StoreConfig Manages the configuration of an RDB store. -- Gitee