Hello Taras, thanks, this example is showing a normal query with a fixed value, this is working, the problem is passing a parameter to the predicate.
Cheers, Guilherme Melo www.gmelo.org On 6 July 2017 at 22:18, Taras Ledkov <tled...@gridgain.com> wrote: > Hi, > > Sure, please take a look at the example: > https://github.com/apache/ignite/blob/master/examples/ > src/main/java/org/apache/ignite/examples/datagrid/ > CacheQueryExample.java#L155 > > On 06.07.2017 11:13, Guilherme Melo wrote: > > Hello, I am having problems submitting a query to the service from a > client. Using the example from the documentation: > > IgniteCache<Long, Person> cache = ignite.cache("mycache"); > int sal = 100// Find only persons earning more than 1,000.try (QueryCursor > cursor = cache.query(new ScanQuery((k, p) -> p.getSalary() > sal)) { > for (Person p : cursor) > System.out.println(p.toString()); > } > > > It fails silently. I have also tried creating a class that implements the > IgniteBiPredicate that takes the value as a parameter on the constructor. > Has anyone had experience pushing a scan query with parameters? > Thanks ! > > > -- > Taras Ledkov > Mail-To: tled...@gridgain.com > >