public interface BinderConfiguration
Binder
based on the metadata of the prepared statement.
The default instance of this interface is DefaultBinderConfiguration
. If the binders returned by this
default configuration don't fit for the particular database you're using, or if you would like the binders
returned by the configuration to support additional data types, you might want to provide a different implementation
of this interface to the DbSetup
.
It's advised to make implementations of this interface immutable, and to make them implement equals and hashCode
in order for DbSetupTracker
to function properly, or to make them singletons.
Modifier and Type | Method and Description |
---|---|
Binder |
getBinder(java.sql.ParameterMetaData metadata,
int param)
Returns the appropriate
Binder for the given parameter, based on the given metadata. |
Binder getBinder(@Nullable java.sql.ParameterMetaData metadata, int param) throws java.sql.SQLException
Binder
for the given parameter, based on the given metadata.metadata
- the metadata allowing to decide which Binder to return. null
if the Insert has been
configured to not use metadata, or if the JDBC driver returned null metadata, or the JDBC driver threw a
SQLException when asked for the metadataparam
- the param for which a binder is requestedjava.sql.SQLException
- if a SQLException occurs while using the metadata