From acf8579e1d896225d5d2079dc60bcfd906df7ff1 Mon Sep 17 00:00:00 2001 From: asfasdff Date: Fri, 7 Jan 2022 22:10:37 +0800 Subject: [PATCH] fix up Signed-off-by: asfasdff --- .../apis/js-apis-distributed-data.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/zh-cn/application-dev/reference/apis/js-apis-distributed-data.md b/zh-cn/application-dev/reference/apis/js-apis-distributed-data.md index 50a15f3cce..51e13dd2a0 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-distributed-data.md +++ b/zh-cn/application-dev/reference/apis/js-apis-distributed-data.md @@ -3421,6 +3421,101 @@ setSuggestIndex(index: string): Query; ``` +### deviceId8+ ### + +deviceId(deviceId:string):Query; + +添加设备ID作为key的前缀。 + +- 参数: + + + + + + + + + + + + +

参数名

+

类型

+

必填

+

说明

+

deviceId

+

string

+

+

指示查询的设备 ID。

+
+ +- 返回值: + + + + + + + + + + +

类型

+

说明

+

Query

+

返回查询对象。

+
+ +- 示例 + + ``` + try { + let query = new distributedData.Query(); + query.deviceId("deviceId"); + console.log("query is " + query.getSqlLike()); + } catch (e) { + console.log("should be ok on Method Chaining : " + e); + } + ``` + + +### getSqlLike8+ ### + +getSqlLike():string; + +获取指定Query对象的查询语句。 + +- 返回值: + + + + + + + + + + +

类型

+

说明

+

string

+

返回指定Query对象的查询语句。

+
+ +- 示例 + + ``` + try { + let query = new distributedData.Query(); + let sql1 = query.getSqlLike(); + console.log("GetSqlLike sql=" + sql1); + } catch (e) { + console.log("dumplicated calls should be ok : " + e); + } + ``` + + ## KVStore KVStore数据库实例,提供增加数据、删除数据和订阅数据变更、订阅同步完成的方法。在调用KVStore的方法前,需要先通过getKVStore构建一个KVStore实例。 -- GitLab