May be that's a missing feature! I was also struggling for the same. And
wish to see support :)

In my case, I have named query exactly similar to what you mentioned but
with extra configuration parameter which informs my query engine that given
named query accepts list/set as first position.

Arguments may look like "1,2,3" as simple string though but later on based
on extra information I supply my engine replaces $1 with 1,2,3 literal and
appends it to same query.

So it may become,
select key from /XYZ.entrySet where key in set (1,2,3) order by key

I have also maintained argument binding to take care of generic datatype of
list/set.

Regards,
Dharam

On Oct 13, 2017 22:36, "Xu, Nan" <[email protected]> wrote:

Hi,



   For this query



String queryString = "select key from /"+ dataRegionName+".entrySet where
key in set ($1) order by key";

Object[] params = new Object[1];

params[0] = new HashSet<String>(keys);

Query query = queryService.newQuery(queryString);

SelectResults<String> result = (SelectResults<String>)
query.execute(params);







How do I bind the parameter?



Put a set/list is not working



Thanks,

Nan




------------------------------
This message, and any attachments, is for the intended recipient(s) only,
may contain information that is privileged, confidential and/or proprietary
and subject to important terms and conditions available at
http://www.bankofamerica.com/emaildisclaimer. If you are not the intended
recipient, please delete this message.

Reply via email to