コード例 #1
0
 /** Clones a SqlNode with a different position. */
 public SqlNode clone(SqlParserPos pos) {
   // REVIEW jvs 26-July-2006:  shouldn't pos be used here?  Or are
   // subclasses always supposed to override, in which case this
   // method should probably be abstract?
   try {
     return (SqlNode) super.clone();
   } catch (CloneNotSupportedException e) {
     throw Util.newInternal(e, "error while cloning " + this);
   }
 }
コード例 #2
0
 /**
  * Creates a node.
  *
  * @param pos Parser position, must not be null.
  */
 SqlNode(SqlParserPos pos) {
   Util.pre(pos != null, "pos != null");
   this.pos = pos;
 }
コード例 #3
0
 /**
  * Validates this node in an expression context.
  *
  * <p>Usually, this method does much the same as {@link #validate}, but a {@link SqlIdentifier}
  * can occur in expression and non-expression contexts.
  */
 public void validateExpr(SqlValidator validator, SqlValidatorScope scope) {
   validate(validator, scope);
   Util.discard(validator.deriveType(scope, this));
 }