Package org.hibernate.sql.ast
Enum SqlAstNodeRenderingMode
- java.lang.Object
-
- java.lang.Enum<SqlAstNodeRenderingMode>
-
- org.hibernate.sql.ast.SqlAstNodeRenderingMode
-
- All Implemented Interfaces:
Serializable
,Comparable<SqlAstNodeRenderingMode>
public enum SqlAstNodeRenderingMode extends Enum<SqlAstNodeRenderingMode>
The rendering mode to use forSqlAstNode
. Some functions/contexts require the use of literals/expressions rather than parameters like for example the `char` function in Derby which requires the length as literal. Another example is a function that renders a function argument into a subquery select and group by item. It can useINLINE_PARAMETERS
so that a database can match such a select item to a group by item. Without this, such queries would result in a query error.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULT
Render node as is.INLINE_ALL_PARAMETERS
Render all nested parameters as literals.INLINE_PARAMETERS
Render parameters as literals.NO_PLAIN_PARAMETER
Don't render plain parameters.NO_UNTYPED
Don't render untyped expressions e.g.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SqlAstNodeRenderingMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static SqlAstNodeRenderingMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final SqlAstNodeRenderingMode DEFAULT
Render node as is.
-
INLINE_PARAMETERS
public static final SqlAstNodeRenderingMode INLINE_PARAMETERS
Render parameters as literals. All parameters within theSqlAstNode
are rendered as literals.
-
INLINE_ALL_PARAMETERS
public static final SqlAstNodeRenderingMode INLINE_ALL_PARAMETERS
Render all nested parameters as literals. All parameters within theSqlAstNode
are rendered as literals.
-
NO_PLAIN_PARAMETER
public static final SqlAstNodeRenderingMode NO_PLAIN_PARAMETER
Don't render plain parameters. Render it as literal or as expression. If theSqlAstNode
to render is a parameter, it will be rendered either as literal or wrapped into a semantically equivalent expression such that it doesn't appear as plain parameter.
-
NO_UNTYPED
public static final SqlAstNodeRenderingMode NO_UNTYPED
Don't render untyped expressions e.g. plain parameters ornull
literals. Render it as literal or as expression. If theSqlAstNode
to render is a parameter, it will be rendered either as literal or wrapped into a semantically equivalent expression such that it doesn't appear as plain parameter.null
literals will be wrapped in a cast.
-
-
Method Detail
-
values
public static SqlAstNodeRenderingMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SqlAstNodeRenderingMode c : SqlAstNodeRenderingMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SqlAstNodeRenderingMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-