Class SingleRowFunctions
java.lang.Object
io.github.torand.fastersql.function.singlerow.SingleRowFunctions
Provides factory methods for single row functions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Absabs(Expression expression) Creates the ABS function for a numeric expression.static AbsCreates the ABS function for a numeric constant value.static CastBuildercast(Expression expression) Creates the CAST function for an expression.static CastBuilderCreates the CAST function for a constant value.static CastBuilderCreates the CAST function for a constant value.static Ceilceil(Expression expression) Creates the CEIL function for a numeric expression.static CeilCreates the CEIL function for a numeric constant value.static Concatconcat(Expression expression1, Expression expression2, Expression... otherExpressions) Creates the CONCAT function for two or more string expressions.static Expexp(Expression expression) Creates the EXP (natural exponential) function for a numeric expression.static ExpCreates the EXP (natural exponential) function for a numeric constant value.static Floorfloor(Expression expression) Creates the FLOOR function for a numeric expression.static FloorCreates the FLOOR function for a numeric constant value.static Lengthlength(Expression expression) Creates the LENGTH function for a string expression.static LengthCreates the LENGTH function for a string constant value.static Lnln(Expression expression) Creates the LN (natural logarithm) function for a numeric expression.static LnCreates the LN (natural logarithm) function for a numeric constant value.static Lowerlower(Expression expression) Creates the LOWER function for a string expression.static LowerCreates the LOWER function for a string constant value.static Powerpow(Expression base, Expression exponent) Creates the POW (exponentiation) function for a numeric expression.static Powerpow(Expression base, Number exponent) Creates the POW (exponentiation) function for a numeric expression with constant value exponent.static Roundround(Expression expression) Creates the ROUND function for a numeric expression.static RoundCreates the ROUND function for a numeric constant value.static Sqrtsqrt(Expression expression) Creates the SQRT (square root) function for a numeric expression.static SqrtCreates the SQRT (square root) function for a numeric constant value.static Substringsubstring(Expression expression, int startPos, int length) Creates the SUBSTRING function for a string expression.static SubstringCreates the SUBSTRING function for a string constant value.static ToChartoChar(Expression expression, String format) Creates the TO_CHAR function converting from a timestamp/number expression to string.static ToNumbertoNumber(Expression expression, int precision) Creates the TO_NUMBER function converting from a string expression to integer.static ToNumbertoNumber(Expression expression, int precision, int scale) Creates the TO_NUMBER function converting from a string expression to decimal number.static ToNumberCreates the TO_NUMBER function converting from a string constant value to integer.static ToNumberCreates the TO_NUMBER function converting from a string constant value to decimal number.static Upperupper(Expression expression) Creates the UPPER function for a string expression.static UpperCreates the UPPER function for a string constant value.
-
Method Details
-
upper
Creates the UPPER function for a string expression.- Parameters:
expression- the string expression.- Returns:
- the string function.
-
upper
Creates the UPPER function for a string constant value.- Parameters:
constantValue- the string value.- Returns:
- the string function.
-
lower
Creates the LOWER function for a string expression.- Parameters:
expression- the string expression.- Returns:
- the string function.
-
lower
Creates the LOWER function for a string constant value.- Parameters:
constantValue- the string value.- Returns:
- the string function.
-
toNumber
Creates the TO_NUMBER function converting from a string expression to decimal number.- Parameters:
expression- the string expression.precision- the total number of digits (including decimals).scale- the number of decimals.- Returns:
- the conversion function.
-
toNumber
Creates the TO_NUMBER function converting from a string constant value to decimal number.- Parameters:
constantValue- the string value.precision- the total number of digits (including decimals).scale- the number of decimals.- Returns:
- the conversion function.
-
toNumber
Creates the TO_NUMBER function converting from a string expression to integer.- Parameters:
expression- the string expression.precision- the total number of digits.- Returns:
- the conversion function.
-
toNumber
Creates the TO_NUMBER function converting from a string constant value to integer.- Parameters:
constantValue- the string value.precision- the total number of digits.- Returns:
- the conversion function.
-
substring
Creates the SUBSTRING function for a string expression.- Parameters:
expression- the string expression.startPos- the substring start position, 1-based.length- the substring length.- Returns:
- the string function.
-
substring
Creates the SUBSTRING function for a string constant value.- Parameters:
constantValue- the string value.startPos- the substring start position, 1-based.length- the substring length.- Returns:
- the string function.
-
toChar
Creates the TO_CHAR function converting from a timestamp/number expression to string.- Parameters:
expression- the timestamp or number expression.format- the format specifier.- Returns:
- the conversion function.
-
concat
public static Concat concat(Expression expression1, Expression expression2, Expression... otherExpressions) Creates the CONCAT function for two or more string expressions.- Parameters:
expression1- the first string expression.expression2- the second string expression.otherExpressions- the additional string expressions.- Returns:
- the string function.
-
length
Creates the LENGTH function for a string expression.- Parameters:
expression- the string expression.- Returns:
- the string function.
-
length
Creates the LENGTH function for a string constant value.- Parameters:
constantValue- the string value.- Returns:
- the string function.
-
round
Creates the ROUND function for a numeric expression.- Parameters:
expression- the numeric expression.- Returns:
- the numeric function.
-
round
Creates the ROUND function for a numeric constant value.- Parameters:
constantValue- the numeric value.- Returns:
- the numeric function.
-
abs
Creates the ABS function for a numeric expression.- Parameters:
expression- the numeric expression.- Returns:
- the numeric function.
-
abs
Creates the ABS function for a numeric constant value.- Parameters:
constantValue- the numeric value.- Returns:
- the numeric function.
-
ceil
Creates the CEIL function for a numeric expression.- Parameters:
expression- the numeric expression.- Returns:
- the numeric function.
-
ceil
Creates the CEIL function for a numeric constant value.- Parameters:
constantValue- the numeric value.- Returns:
- the numeric function.
-
floor
Creates the FLOOR function for a numeric expression.- Parameters:
expression- the numeric expression.- Returns:
- the numeric function.
-
floor
Creates the FLOOR function for a numeric constant value.- Parameters:
constantValue- the numeric value.- Returns:
- the numeric function.
-
ln
Creates the LN (natural logarithm) function for a numeric expression.- Parameters:
expression- the numeric expression.- Returns:
- the numeric function.
-
ln
Creates the LN (natural logarithm) function for a numeric constant value.- Parameters:
constantValue- the numeric value.- Returns:
- the numeric function.
-
exp
Creates the EXP (natural exponential) function for a numeric expression.- Parameters:
expression- the numeric expression.- Returns:
- the numeric function.
-
exp
Creates the EXP (natural exponential) function for a numeric constant value.- Parameters:
constantValue- the numeric value.- Returns:
- the numeric function.
-
sqrt
Creates the SQRT (square root) function for a numeric expression.- Parameters:
expression- the numeric expression.- Returns:
- the numeric function.
-
sqrt
Creates the SQRT (square root) function for a numeric constant value.- Parameters:
constantValue- the numeric value.- Returns:
- the numeric function.
-
pow
Creates the POW (exponentiation) function for a numeric expression.- Parameters:
base- the numeric base expression.exponent- the numeric exponent expression.- Returns:
- the numeric function.
-
pow
Creates the POW (exponentiation) function for a numeric expression with constant value exponent.- Parameters:
base- the numeric base expression.exponent- the numeric exponent value.- Returns:
- the numeric function.
-
cast
Creates the CAST function for an expression.- Parameters:
expression- the expression.- Returns:
- the CAST function builder.
-
cast
Creates the CAST function for a constant value.- Parameters:
value- the constant value.- Returns:
- the CAST function builder.
-
cast
Creates the CAST function for a constant value.- Parameters:
value- the constant value.- Returns:
- the CAST function builder.
-