/** * PUBLIC: * Return a new expression that applies the function to the given expression. */ public static Expression acos(Expression expression) { ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Acos); return anOperator.expressionFor(expression); }
private static final ExpressionOperator createCoalesceOperator() { ListExpressionOperator operator = (ListExpressionOperator) ExpressionOperator.coalesce(); operator.setStartString("VALUE("); operator.setSelector(ExpressionOperator.Coalesce); return operator; }
/** * PUBLIC: * Extract the date part from the date/time value. * EXTRACT is part of the SQL standard, so should be supported by most databases. * @param part is the date part to extract, "YEAR", "MONTH", "DAY", "HOUR", "MINUTE", "SECOND", "TIMEZONE_HOUR", "TIMEZONE_MINUTE". */ public Expression extract(String part) { ExpressionOperator anOperator = getOperator(ExpressionOperator.Extract); return anOperator.expressionFor(this, literal(part)); }
/** * PUBLIC: * Return a new expression that applies the function to the given expression. */ public static Expression atan2(Expression expression1, Expression expression2) { ExpressionOperator anOperator = expression1.getOperator(ExpressionOperator.Atan2); return anOperator.expressionFor(expression1, expression2); }
/** * PUBLIC: * Cast the value to the database type. * CAST is part of the SQL standard, so should be supported by most databases. * @param type is the database type name, this is database specific but should include, "CHAR", "VARCHAR", "NUMERIC", "INTEGER", "DATE", "TIME", "TIMESTAMP", * the type may include a size and scale. */ public Expression cast(String type) { ExpressionOperator anOperator = getOperator(ExpressionOperator.Cast); return anOperator.expressionFor(this, literal(type)); }
/** * PUBLIC: * Return a new expression that applies the function to the given expression. */ public static Expression ceil(Expression expression) { ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Ceil); return anOperator.expressionFor(expression); }
/** * PUBLIC: * Return a new expression that applies the function to the given expression. */ public static Expression floor(Expression expression) { ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Floor); return anOperator.expressionFor(expression); }
/** * PUBLIC: * Return a new expression that applies the function to the given expression. */ public static Expression mod(Expression expression, Object base) { ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Mod); return anOperator.expressionFor(expression, base); }
/** * PUBLIC: * Return a new expression that applies the function to the given expression. */ public static Expression sign(Expression expression) { ExpressionOperator anOperator = expression.getOperator(ExpressionOperator.Sign); return anOperator.expressionFor(expression); }
/** * PUBLIC: * Function, returns the single character strings ascii value. */ public Expression asciiValue() { ExpressionOperator anOperator = getOperator(ExpressionOperator.Ascii); return anOperator.expressionFor(this); }
/** * PUBLIC: * Function, returns the date converted to the string value in the default database format. */ public Expression dateToString() { ExpressionOperator anOperator = getOperator(ExpressionOperator.DateToString); return anOperator.expressionFor(this); }
/** * INTERNAL: * Return an expression representing an outer join comparison */ // cr3546 public Expression equalOuterJoin(Object theValue) { ExpressionOperator anOperator = getOperator(ExpressionOperator.EqualOuterJoin); return anOperator.expressionFor(this, theValue); }
/** * PUBLIC: * Function, returns the string with the substring trimed from the right. */ public Expression rightTrim(Object substring) { ExpressionOperator anOperator = getOperator(ExpressionOperator.RightTrim2); return anOperator.expressionFor(this, substring); }
/** * PUBLIC: * Function, returns the date rounded to the year, month or day. */ public Expression roundDate(Object yearOrMonthOrDayRoundToken) { ExpressionOperator anOperator = getOperator(ExpressionOperator.RoundDate); return anOperator.expressionFor(this, yearOrMonthOrDayRoundToken); }
/** * PUBLIC: * Return a intersect expression with the subquery. */ public Expression intersect(Expression arguments) { ExpressionOperator anOperator = getOperator(ExpressionOperator.Intersect); return anOperator.expressionFor(this, arguments); }
/** * PUBLIC: * Function, returns the date with the next day from the source date as the day name given. */ public Expression nextDay(Object dayName) { ExpressionOperator anOperator = getOperator(ExpressionOperator.NextDay); return anOperator.expressionFor(this, dayName); }
/** * PUBLIC: * Function, returns the string right trimmed for white space. */ public Expression rightTrim() { ExpressionOperator anOperator = getOperator(ExpressionOperator.RightTrim); return anOperator.expressionFor(this); }
/** * PUBLIC: * Function, returns the number converted from the string. */ public Expression toNumber() { ExpressionOperator anOperator = getOperator(ExpressionOperator.ToNumber); return anOperator.expressionFor(this); }
/** * PUBLIC: * Function, returns the string trimmed for white space. */ public Expression trim() { ExpressionOperator anOperator = getOperator(ExpressionOperator.Trim); return anOperator.expressionFor(this); }
/** * PUBLIC: * Return a except expression with the subquery. */ public Expression except(Expression arguments) { ExpressionOperator anOperator = getOperator(ExpressionOperator.Except); return anOperator.expressionFor(this, arguments); }