使用区分大小写的LIKE操作符进行过滤



我正在尝试使用LIKE操作符进行API调用,但它不返回数据大小写敏感。我该怎么做呢?到目前为止,我有:

queryEvent.query = queryEvent.combo.displayField + " like " + "'%" + query + "%'";

和它生成的过滤器:filter=name%20like%20%27%25Test%25%27

生成的内容使用URL编码。您需要对其进行解码以获得实际值。使用任何标准的URL解码器库来做同样的事情。

或者使用下面的程序

public String decodeURL (String url){
try {
String result = java.net.URLDecoder.decode(url, StandardCharsets.UTF_8.name());
return result;
} catch (UnsupportedEncodingException e) {
// not going to happen - value came from JDK's own StandardCharsets
}
return url;
}

最新更新