diff --git a/zh-cn/application-dev/reference/.idea/.gitignore b/zh-cn/application-dev/reference/.idea/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..73f69e0958611ac6e00bde95641f6699030ad235 --- /dev/null +++ b/zh-cn/application-dev/reference/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/zh-cn/application-dev/reference/.idea/modules.xml b/zh-cn/application-dev/reference/.idea/modules.xml new file mode 100644 index 0000000000000000000000000000000000000000..a91879166c45ce2420e19af2d4949279e74ac125 --- /dev/null +++ b/zh-cn/application-dev/reference/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/zh-cn/application-dev/reference/.idea/reference.iml b/zh-cn/application-dev/reference/.idea/reference.iml new file mode 100644 index 0000000000000000000000000000000000000000..bc2cd87409057301f546d83bd548111b9a241cb1 --- /dev/null +++ b/zh-cn/application-dev/reference/.idea/reference.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/zh-cn/application-dev/reference/.idea/vcs.xml b/zh-cn/application-dev/reference/.idea/vcs.xml new file mode 100644 index 0000000000000000000000000000000000000000..c2365ab11f9ba6b763735c8fd976420234bb3521 --- /dev/null +++ b/zh-cn/application-dev/reference/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/js-apis-data-dataSharePredicates.md b/zh-cn/application-dev/reference/apis/js-apis-data-dataSharePredicates.md index 1474f5cacb6c970a4aa6d81103371ed93c0b0796..1bb49b8d9a023a725ce26600a2c8f3f602f3bd59 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-data-dataSharePredicates.md +++ b/zh-cn/application-dev/reference/apis/js-apis-data-dataSharePredicates.md @@ -2,6 +2,8 @@ **谓词(DataSharePredicates)** 是用户通过DataShare查询数据库中的数据所使用的筛选条件,经常被应用在更新数据([update](js-apis-data-dataShare.md#update))、删除数据([delete](js-apis-data-dataShare.md#delete))和查询数据([query](js-apis-data-dataShare.md#query))中。 +谓词的接口函数与数据库的筛选条件一一对应,用户在使用前需预备数据库相关知识。 + > **说明:** > > 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 @@ -336,7 +338,7 @@ predicates.isNotNull("NAME") like(field: string, value: string): DataSharePredicates -该接口用于配置谓词以匹配值类似于指定字符串的字段。 +该接口用于配置谓词以匹配通配符指定模式的字段。 目前仅RDB及KVDB(schema)支持该谓词。 @@ -347,7 +349,9 @@ like(field: string, value: string): DataSharePredicates | 参数名 | 类型 | 必填 | 说明 | | ------ | ------ | ---- | ---------------------- | | field | string | 是 | 数据库表中的列名。 | -| value | string | 是 | 指示要与谓词匹配的值。 | +| value | string | 是 | 指示要与谓词匹配的通配符。 | + +value为数据库专用通配符,'%'代表零个、一个或多个数字或字符,'_'代表一个单一的数字或字符,不区分大小写。 **返回值:** @@ -366,7 +370,7 @@ predicates.like("NAME", "%os%") unlike(field: string, value: string): DataSharePredicates -该接口用于配置谓词以匹配值不类似于指定字符串的字段。 +该接口用于配置谓词以匹配不类似通配符指定模式的字段。 目前仅RDB及KVDB(schema)支持该谓词。 @@ -377,7 +381,9 @@ unlike(field: string, value: string): DataSharePredicates | 参数名 | 类型 | 必填 | 说明 | | ------ | ------ | ---- | ---------------------- | | field | string | 是 | 数据库表中的列名。 | -| value | string | 是 | 指示要与谓词匹配的值。 | +| value | string | 是 | 指示要与谓词匹配的通配符。 | + +value为数据库专用通配符,'%'代表零个、一个或多个数字或字符,'_'代表一个单一的数字或字符,不区分大小写。 **返回值:** @@ -396,7 +402,7 @@ predicates.unlike("NAME", "%os%") glob(field: string, value: string): DataSharePredicates -该接口用于配置谓词匹配数据类型为string的指定字段。 +该接口用于配置谓词匹配通配符指定模式的字段。 目前仅RDB支持该谓词。 @@ -407,7 +413,9 @@ glob(field: string, value: string): DataSharePredicates | 参数名 | 类型 | 必填 | 说明 | | ------ | ------ | ---- | ---------------------- | | field | string | 是 | 数据库表中的列名。 | -| value | string | 是 | 指示要与谓词匹配的值。 | +| value | string | 是 | 指示要与谓词匹配的通配符。 | + +value为数据库专用通配符,'*'代表零个、一个或多个数字或字符,'?'代表一个单一的数字或字符,区分大小写。 **返回值:** @@ -426,7 +434,7 @@ predicates.glob("NAME", "?h*g") between(field: string, low: ValueType, high: ValueType): DataSharePredicates -该接口用于配置谓词以匹配值在指定范围内的字段。 +该接口用于配置谓词以匹配值在指定范围内的字段。包含两端边界值,为左闭右闭区间。 目前仅RDB支持该谓词。 @@ -457,7 +465,7 @@ predicates.between("AGE", 10, 50) notBetween(field: string, low: ValueType, high: ValueType): DataSharePredicates -该接口用于配置谓词以匹配值超出指定范围的字段。 +该接口用于配置谓词以匹配值超出指定范围的字段。不包含两端边界值,为左开右开区间。 目前仅RDB支持该谓词。 @@ -889,4 +897,4 @@ inKeys(keys: Array<string>): DataSharePredicates ```ts let predicates = new dataSharePredicates.DataSharePredicates() predicates.inKeys(["Lisa", "Rose"]) -``` +``` \ No newline at end of file