Uses of Class
org.jdbi.v3.core.statement.StatementContext
Package
Description
The
argument
classes translate Java types into JDBC parameters.mapper
s take the JDBC ResultSet and produce Java results.mapper.reflect
provides RowMappers that reflectively
construct result types using techniques like constructor injection
or JavaBeans setters.result
provides the streaming interface that reads rows from JDBC
and drives the mapper
and collector
processes to
produce results.
The
statement
package provides most of the Fluent API
to drive statement execution.freemarker
provides advanced string template processing.joda-time
provides improved date and time types to pre-Java 8 applications.
The
jpa
plugin provides minimal support for discovering JPA
annotations like Column
.
The
oracle
package provides integration with the Oracle JDBC driver.
The
postgres
plugin provides improved support for
java.time
, hstore
, uuid
, and enum
types when configured with a recent Postgres database server.stringtemplate4
provides advanced string template processing
that Jdbi
can drive with the statement's bound parameters
and context to drive statement generation that may need to bind
variable number of parameters or other advanced use cases.-
Uses of StatementContext in org.jdbi.v3.commonstext
Modifier and TypeMethodDescriptionStringSubstitutorTemplateEngine.render
(String template, StatementContext ctx) -
Uses of StatementContext in org.jdbi.v3.core.argument
Modifier and TypeMethodDescriptionvoid
Argument.apply
(int position, PreparedStatement statement, StatementContext ctx) Apply the argument to the given prepared statement.void
CharacterStreamArgument.apply
(int position, PreparedStatement statement, StatementContext ctx) void
InputStreamArgument.apply
(int position, PreparedStatement statement, StatementContext ctx) void
NullArgument.apply
(int position, PreparedStatement statement, StatementContext ctx) void
ObjectArgument.apply
(int position, PreparedStatement statement, StatementContext ctx) MapArguments.find
(String name, StatementContext ctx) Deprecated.NamedArgumentFinder.find
(String name, StatementContext ctx) -
Uses of StatementContext in org.jdbi.v3.core.mapper
Modifier and TypeMethodDescriptionColumnMapper.map
(ResultSet r, int columnNumber, StatementContext ctx) Map the given column of the current row of the result set to an Object.default T
ColumnMapper.map
(ResultSet r, String columnLabel, StatementContext ctx) Map the given column of the current row of the result set to an Object.JoinRowMapper.map
(ResultSet r, StatementContext ctx) MapEntryMapper.map
(ResultSet rs, StatementContext ctx) MapMapper.map
(ResultSet rs, StatementContext ctx) RowMapper.map
(ResultSet rs, StatementContext ctx) Map the current row of the result set.default T
RowViewMapper.map
(ResultSet rs, StatementContext ctx) SingleColumnMapper.map
(ResultSet r, StatementContext ctx) JoinRowMapper.specialize
(ResultSet r, StatementContext ctx) MapEntryMapper.specialize
(ResultSet rs, StatementContext ctx) MapMapper.specialize
(ResultSet rs, StatementContext ctx) RowMapper.specialize
(ResultSet rs, StatementContext ctx) Returns a specialized row mapper, optimized for the given result set.RowViewMapper.specialize
(ResultSet rs, StatementContext ctx) -
Uses of StatementContext in org.jdbi.v3.core.mapper.reflect
Modifier and TypeMethodDescriptionConstructorMapper.map
(ResultSet rs, StatementContext ctx) FieldMapper.map
(ResultSet rs, StatementContext ctx) ConstructorMapper.specialize
(ResultSet rs, StatementContext ctx) FieldMapper.specialize
(ResultSet rs, StatementContext ctx) -
Uses of StatementContext in org.jdbi.v3.core.result
Modifier and TypeMethodDescriptionfinal StatementContext
ResultIterable.ResultIteratorDelegate.getContext()
ResultIterator.getContext()
Returns the currentStatementContext
.Modifier and TypeMethodDescriptionResultSetAccumulator.apply
(T previous, ResultSet rs, StatementContext ctx) Extract a single row from the result set, and combine it with the accumulator to produce a result.static ResultBearing
ResultProducers.createResultBearing
(Supplier<PreparedStatement> preparedStatementSupplier, ResultProducers.ResultSetCreator resultSetCreator, StatementContext ctx) Create aResultBearing
instance backed by aResultSet
.static ResultBearing
ResultBearing.of
(Supplier<ResultSet> resultSetSupplier, StatementContext ctx) Returns a ResultBearing backed by the given result set supplier and context.static <T> ResultIterable
<T> ResultIterable.of
(Supplier<ResultSet> resultSetSupplier, RowMapper<T> mapper, StatementContext ctx) Returns a ResultIterable backed by the given result set supplier, mapper, and context.ResultProducer.produce
(Supplier<PreparedStatement> statementSupplier, StatementContext ctx) Produces a statement result from a lazily suppliedPreparedStatement
.ResultSetScanner.scanResultSet
(Supplier<ResultSet> resultSetSupplier, StatementContext ctx) Scans the lazily-suppliedResultSet
into a result.ModifierConstructorDescriptionNoResultsException
(String msg, Throwable e, StatementContext ctx) NoResultsException
(String msg, StatementContext ctx) ResultSetException
(String msg, Exception e, StatementContext ctx) UnableToProduceResultException
(Exception cause, StatementContext ctx) UnableToProduceResultException
(String string, Throwable throwable, StatementContext ctx) UnableToProduceResultException
(String message, StatementContext ctx) -
Uses of StatementContext in org.jdbi.v3.core.statement
Modifier and TypeMethodDescriptionDefinedAttributeTemplateEngine.parse
(String template, ConfigRegistry config) default Optional
<Function<StatementContext, String>> TemplateEngine.parse
(String template, ConfigRegistry config) Parse a SQL template and return a parsed representation ready to apply to a statement.TemplateEngine.Parsing.parse
(String template, ConfigRegistry config) Modifier and TypeMethodDescriptiondefault void
StatementCustomizer.afterExecution
(PreparedStatement stmt, StatementContext ctx) This will be invoked after execution of the prepared statement, but before any results are accessed.default void
StatementCustomizer.beforeBinding
(PreparedStatement stmt, StatementContext ctx) Invoked prior to applying bound parameters to thePreparedStatement
.default void
StatementCustomizer.beforeExecution
(PreparedStatement stmt, StatementContext ctx) Make the changes you need to inside this method.default void
StatementCustomizer.beforeTemplating
(PreparedStatement stmt, StatementContext ctx) Invoked prior to using the TemplateEngine to render sql from definitions.default void
StatementContextListener.cleanableAdded
(StatementContext statementContext, Cleanable cleanable) ACleanable
object was added to this context for cleanup when the context is cleaned.default void
StatementContextListener.cleanableRemoved
(StatementContext statementContext, Cleanable cleanable) ACleanable
object was removed from the context.void
TimingCollector.collect
(long elapsedNs, StatementContext ctx) Deprecated.default void
StatementContextListener.contextCleaned
(StatementContext statementContext) AStatementContext
object was cleaned.default void
StatementContextListener.contextCreated
(StatementContext statementContext) A newStatementContext
is created.DefaultStatementBuilder.create
(Connection conn, String sql, StatementContext ctx) Create a new DefaultStatementBuilder which will always create a new PreparedStatement from the ConnectionDefaultStatementBuilder.create
(Connection conn, StatementContext ctx) StatementBuilder.create
(Connection conn, String sql, StatementContext ctx) Called each time a prepared statement needs to be created.StatementBuilder.create
(Connection conn, StatementContext ctx) Called each time a statement needs to be created.DefaultStatementBuilder.createCall
(Connection conn, String sql, StatementContext ctx) Called each time a Callable statement needs to be createdStatementBuilder.createCall
(Connection conn, String sql, StatementContext ctx) Called each time a Callable statement needs to be created.Binding.findForName
(String name, StatementContext ctx2) Deprecated.don't inspect a Binding: keep your own state!void
Slf4JSqlLogger.logAfterExecution
(StatementContext context) default void
SqlLogger.logAfterExecution
(StatementContext context) Will be called after a query has been executed.default void
SqlLogger.logBeforeExecution
(StatementContext context) Will be called before a query is executed.void
Slf4JSqlLogger.logException
(StatementContext context, SQLException ex) default void
SqlLogger.logException
(StatementContext context, SQLException ex) Will be called after a query has failed.ColonPrefixSqlParser.nameParameter
(String rawName, StatementContext ctx) HashPrefixSqlParser.nameParameter
(String rawName, StatementContext ctx) SqlParser.nameParameter
(String rawName, StatementContext ctx) Convert rawName to a name as recognized by this parserCachingSqlParser.parse
(String sql, StatementContext ctx) SqlParser.parse
(String sql, StatementContext ctx) Parses the given SQL statement, and returns theParsedSql
for the statement.MessageFormatTemplateEngine.render
(String template, StatementContext ctx) Deprecated.NoTemplateEngine.render
(String template, StatementContext ctx) default String
TemplateEngine.Parsing.render
(String template, StatementContext ctx) TemplateEngine.render
(String template, StatementContext ctx) Renders an SQL statement from the given template, using the statement context as needed.ModifierConstructorDescriptionStatementException
(String string, Throwable throwable, StatementContext ctx) StatementException
(String message, StatementContext ctx) StatementException
(Throwable cause, StatementContext ctx) UnableToCreateStatementException
(String string, Throwable cause, StatementContext ctx) UnableToCreateStatementException
(String string, StatementContext ctx) UnableToExecuteStatementException
(String message, Throwable throwable, StatementContext ctx) UnableToExecuteStatementException
(String message, StatementContext ctx) -
Uses of StatementContext in org.jdbi.v3.freemarker
Modifier and TypeMethodDescriptionFreemarkerEngine.parse
(String sqlTemplate, ConfigRegistry config) -
Uses of StatementContext in org.jdbi.v3.jodatime2
Modifier and TypeMethodDescriptionorg.joda.time.DateTime
DateTimeMapper.map
(ResultSet r, int columnNumber, StatementContext ctx) -
Uses of StatementContext in org.jdbi.v3.jpa
Modifier and TypeMethodDescriptionJpaMapper.map
(ResultSet rs, StatementContext ctx) JpaMapper.specialize
(ResultSet rs, StatementContext ctx) -
Uses of StatementContext in org.jdbi.v3.oracle12
Modifier and TypeMethodDescriptionvoid
OracleReturning.ReturnParameters.beforeBinding
(PreparedStatement stmt, StatementContext ctx) -
Uses of StatementContext in org.jdbi.v3.postgres
-
Uses of StatementContext in org.jdbi.v3.stringtemplate4
SqlLogger.logAfterExecution(org.jdbi.v3.core.statement.StatementContext)
instead.