/** * Constructs query for the given type name and SQL query. * * @param type Type. * @param sql SQL Query. */ public SqlQuery(String type, String sql) { setType(type); setSql(sql); }
/** * Constructs query for the given type and SQL query. * * @param type Type. * @param sql SQL Query. */ public SqlQuery(Class<?> type, String sql) { setType(type); setSql(sql); }
/** {@inheritDoc} */ @Override public List<Cache.Entry<Integer, GridCacheQueryTestValue>> call() throws Exception { IgniteCache<Integer, GridCacheQueryTestValue> c = ignite.cache(CACHE_NAME); String sqlStr = "FROM GridCacheQueryTestValue WHERE fieldname = ?"; SqlQuery<Integer, GridCacheQueryTestValue> sql = new SqlQuery<>(GridCacheQueryTestValue.class, sqlStr); sql.setArgs("C"); return c.query(sql.setSql(sqlStr)).getAll(); } }
/** * Constructs query for the given type and SQL query. * * @param type Type. * @param sql SQL Query. */ public SqlQuery(Class<?> type, String sql) { setType(type); setSql(sql); }
/** * Constructs query for the given type name and SQL query. * * @param type Type. * @param sql SQL Query. */ public SqlQuery(String type, String sql) { setType(type); setSql(sql); }