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

Ask Your Question
0

Query on collection size.

Hi is it possible in gigaspace to query the object based on the size of the collection it has. For e.g.

i have a class A, it has 1collection of type blocking queue. I add elemets into it. Now i need to query the space to fetch me all the objects of type Class A. whose query size has reached 4.

    ClassA obj = new ClassA();
    obj.setQueueId("HARVEY");
    obj.getQueue().put("TEST");
    obj.getQueue().put("TEST");
    obj.getQueue().put("TEST");
    obj.getQueue().put("TEST");

    gigaSpace.write(obj, WriteModifiers.WRITE_ONLY);

    SQLQuery<ClassA> query = new SQLQuery<ClassA>(ClassA.class, " Queue[*].size = 4");

asked 2014-09-10 02:04:29 -0500

Harvey gravatar image

updated 2014-09-10 02:23:59 -0500

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

Hi,

Currently this kind of query is not supported.

Regards,

Yuval

answered 2014-09-10 04:54:15 -0500

Yuval gravatar image
edit flag offensive delete link more

Comments

You can maintain a counter and use the change API to update it and the collection in one call.

Later you can query it as usual.

shay hassidim gravatar imageshay hassidim ( 2014-09-10 08:04:17 -0500 )edit

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: 2014-09-10 02:04:29 -0500

Seen: 65 times

Last updated: Sep 10 '14