hint.setTtl(Long.valueOf(ttl.substring(4)));
hint.setTtl(Long.valueOf(ttl.substring(4)));
hint.setTtl(Long.valueOf(ttl.substring(4)));
if (cache) { CacheHint hint = new CacheHint(); hint.setTtl(getCacheTime()); hint.setScope(CacheDirective.Scope.USER); query.setCacheHint(hint);
public CacheHint clone() { CacheHint copy = new CacheHint(); copy.setInvalidation(this.getInvalidation()); copy.setPrefersMemory(this.getPrefersMemory()); copy.setReadAll(this.getReadAll()); copy.setScope(this.getScope()); copy.setTtl(this.getTtl()); copy.setUpdatable(this.getUpdatable()); copy.setMinRows(this.getMinRows()); return copy; }
public CacheHint clone() { CacheHint copy = new CacheHint(); copy.setInvalidation(this.getInvalidation()); copy.setPrefersMemory(this.getPrefersMemory()); copy.setReadAll(this.getReadAll()); copy.setScope(this.getScope()); copy.setTtl(this.getTtl()); copy.setUpdatable(this.getUpdatable()); copy.setMinRows(this.getMinRows()); return copy; }
public CacheHint clone() { CacheHint copy = new CacheHint(); copy.setInvalidation(this.getInvalidation()); copy.setPrefersMemory(this.getPrefersMemory()); copy.setReadAll(this.getReadAll()); copy.setScope(this.getScope()); copy.setTtl(this.getTtl()); copy.setUpdatable(this.getUpdatable()); copy.setMinRows(this.getMinRows()); return copy; }
@Test public void testExpandedCacheHint() { String sql = "/*+ cache( pref_mem ttl:2000) */ SELECT * FROM t1"; //$NON-NLS-1$ Query query = new Query(); Select select = new Select(); select.addSymbol(new MultipleElementSymbol()); query.setSelect(select); From from = new From(); UnaryFromClause ufc = new UnaryFromClause(); from.addClause(ufc); ufc.setGroup(new GroupSymbol("t1")); //$NON-NLS-1$ query.setFrom(from); CacheHint hint = new CacheHint(); hint.setPrefersMemory(true); hint.setTtl(Long.valueOf(2000)); query.setCacheHint(hint); TestParser.helpTest(sql, "/*+ cache(pref_mem ttl:2000) */ SELECT * FROM t1", query); //$NON-NLS-1$ }