| Package | Description |
|---|---|
| org.jdbi.v3.core.argument |
The
argument classes translate Java types into JDBC parameters. |
| org.jdbi.v3.core.mapper |
mappers take the JDBC ResultSet and produce Java results. |
| org.jdbi.v3.core.mapper.reflect |
mapper.reflect provides RowMappers that reflectively
construct result types using techniques like constructor injection
or JavaBeans setters. |
| org.jdbi.v3.core.result |
result provides the streaming interface that reads rows from JDBC
and drives the mapper and collector processes to
produce results. |
| org.jdbi.v3.core.statement |
The
statement package provides most of the Fluent API
to drive statement execution. |
| Modifier and Type | Method and Description |
|---|---|
void |
InputStreamArgument.apply(int position,
PreparedStatement statement,
StatementContext ctx) |
void |
ObjectArgument.apply(int position,
PreparedStatement statement,
StatementContext ctx) |
void |
Argument.apply(int position,
PreparedStatement statement,
StatementContext ctx)
Apply the argument to the given prepared statement.
|
void |
NullArgument.apply(int position,
PreparedStatement statement,
StatementContext ctx) |
void |
CharacterStreamArgument.apply(int position,
PreparedStatement statement,
StatementContext ctx) |
Optional<Argument> |
NamedArgumentFinder.find(String name,
StatementContext ctx) |
Optional<Argument> |
MapArguments.find(String name,
StatementContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
T |
ColumnMapper.map(ResultSet r,
int columnNumber,
StatementContext ctx)
Map the given column of the current row of the result set to an Object.
|
Map<String,Object> |
MapMapper.map(ResultSet rs,
StatementContext ctx) |
T |
RowMapper.map(ResultSet rs,
StatementContext ctx)
Map the row the result set is at when passed in.
|
Map.Entry<K,V> |
MapEntryMapper.map(ResultSet rs,
StatementContext ctx) |
T |
SingleColumnMapper.map(ResultSet r,
StatementContext ctx) |
JoinRow |
JoinRowMapper.map(ResultSet r,
StatementContext ctx) |
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.
|
RowMapper<Map<String,Object>> |
MapMapper.specialize(ResultSet rs,
StatementContext ctx) |
default RowMapper<T> |
RowMapper.specialize(ResultSet rs,
StatementContext ctx)
Returns a specialized row mapper, optimized for the given result set.
|
RowMapper<Map.Entry<K,V>> |
MapEntryMapper.specialize(ResultSet rs,
StatementContext ctx) |
RowMapper<JoinRow> |
JoinRowMapper.specialize(ResultSet r,
StatementContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
T |
BeanMapper.map(ResultSet rs,
StatementContext ctx) |
T |
ConstructorMapper.map(ResultSet rs,
StatementContext ctx) |
T |
FieldMapper.map(ResultSet rs,
StatementContext ctx) |
RowMapper<T> |
BeanMapper.specialize(ResultSet rs,
StatementContext ctx) |
RowMapper<T> |
ConstructorMapper.specialize(ResultSet rs,
StatementContext ctx) |
RowMapper<T> |
FieldMapper.specialize(ResultSet rs,
StatementContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
StatementContext |
ResultIterator.getContext() |
| Modifier and Type | Method and Description |
|---|---|
T |
ResultSetAccumulator.apply(T in,
ResultSet rs,
StatementContext ctx)
Extract a single row from the result set, and combine it with the
accumulator to produce a result.
|
static <T> ResultIterable<T> |
ResultIterable.of(Supplier<ResultSet> supplier,
RowMapper<T> mapper,
StatementContext ctx)
Returns a ResultIterable backed by the given result set supplier, mapper, and context.
|
static ResultBearing |
ResultBearing.of(Supplier<ResultSet> resultSetSupplier,
StatementContext ctx)
Returns a ResultBearing backed by the given result set supplier and context.
|
R |
ResultProducer.produce(Supplier<PreparedStatement> statementSupplier,
StatementContext ctx)
Produces a statement result from a lazily supplied
PreparedStatement. |
T |
ResultSetScanner.scanResultSet(Supplier<ResultSet> resultSetSupplier,
StatementContext ctx)
Scans the lazily-supplied result set into a result.
|
| Constructor and Description |
|---|
NoResultsException(String msg,
StatementContext ctx) |
NoResultsException(String msg,
Throwable e,
StatementContext ctx) |
NoResultsException(Throwable e,
StatementContext ctx) |
ResultSetException(String msg,
Exception e,
StatementContext ctx) |
UnableToProduceResultException(Exception e,
StatementContext ctx) |
UnableToProduceResultException(String message,
StatementContext ctx) |
UnableToProduceResultException(String string,
Throwable throwable,
StatementContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
StatementContext |
StatementException.getStatementContext() |
| Modifier and Type | Method and Description |
|---|---|
default 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.beforeExecution(PreparedStatement stmt,
StatementContext ctx)
Make the changes you need to inside this method.
|
void |
TimingCollector.collect(long elapsedNs,
StatementContext ctx)
Called after a statement completes with how long it took to execute.
|
Statement |
DefaultStatementBuilder.create(Connection conn,
StatementContext ctx) |
Statement |
StatementBuilder.create(Connection conn,
StatementContext ctx)
Called each time a statement needs to be created.
|
PreparedStatement |
DefaultStatementBuilder.create(Connection conn,
String sql,
StatementContext ctx)
Create a new DefaultStatementBuilder which will always create a new PreparedStatement from
the Connection
|
PreparedStatement |
StatementBuilder.create(Connection conn,
String sql,
StatementContext ctx)
Called each time a prepared statement needs to be created.
|
CallableStatement |
DefaultStatementBuilder.createCall(Connection conn,
String sql,
StatementContext ctx)
Called each time a Callable statement needs to be created
|
CallableStatement |
StatementBuilder.createCall(Connection conn,
String sql,
StatementContext ctx)
Called each time a Callable statement needs to be created.
|
Optional<Argument> |
Binding.findForName(String name,
StatementContext ctx)
Look up an argument by name
|
String |
ColonPrefixSqlParser.nameParameter(String rawName,
StatementContext ctx) |
String |
SqlParser.nameParameter(String rawName,
StatementContext ctx)
Convert rawName to a name as recognized by this parser
|
String |
HashPrefixSqlParser.nameParameter(String rawName,
StatementContext ctx) |
ParsedSql |
ColonPrefixSqlParser.parse(String sql,
StatementContext ctx) |
ParsedSql |
SqlParser.parse(String sql,
StatementContext ctx)
Parses the given SQL statement, and returns the
ParsedSql
for the statement. |
ParsedSql |
HashPrefixSqlParser.parse(String sql,
StatementContext ctx) |
String |
DefinedAttributeTemplateEngine.render(String template,
StatementContext ctx) |
String |
TemplateEngine.render(String template,
StatementContext ctx)
Renders an SQL statement from the given template, using the statement
context as needed.
|
| Constructor and Description |
|---|
StatementException(String message,
StatementContext ctx) |
StatementException(String string,
Throwable throwable,
StatementContext ctx) |
StatementException(Throwable cause,
StatementContext ctx) |
UnableToCreateStatementException(Exception e,
StatementContext ctx) |
UnableToCreateStatementException(String string,
StatementContext ctx) |
UnableToCreateStatementException(String string,
Throwable throwable,
StatementContext ctx) |
UnableToExecuteStatementException(Exception e,
StatementContext ctx) |
UnableToExecuteStatementException(String message,
StatementContext ctx) |
UnableToExecuteStatementException(String message,
Throwable throwable,
StatementContext ctx) |
Copyright © 2017. All rights reserved.