I am using following sql that will load data into cache
//There are 2 placeholders in the sql
String sql = "select * from person where id > ? and id < ?"
IgniteCache.loadCache(null, Integer.class.getName(), sql);
How could I set the parameters for the sql like the PreparedStatement
does?
Unfortunately Ignite doesn't support such formatting on loadCache(). You can just pass multiple queries:
IgniteCache.loadCache(null,
Integer.class.getName(), sql1,
Integer.class.getName(), sql2,
...);