From 9d6b12b6df199b590bbdb54f351f9d7048d39b42 Mon Sep 17 00:00:00 2001 From: wuyongning Date: Fri, 15 Jul 2022 14:35:59 +0800 Subject: [PATCH] fix error Signed-off-by: wuyongning --- .../reference/apis/js-apis-data-rdb.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 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 594c29417b..d66146a265 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 @@ -781,13 +781,6 @@ distinct(): RdbPredicates ```js let predicates = new data_rdb.RdbPredicates("EMPLOYEE") predicates.equalTo("NAME", "Rose").distinct("NAME") -let promise = rdbStore.query(predicates, ["NAME"]) -promise.then((resultSet) => { - console.log("ResultSet column names: " + resultSet.columnNames) - console.log("ResultSet column count: " + resultSet.columnCount) -}).catch((err) => { - console.log("Query err.") -}) ``` @@ -1133,7 +1126,7 @@ rdbStore.update("EMPLOYEE", valueBucket, predicates, function (err, ret) { ``` ### update9+ -update(table: string, values: ValuesBucket, predicates: DataSharePredicates):Promise<number> +update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates):Promise<number> 根据DataSharePredicates的指定实例对象更新数据库中的数据,结果以Promise形式返回。 @@ -1231,7 +1224,7 @@ promise.then((rows) => { ### delete9+ -delete(table: string, predicates: DataSharePredicates, callback: AsyncCallback<number>):void +delete(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback<number>):void 根据DataSharePredicates的指定实例对象从数据库中删除数据,结果以callback形式返回。 @@ -1354,7 +1347,7 @@ query(predicates: RdbPredicates, columns?: Array<string>):Promise<Resul ### query9+ -query(predicates: DataSharePredicates, columns: Array<string>, callback: AsyncCallback<ResultSet>):void +query(predicates: dataSharePredicates.DataSharePredicates, columns: Array<string>, callback: AsyncCallback<ResultSet>):void 根据指定条件查询数据库中的数据,结果以callback形式返回。 @@ -1384,7 +1377,7 @@ rdbStore.query("EMPLOYEE", predicates, ["ID", "NAME", "AGE", "SALARY", "CODES"], ### query9+ -query(predicates: DataSharePredicates, columns?: Array<string>):Promise<ResultSet> +query(predicates: dataSharePredicates.DataSharePredicates, columns?: Array<string>):Promise<ResultSet> 根据指定条件查询数据库中的数据,结果以Promise形式返回。 -- GitLab