问题描述
我要查询'a','ab','abc'
I want to query 'a', 'ab', 'abc'
way(其中:{field:{like:a%}} )无法执行。
way( where: {field: {like: a%} } ) is unable.
'like'运算符。
推荐答案
Composer查询语言目前不支持'SQL like' LIKE
格式,例如'%'或通过CQL的正则表达式正则表达式,并依赖于基础CouchDB Mango QL。随时在如果愿意的话。
Composer Query Language presently doesn't support 'SQL like' LIKE
format such as '%' or regex regexes via CQL, and reliant on the underlying CouchDB Mango QL. Feel free to raise an issue on this at https://github.com/hyperledger/composer/issues/ if you wish.
您现在必须在WHERE子句中进行或匹配-或在数组字段中使用CONTAINS。
You would have to do 'OR' matches in your WHERE clause presently - or use CONTAINS in an array field.
在此处查看查询语言中使用的查询示例-> 并在此处-> (向下滚动到第8项)
See examples of queries used in the Query language here -> https://hyperledger.github.io/composer/latest/tutorials/queries and here -> https://github.com/hyperledger/composer-knowledge-wiki/blob/latest/knowledge.md#information_source--queries-and-query-support--examples (scroll down to item 8 onwards)
这篇关于如何查询以在Hyperledger作曲家查询中包含特定单词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!