Enum Class BindListStyle
- All Implemented Interfaces:
Serializable, Comparable<BindListStyle>, Constable
Describes how
SqlStatement.bindList(String, Object...) renders the bound parameter names into the defined attribute.
The style must match the SQL around the attribute, so it is normally set per statement with
configure(SqlStatements.class, c -> c.setBindListStyle(...)) or @BindList(style = ...).- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic BindListStyleReturns the enum constant of this class with the specified name.static BindListStyle[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
PLAIN
Render each element as a bare parameter.
select * from things where x in (<ids>)renders asselect * from things where x in (:__ids_0,:__ids_1) -
ROWS
Render each element as a single-column row, for use with the SQL
VALUESlist constructor.select * from (values <ids>) as t(id)renders asselect * from (values (:__ids_0),(:__ids_1)) as t(id)EmptyHandling.NULL_KEYWORDrendersvalues null, which is not valid SQL. Handle an empty list withEmptyHandling.THROWorEmptyHandling.DEFINE_NULLand a template conditional instead.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-