Class Expressions
java.lang.Object
org.springframework.data.relational.core.sql.Expressions
Factory for common
Expressions.- Since:
- 1.1
- Author:
- Mark Paluch, Jens Schauder
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Expressionasterisk()static Expressionstatic Expressioncast(Expression expression, String targetType) static ExpressionCreates a plainsqlExpression.static ExpressionCreates anExpressionbased on the provided list ofColumns.
-
Method Details
-
asterisk
- Returns:
- a new asterisk
*expression.
-
just
Creates a plainsqlExpression.- Parameters:
sql- the SQL, must not be null or empty.- Returns:
- a SQL
Expression.
-
asterisk
- Returns:
- a new
Table.scoped asterisk<table>.*expression.
-
cast
- Returns:
- a new
Castexpression. - Since:
- 2.3
-
of
Creates anExpressionbased on the provided list ofColumns.If the list contains only a single column, this method returns that column directly as the resulting
Expression. Otherwise, it creates and returns aTupleExpressionthat represents multiple columns as a single expression.- Parameters:
columns- the list ofColumns to include in the expression; must not be null.- Returns:
- an
Expressioncorresponding to the input columns: either a single column or aTupleExpressionfor multiple columns. - Since:
- 4.0
-