Package org.jdbi.v3.core.statement
Enum EmptyHandling
- All Implemented Interfaces:
Serializable
,Comparable<EmptyHandling>
,BiConsumer<SqlStatement,
String>
describes what should be done if the value passed to
SqlStatement.bindList(java.lang.String, java.lang.Object...)
is null or empty-
Enum Constant Summary
Enum ConstantDescriptionRender nothing in the query.Define anull
value, leaving the result up to theTemplateEngine
to decide.Render the keywordnull
in the query, useful e.g.Throw IllegalArgumentException. -
Method Summary
Modifier and TypeMethodDescriptionstatic EmptyHandling
Returns the enum constant of this type with the specified name.static EmptyHandling[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface java.util.function.BiConsumer
accept, andThen
-
Enum Constant Details
-
BLANK
Render nothing in the query.
select * from things where x in ()
-
NULL_KEYWORD
Render the keyword
null
in the query, useful e.g. in postgresql where "in ()" is invalid syntax.select * from things where x in (null)
-
DEFINE_NULL
Define a
null
value, leaving the result up to theTemplateEngine
to decide.This value was specifically added to make conditionals work better with
StringTemplate
. -
THROW
Throw IllegalArgumentException.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-