哈萨尔卡斯特动态方式中的SQL查询

huangapple go评论68阅读模式
英文:

Hazelcast SQL queries in dynamic ways

问题

我正在处理Hazelcast SQL查询。

我有一个问题。

要通过键获取Hazelcast值,我正在使用

Predicate idPredicate = eo.key().get("id").equal("abc@gmail.com").and(eo.key().get("name").equal("alin"));

如何使其动态化,也就是说,在我们从用户那里获得输入时如何处理这些方法?

例如:

id='abc@gmail.com' and name='alin'

或者

id IN ('','') AND name IN ('','')

英文:

I'm working on Hazelcast SQL queries.

I have a question.

To fetch hazelcast value by key I'm using

Predicate idPredicate = eo.key().get("id").equal("abc@gmail.com").and(eo.key().get("name").equal("alin"));

how to make this dynamic i mean how to handle this methods when we get input from the user

For example:-

id='abc@gmail.com' and name='alin'

or

id IN ('','') AND name IN ('','')

答案1

得分: 1

你可以使用SqlPredicate。以下是一些示例:

英文:

You can use SqlPredicate. Here are some examples:

huangapple
  • 本文由 发表于 2020年7月24日 01:57:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/63060378.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定