Class SingleRowFunctions
java.lang.Object
io.github.torand.fastersql.function.singlerow.SingleRowFunctions
Provides factory methods for single row functions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Abs
abs
(Expression expression) Creates the absolute value function for a numeric expression.static Ceil
ceil
(Expression expression) Creates the ceiling function for a numeric expression.static Concat
concat
(Expression expression1, Expression expression2, Expression... otherExpressions) Creates the concatenation function for string expressions.static Floor
floor
(Expression expression) Creates the floor function for a numeric expression.static Length
length
(Expression expression) Creates the length function for a string expression.static Lower
lower
(Expression expression) Creates the lower case function for a string expression.static Round
round
(Expression expression) Creates the round function for a numeric expression.static Substring
substring
(Expression expression, int startPos, int length) Creates the substring function for a string expression.static ToChar
toChar
(Expression expression, String format) Creates the timestamp/number to string conversion function for an expression.static ToNumber
toNumber
(Expression expression, int precision) Creates the string to integer number conversion function for an expression.static ToNumber
toNumber
(Expression expression, int precision, int scale) Creates the string to decimal number conversion function for an expression.static Upper
upper
(Expression expression) Creates the upper case function for a string expression.
-
Method Details
-
upper
Creates the upper case function for a string expression.- Parameters:
expression
- the string expression.- Returns:
- the string function.
-
lower
Creates the lower case function for a string expression.- Parameters:
expression
- the string expression.- Returns:
- the string function.
-
toNumber
Creates the string to decimal number conversion function for an expression.- 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 string to integer number conversion function for an expression.- Parameters:
expression
- the string expression.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.
-
toChar
Creates the timestamp/number to string conversion function for an expression.- 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 concatenation function for 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.
-
round
Creates the round function for a numeric expression.- Parameters:
expression
- the numeric expression.- Returns:
- the numeric function.
-
abs
Creates the absolute value function for a numeric expression.- Parameters:
expression
- the numeric expression.- Returns:
- the numeric function.
-
ceil
Creates the ceiling function for a numeric expression.- Parameters:
expression
- the numeric expression.- Returns:
- the numeric function.
-
floor
Creates the floor function for a numeric expression.- Parameters:
expression
- the numeric expression.- Returns:
- the numeric function.
-