Beispiel #1
0
 @Override
 public final boolean accept(final ASTVisitor visitor) {
   if (exprs.length == 0) {
     if (oneOf(func, COLLECTION, URI_COLLECTION) && !visitor.lock(DBLocking.COLL)) return false;
   } else if (!(exprs[0] instanceof Str)) {
     if (!visitor.lock(null)) return false;
   } else {
     final QueryInput qi = new QueryInput(string(((Str) exprs[0]).string()));
     if (qi.db == null && !visitor.lock(null)) return false;
     if (!visitor.lock(qi.db)) return false;
   }
   return super.accept(visitor);
 }
Beispiel #2
0
 @Override
 public final boolean accept(final ASTVisitor visitor) {
   if (exprs.length == 0) {
     if (!visitor.lock(null)) return false;
   } else {
     if (!dataLock(visitor, 0)) return false;
   }
   return super.accept(visitor);
 }