Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

SQLQuery IN collections on 10.0.1

So I was looking at the documentation for this @ http://docs.gigaspaces.com/xap100/que...

It says I can use a collection to fill a parametrised IN operator, however using very similar syntax does not work at all for me in 10.0.1 -

Collection<string> collection = new HashSet<string>();

collection.add("12345");

SQLQuery<myclass> query = new SQLQuery<myclass>(MyClass.class,"userId IN (?)");

query.setParameter(1, collection);

System.out.println(space.readMultiple(query).length);

== 0 Doesn't work

However...

SQLQuery<myclass> query = new SQLQuery<myclass>(MyClass.class,"userId = ?");

query.setParameter(1, "12345");

System.out.println(space.readMultiple(query).length);

==8562 Works

SQLQuery<myclass> query = new SQLQuery<myclass>(MyClass.class,"userId IN ('12345')");

System.out.println(space.readMultiple(query).length);

==8562 Works

Anyone able to confirm this either way? just checking I'm not missing anything.

Am simply injecting the values into the query string myself in the meantime...

asked 2015-03-10 06:03:43 -0600

andrewgp0 gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

This issue was fixed in 10.1 version,which is scheduled to the end of this month,early access build is available.

answered 2015-03-11 04:22:29 -0600

Ester gravatar image
edit flag offensive delete link more
0

Great, thanks Ester for the response.

answered 2015-03-17 04:42:58 -0600

andrewgp0 gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-03-10 06:03:43 -0600

Seen: 232 times

Last updated: Mar 17 '15