我正在使用以下将数据加载到缓存中的SQL
//There are 2 placeholders in the sql
String sql = "select * from person where id > ? and id < ?"
IgniteCache.loadCache(null, Integer.class.getName(), sql);
我如何设置sql的参数,如PreparedStatement
呢?
答案 0 :(得分:1)
不幸的是,Ignite并不支持loadCache()上的这种格式化。您只需传递多个查询:
IgniteCache.loadCache(null,
Integer.class.getName(), sql1,
Integer.class.getName(), sql2,
...);