public SQLDataTypeImpl(String name, SQLExpr arg) { this(name); addArgument(arg); }
public SQLDataTypeImpl(String name, int precision, int scale) { this(name); addArgument(new SQLIntegerExpr(precision)); addArgument(new SQLIntegerExpr(scale)); }
public void cloneTo(SQLDataTypeImpl x) { x.dbType = dbType; x.name = name; x.nameHashCode64 = nameHashCode64; for (SQLExpr arg : arguments) { x.addArgument(arg.clone()); } x.withTimeZone = withTimeZone; x.withLocalTimeZone = withLocalTimeZone; x.zerofill = zerofill; x.unsigned = unsigned; }
public SQLDataTypeImpl(String name, int precision) { this(name); addArgument(new SQLIntegerExpr(precision)); }
public SQLDataTypeImpl(String name, SQLExpr arg) { this(name); addArgument(arg); }
public SQLDataTypeImpl(String name, int precision, int scale) { this(name); addArgument(new SQLIntegerExpr(precision)); addArgument(new SQLIntegerExpr(scale)); }
public void cloneTo(SQLDataTypeImpl x) { x.dbType = dbType; x.name = name; x.nameHashCode64 = nameHashCode64; for (SQLExpr arg : arguments) { x.addArgument(arg.clone()); } x.withTimeZone = withTimeZone; x.withLocalTimeZone = withLocalTimeZone; x.zerofill = zerofill; x.unsigned = unsigned; }
public SQLDataTypeImpl(String name, int precision) { this(name); addArgument(new SQLIntegerExpr(precision)); }
timestamp.addArgument(this.expr()); accept(Token.RPAREN);
@Override public SQLExpr toExpression() { SQLCastExpr cast = new SQLCastExpr(); cast.setExpr(args.get(0).toExpression()); SQLDataTypeImpl dataType = new SQLDataTypeImpl("DECIMAL"); if (precision >= 0) { dataType.addArgument(new SQLIntegerExpr(precision)); } if (dec > 0) { dataType.addArgument(new SQLIntegerExpr(dec)); } cast.setDataType(dataType); return cast; }
@Override public SQLExpr toExpression() { SQLCastExpr cast = new SQLCastExpr(); cast.setExpr(args.get(0).toExpression()); SQLDataTypeImpl dataType = new SQLDataTypeImpl("NCAHR"); if (castLength >= 0) { dataType.addArgument(new SQLIntegerExpr(castLength)); } cast.setDataType(dataType); return cast; }
@Override public SQLExpr toExpression() { SQLCastExpr cast = new SQLCastExpr(); cast.setExpr(args.get(0).toExpression()); SQLDataTypeImpl dataType = new SQLDataTypeImpl("BINARY"); if (castLength >= 0) { dataType.addArgument(new SQLIntegerExpr(castLength)); } cast.setDataType(dataType); return cast; }
@Override public SQLExpr toExpression() { SQLCastExpr cast = new SQLCastExpr(); cast.setExpr(args.get(0).toExpression()); SQLDataTypeImpl dataType = new SQLDataTypeImpl("DATETIME"); if (decimals != Item.NOT_FIXED_DEC) { dataType.addArgument(new SQLIntegerExpr(decimals)); } cast.setDataType(dataType); return cast; }
@Override public SQLExpr toExpression() { SQLCastExpr cast = new SQLCastExpr(); cast.setExpr(args.get(0).toExpression()); SQLDataTypeImpl dataType = new SQLDataTypeImpl("TIME"); if (decimals != NOT_FIXED_DEC) { dataType.addArgument(new SQLIntegerExpr(decimals)); } cast.setDataType(dataType); return cast; }
timestamp.addArgument(this.expr()); accept(Token.RPAREN);