/** * ADVANCED: * Return an expression for the alias. * This allows an alias used in the select clause to be used in other clauses. */ public Expression alias(String alias) { return literal(alias); }
/** * ADVANCED: * Return an expression for the alias. * This allows an alias used in the select clause to be used in other clauses. */ public Expression alias(String alias) { return literal(alias); }
/** * 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: * 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: * 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)); }
/** * ADVANCED: * Assign an alias to the expression in the select clause. */ public Expression as(String alias) { ExpressionOperator operator = getOperator(ExpressionOperator.As); return operator.expressionFor(this, literal(alias)); }
/** * ADVANCED: * Assign an alias to the expression in the select clause. */ public Expression as(String alias) { ExpressionOperator operator = getOperator(ExpressionOperator.As); return operator.expressionFor(this, literal(alias)); }
/** * 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)); }
queryExpression = queryExpression.literal(functionName);
queryExpression = queryExpression.literal(functionName);