hello
to just sum it up here... I've found a page which describes some queering
techniques (although it was under indexes section) -
https://apacheignite-sql.readme.io/docs/schema-and-indexes.
To make it run I needed to annotate my Key class like:
public class Key {
@QuerySqlField(index = true)
private int countryId;
private Date dateKey;
...
}
Set indexed types for cache configuration:
cfg.setIndexedTypes(Key.class, Dto.class);
And search:
SqlQuery<Key, Value> sql = new SqlQuery<>(Value.class, "countryId =
?");
try (QueryCursor<Entry<Key, Value>> cursor =
cache.query(sql.setArgs(2))) {
for (Entry<Key, Value> e : cursor) {
LOG.info("Found key = {}", e.getKey().toString());
LOG.info("Found value = {}", e.getValue().toString());
}
}
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/