if (scope != null) { scope = scope.substring(6); hint.setScope(scope);
if (scope != null) { scope = scope.substring(6); hint.setScope(scope);
if (scope != null) { scope = scope.substring(6); hint.setScope(scope);
CacheHint hint = new CacheHint(); hint.setTtl(getCacheTime()); hint.setScope(CacheDirective.Scope.USER); query.setCacheHint(hint);
hint.setScope(scope);
hint.setScope(scope);
hint.setScope(scope);
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 testCacheScope() { String sql = "/*+ cache(pref_mem scope:session) */ 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.setScope(Scope.SESSION); hint.setPrefersMemory(true); query.setCacheHint(hint); TestParser.helpTest(sql, "/*+ cache(pref_mem scope:SESSION) */ SELECT * FROM t1", query); //$NON-NLS-1$ }