All Classes and Interfaces
Class
Description
An
ArgumentFactory
base class for arguments of type T
.Base module class for element configuration modules.
Base module class to define
Jdbi
instances.Suppresses error when bindings are created but never used in the query.
Signifies that a public API (public class, method or field) is subject to incompatible changes,
or even removal, in a future release.
Locates SQL on the SQL method annotations like
@SqlQuery("foo")
.Represents an argument to a prepared statement.
Inspect a value with optional static type information and produce
an
Argument
that binds the value to a prepared statement.ArgumentFactory extension interface that allows preparing arguments for efficient batch binding.
A registry for ArgumentFactory instances.
Represents a group of non-prepared statements to be sent to the RDMBS in one "request".
Used to control the batch chunk size for sql batch operations.
Extends the
ResultBearing
class to provide access to the per-batch row modification counts.Extend the
ResultIterable
for batch operations.A row mapper which maps the columns in a statement into a JavaBean.
Deprecated.
this should never have been public API
Signifies that a public API (public class, method or field) is subject to incompatible changes,
or even removal, in a future release.
Binds the annotated argument as a named parameter, and as a positional parameter.
Binds the properties of a JavaBean to a SQL statement.
Binds each property for each value in the annotated
Iterable
or array/varargs argument,
and defines a named attribute as a comma-separated list of each bound parameter name.Binds the properties and public fields of an object to a SQL statement.
Represents the arguments bound to a particular statement.
Bind a class based on the subset of
JPA
annotations we understand.Binds each value in the annotated
Iterable
or array/varargs argument, and defines a named attribute as a
comma-separated list of each bound parameter name.describes what needs to be done if the passed argument is null or empty
Binds the entries of a
Map<String, Object>
to a SQL statement.Binds each method for each value in the annotated
Iterable
or array/varargs argument,
and defines a named attribute as a comma-separated list of each bound method name.Standard implementation of
ParameterCustomizerFactory
that delegates to
BindFactory.createForParameter(Annotation, Class, Method, Parameter, int, Type)
passing null for Annotation parameter.Binds the properties of an object to a SQL statement.
Deprecated.
will be replaced by a plugin
Deprecated.
will be replaced by plugin
Deprecated.
will be replaced by an opt-out plugin to give the core no hardwired behavior
Cache implementation using the caffeine cache library.
Cache builder using the caffeine caching library.
Installing this plugin restores the up-to 3.36.0 behavior of using the Caffeine cache library for SQL statements and the colon prefix parser.
Cache implementation using the caffeine cache library.
Used for invoking stored procedures.
Map an
OUT
parameter in a callable statement to a result type.Matches column names with identical java names, ignoring case.
Strategies for comparing case sensitive strings.
Bind a
Reader
as a character stream parameter.An
ArgumentFactory
for arguments that implement CharSequence
.Locates SQL in
.sql
files on the classpath.Cleans up some JDBC resource e.g. after completing execution of a SQL statement.
Thrown when an exception occurs while attempting to close a database resource.
Handler designed to behave properly in a J2EE CMT environment.
A Codec provides a convenient way for a bidirectional mapping of an attribute to a database column.
CodecFactory provides column mappers and arguments for bidirectional mapping types to database columns.
Fluent Builder for
CodecFactory
.Factory for building Collectors to assemble containers of elements.
SQL parser which recognizes named parameter tokens of the form
:tokenName
Maps result set columns to objects.
Factory interface used to produce column mappers.
Configuration registry for
ColumnMapperFactory
instances.Specify the mapping name for a property or parameter explicitly.
Strategy for matching SQL column names to Java property, field, or parameter names.
Customizes a given
ConfigRegistry
.Factory interface to create collections of
ConfigCustomizer
instances.A registry of
JdbiConfig
instances by type.A type with access to access and modify arbitrary Jdbi configuration.
Deprecated.
Use
ExtensionConfigurer
directly.Deprecated.
Supplies
Connection
instances to a created Handle
and allows
custom close handling.A row mapper which maps the fields in a result set into a constructor.
Use this annotation on a sql object method to create a new sql object with the same underlying handle as the sql
object the method is invoked on.
Map a value from the database column directly onto an enum value.
Bind a
DateTime
as a Timestamp
.Map a
Timestamp
to a DateTime
.Deprecated.
Use
UseExtensionHandlerCustomizer
to mark annotations and
ExtensionHandlerCustomizationOrder
instead.A StatementBuilder which will always create a new PreparedStatement.
Defines a named attribute as the argument passed to the annotated parameter.
Template engine which replaces angle-bracketed tokens like
<name>
with the string value of the named attribute.Defines all bound arguments that don't already have a definition.
Annotate a SqlObject type, method, or field as
@Definition
in order to
define
an attribute for all SqlObject methods in the same type.Simple delegating subclass that just invokes its delegate.
Postgres version of argument factory for
Duration
.A column mapper which maps Postgres's
PGInterval
type to Java's Duration
.Thrown when Jdbi tries to build a Collector, but cannot determine the element
type intended for it.
describes what should be done if the value passed to
SqlStatement.bindList(java.lang.String, java.lang.Object...)
is null or emptyAnnotating a spring configuration class with this annotation enables the scanning/detection of jdbi repositories.
Deprecated, for removal: This API element is subject to removal in a future version.
Use the
org.jdbi.v3.spring
module with Spring 6.x or newer.Type qualifying annotation for pre-encoded
json
data.Thrown when a JPA getter or setter fails.
Specifies that an
Enum
value should be bound or mapped as its Enum.name()
.Deprecated.
Use
getConfig(Enums.class).setEnumStrategy(BY_NAME)
instead.Specifies that an
Enum
value should be bound or mapped as its Enum.ordinal()
.Deprecated.
Use
getConfig(Enums.class).setEnumStrategy(BY_ORDINAL)
instead.Column mapper for Java
enum
types.Configuration for behavior related to
Enum
s.Configures
ConfigRegistry
instances.Accepted by a handle when executing extension code.
Factory interface used to produce Jdbi extension objects.
Flags that the factory can return to control aspects of the extension framework.
Provides functionality for a single method on an extension object.
Determines the order in which extension method decorators are invoked.
Supports customization of an extension handler.
A factory to create
ExtensionHandler
instances.Metadata that was detected when analyzing an extension class before attaching.
Builder class for the
ExtensionMetadata
object.Configuration class for defining
Jdbi
extensions via ExtensionFactory
instances.Specify batch size to fetch resulting rows in.
A row mapper which maps the columns in a statement into an object, using reflection
to set fields on the object.
Rewrites a Freemarker template, using the attributes on the
StatementContext
as template parameters.Locates SQL in
.sql.ftl
Freemarker files on the classpath.Decorate a SqlObject type to instruct the
jdbi3-generator
annotation processor
to create a compiled implementation.Factory for a RowMapper that can map resultset rows to column name/generic value
Map
s.Utilities for working with generic types.
Factory that uses
ResultSet.getObject(int, Class)
to fetch values.Configuration class for Gson 2 integration.
Gson 2 integration plugin.
Provide ArgumentFactory instances that understand Guava types.
Provides Collectors for Guava collection types.
Plugin to enable all
Guava
functionality.Allows specific customizations of the
Jdbi
instance during creation.Configure vendor supported types for the H2 Java database implementation
This represents a connection to the database system.
Callback that accepts a Handle that remains open for the duration
of the callback invocation.
Decorates the
HandleCallback
instance for Jdbi.useHandle(HandleConsumer)
, Jdbi.withHandle(HandleCallback)
,
Jdbi.inTransaction(HandleCallback)
and Jdbi.useTransaction(HandleConsumer)
.Callback that accepts a
Handle
and returns no result.Allows listening to events on the
Handle
lifecycle.Deprecated.
Use
ExtensionHandler
directly.Deprecated.
Use
ExtensionHandlerCustomizer
directly.Deprecated.
Use
ExtensionHandlerCustomizer
instances which are returned directly
from the ExtensionFactory.getExtensionHandlerCustomizers(ConfigRegistry)
.Deprecated.
Use
ExtensionHandlerFactory
instances directly.Deprecated.
Use
ExtensionHandlerFactory
instances that are returned
from the ExtensionFactory.getExtensionHandlerFactories(ConfigRegistry)
method.Configuration class for handles.
Jdbi manages Handles to allow transaction nesting and extension
objects to share the same handle as long as they are within a specific scope.
A handle supplier for extension implementors.
SQL parser which recognizes named parameter tokens of the form
#tokenName
.Type qualifying annotation for
HSTORE
data type.An argument factory which binds Java's
Map
to Postgres' hstore type.A column mapper which maps Postgres' hstore type to Java's
Map
.Postgres version of argument factory for
InetAddress
.Bind an input stream as either an ASCII (discouraged) or binary stream.
Callback for use with
ResultIterable.withIterator(IteratorCallback)
Callback for use with
ResultIterable.useIterator(IteratorConsumer)
Configuration class for Jackson 2 integration.
Jackson 2 integration plugin.
Provide mappers corresponding to java time types.
Main entry point; configurable wrapper around a JDBC
DataSource
.Describes all operations to bind Jdbi elements in Guice.
A generic cache implementation for JDBI internal use.
Builder class for
JdbiCache
implementations.Creates a new value for a
JdbiCache
.Simple statistics about a
JdbiCache
instance.Registry of collector factories.
Interface for classes that hold configuration.
Indicate to
ConstructorMapper
and other reflective mappers
how to construct an instance.Utilities for
JdbiConstructor
annotation.Base unchecked exception for exceptions thrown from jdbi.
Common functionality for all JUnit 5 extensions.
Initialize the data source before running a test.
Utility class which constructs an
Jdbi
instance which can conveniently
participate in Spring's transaction management system.Deprecated, for removal: This API element is subject to removal in a future version.
Use the
org.jdbi.v3.spring
module with Spring 6.x or newer.Use
Flyway
to create a database schema and/or preload a database instance.Configures support for an FreeBuilder generated
Builder)
value type.Very simple implementation of a JUnit 5
JdbiExtension
which can handle any JDBC connection.Jdbi H2 JUnit 5 rule.
An instance of an interception chain.
An interception chain holder to manage transformation operations.
Generic interface to allow transformation operation interception.
Enable OpenTelemetry support.
Jdbi PostgreSQL JUnit 5 rule using the otj-pg-embedded component.
A plugin is given an opportunity to customize instances of various
Jdbi
types before they are returned from their factories.Abstract base class for single-install JdbiPlugins.
Jdbi PostgreSQL JUnit 5 rule using the pg-embedded component.
Configure reflective bean and pojo property attributes.
When
EnableJdbiRepositories
is used,
detected interfaces with this annotation will be regarded as a jdbi (sql-object) repository
and are elligible for autowiring.Deprecated, for removal: This API element is subject to removal in a future version.
Use the
org.jdbi.v3.spring
module with Spring 6.x or newer.Deprecated, for removal: This API element is subject to removal in a future version.
Use the
org.jdbi.v3.spring
module with Spring 6.x or newer.This bean registers the bean definitions of all repositories.
Deprecated, for removal: This API element is subject to removal in a future version.
Use the
org.jdbi.v3.spring
module with Spring 6.x or newer.JUnit
@Rule
to manage a Jdbi instance pointed to a managed database.Jdbi SQLite JUnit 5 rule.
Support Testcontainer JDBC containers as database for Jdbi tests.
Utility for working with Jdbi and Spring transaction bound resources
Deprecated, for removal: This API element is subject to removal in a future version.
Use the
org.jdbi.v3.spring
module with Spring 6.x or newer.Register date and time providers to integrate with
joda-time
.Holder for a single joined row.
A
RowMapper
implementation to easily compose existing
RowMappers.Row mapper for a JPA-annotated type as a result.
Enable minimal
JPA
compatibility layer.Type qualifying annotation for converting Java types to
json
data type.Deserializes JSON to Java objects, and serializes Java objects to JSON.
Configures the column to use for map keys, for SQL methods that return
Map
, or Guava's Multimap.A row reducer that uses
LinkedHashMap
(which preserves insertion order) as a
result container, and returns map.values().stream()
as the final result.This
TransactionHandler
uses local JDBC transactions
demarcated explicitly on the handle and passed through to be handled
directly on the JDBC Connection instance.Type qualifying annotation for
MACADDR
data type.Deprecated.
use
SqlStatement.bindMap(Map)
insteadMaps rows to
Map.Entry<K, V>
, provided there are mappers registered for types K and V.Configuration class for MapEntryMapper.
Yo dawg, I heard you like maps, so I made you a mapper that maps rows into
Map<String,Object>
.Configuration class for obtaining row or column mappers.
Thrown when a mapper fails to map the row to a result type.
Used to specify a polymorphic return type as a parameter on a query method.
Used to specify the maximum number of rows to return on a result set.
Deprecated.
MessageFormat
formats integers with decimal separators, e.g.Access to Database Metadata.
Represents a Flyway migration Jdbi should run.
Configuration class for Moshi integration.
Moshi integration plugin.
Returns an Argument based on a name.
Signals that the annotated element is a nested mapped type.
A no operation cache implementation.
Cache builder for the no op cache.
Installing this plugin uses the no op (no caching) cache.
Thrown when no results were found in a context that requires at least one.
Thrown when Jdbi tries to produce a result Collector
but doesn't have a factory to produce it with.
Thrown when no
ExtensionFactory
accepts a given extension type.Thrown when you attempt to map a type that
Jdbi
doesn't have a
registered mapper factory for.A TemplateEngine that does not do any templating but returns SQL verbatim.
A typed SQL null argument.
Argument qualifier annotation, indicating that the annotated String element should be bound as an
NVARCHAR
instead of a VARCHAR
.An Argument which uses
setObject
to support
vendor specific types.Argument factory that matches a specified type and binds
it as an
ObjectArgument
.Deprecated.
this functionality will remain supported, but this class should not be API
Deprecated.
this functionality will remain supported, but this class should not be API
Factory methods for
collectors
of optional types.JUnit 4 Helper for a database managed by testcontainers.
Returns a
ResultBearing
from Oracle's "DML Returning" features introduced in 10.2.Declare a named out parameter on an
@SqlCall
annotated method.Holds all output parameters from a stored procedure call using
Call
.The parsed parameters from an SQL statement.
The SQL and parameters parsed from an SQL statement.
Fluent builder for ParsedSql instances.
Postgres version of argument factory for
Period
.A column mapper which maps Postgres's
PGInterval
type to Java's Period
.Postgis plugin.
Postgres plugin.
Handler for PostgreSQL custom types.
Represents a prepared batch statement.
Signals that the annotated property signals the presence of the mapped type:
reflective mappers should map a null bean if this property is null, rather than a
present bean with a null property value.
Inspect a value with optional static qualified type information and produce an
Argument
that binds the value to a prepared statement.QualifiedArgumentFactory extension interface that allows preparing arguments for efficient batch binding.
Factory interface used to produce column mappers.
A
Type
qualified by a set of qualifier annotations.Annotation used to identify type qualifying annotations.
Utility class for type qualifiers supported by Jdbi core.
Statement providing convenience result handling for SQL queries.
Specify the query timeout in seconds.
Configuration class for reflective mappers.
Utilities for reflective mappers.
Used to register an argument factory with either a sql object type or for a specific method.
Registers a BeanMapper for a specific bean class
Registers specifically one collector for a sql object type
Used to register a collector factory on the current
SqlStatement
either for a sql object type
or for a method.Registers a column mapper in the scope of a SQL Object type or method.
Registers a column mapper factory in the scope of a SQL Object type or method.
Registers a constructor mapper factory for the given type(s).
Register types to reflectively assign fields with
FieldMapper
.Used to register a
JoinRowMapper
factory.Registers an argument factory for a type compatible with
PreparedStatement.setObject(int, Object)
.Register a row mapper in the context of a SQL Object type or method.
Registers a row mapper factory in the scope of a SQL Object type or method.
Provides access to the contents of a
ResultSet
by mapping to Java types.An implementation of
ResultIterator
that delegates calls
to the iterator provided in the constructor.Represents a forward-only iterator over a result set, which will lazily iterate
the results.
Produces a result from an executed
PreparedStatement
.Commonly used ResultProducer implementations.
Returns a ResultSet from a Statement.
A
ResultSetAccumulator
repeatedly combines rows
from the given ResultSet
to produce a single
result.Wraps exceptions thrown while traversing the JDBC result set.
Scan over rows of result sets, mapping and collecting the rows to a result type.
A transaction handler that always calls
DelegatingTransactionHandler.rollback(org.jdbi.v3.core.Handle)
instead
of RollbackOnlyTransactionHandler.commit(org.jdbi.v3.core.Handle)
.Maps result set rows to objects.
Factory interface used to produce row mappers.
Configuration registry for
RowMapperFactory
instances.Reduces row data from a
ResultSet
into a stream of result
elements.A RowView is an accessor for
ResultSet
that uses
RowMapper
or ColumnMapper
to extract values.Represents a number of SQL statements delimited by semicolon which will be executed in order in a batch statement.
A TransactionHandler that automatically retries transactions that fail due to
serialization failures, which can generally be resolved by automatically
retrying the transaction.
Configuration for serializable transaction runner.
Factory that uses
PreparedStatement.setObject(int, Object, int)
to bind values.Configurer base class that applies the same configuration changes independent whether an annotation
is placed on the type or a method.
Adapts a
ColumnMapper
into a RowMapper
by mapping a single column.Indicate to SqlObject that a type that looks like a container
should be treated as a single element.
Simple
SqlLogger
that emits some diagnostic information about
Jdbi usage.Matches snake case column names to java camel case names, ignoring case.
Deprecated, for removal: This API element is subject to removal in a future version.
Use the
org.jdbi.v3.spring
module with Spring 6.x or newer.
An immutable sql statement string created from multiple tokens
in order to write inline sql statements in an easy-to-read fashion
spread out over multiple lines of code.
Bind a Java array or
Collection
to a SQL array using the
SqlArrayTypeFactory
for the given type information.Strategies used to bind SQL array arguments to a
PreparedStatement
.Maps SQL array columns into Java arrays or other Java container types.
Strategy for converting elements of array-like arguments into SQL array elements.
Factory interface to produce
SqlArrayType
instances.Configuration class for SQL array binding and mapping.
Annotate a method to indicate that it will create and execute a SQL batch.
Support for stored proc invocation.
Jdbi plugin for SQLite.
Locates SQL for jdbi SQL Object methods.
SqlLoggers receive query data before and after a query is executed, and after an exception is thrown by a bad query.
Deprecated.
Use
UseExtensionHandlerCustomizer
instead
and implement ExtensionHandlerCustomizer
for the value.SqlObject base interface.
Locates SQL in
.sql
files on the classpath for use with SqlQuery
.Creates implementations for SqlObject interfaces.
Plugin that installs the SqlObject extension.
Configuration class for SQL objects.
Deprecated.
Use
UseExtensionHandler
and SqlObjectFactory.EXTENSION_ID
as the id marker.Parses the named parameters out of an SQL statement, and returns the
ParsedSql
containing the JDBC-ready SQL statement, along with the
type of parameters used (named or positional), the number, and the parameter
name for each position (if applicable).Used to indicate that a method should execute a query.
Annotate a method to indicate that it will execute one or more SQL statements.
Holder for repeating
SqlScript
s.This class provides the common functions between
Query
and
Update
.Used with
SqlStatementCustomizerFactory
to
customize sql statements via annotations.Interface used in conjunction with
SqlStatementCustomizingAnnotation
to generate
SqlStatementCustomizer
instances.Annotation used to build customizing annotations.
Customize a
SqlStatement
according to the value of an annotated parameter.Configuration holder for
SqlStatement
s.Used to indicate that a method should execute a non-query sql statement.
Used to convert translated SQL into a prepared statement.
Used to specify how prepared statements are built.
The statement context provides access to statement-local configuration.
Listener interface for the
StatementContext
.Allows tweaking of statement behaviour.
Some simple
StatementCustomizer
s you might find handy.Superclass for exceptions thrown while trying to execute a statement.
Configuration for
StatementException
and subclasses behavior.Control exception message generation.
Callback for use with
ResultIterable.withStream(StreamCallback)
Callback for use with
ResultIterable.useStream(StreamConsumer)
Register an instance of this class (
SqlStatements.setTemplateEngine(org.jdbi.v3.core.statement.TemplateEngine)
) to use an Apache Commons Text StringSubstitutor
as a TemplateEngine
.Rewrites a StringTemplate template, using the attributes on the
StatementContext
as template parameters.Configuration options for
StringTemplateEngine
.Locates SQL in
.sql.stg
StringTemplate group files on the classpath.Renders an SQL statement from a template.
Describes the parameters needed to create a new test-specific database or schema to isolate a test.
Binds the named parameter
:now
or a custom named parameter with
the current DateTime as an OffsetDateTime
.Configuration for
Timestamped
.Deprecated.
Use
SqlLogger
instead.Causes the annotated method to be run in a transaction.
A mixin interface to expose transaction methods on the sql object.
Callback that expects an open transaction and produces a result.
Callback that expects an open transaction and returns no results.
Thrown when there's a problem manipulating the transaction isolation level.
Interface which defines callbacks to be used when transaction methods are called on a handle.
Supported transaction isolation levels.
Mappers similar to
MapEntryMappers
but map entries in vavr are in fact
of type Tuple2
.Default
jdbi
behavior is to bind Enum
subclasses as
a string, which Postgres won't implicitly convert to an enum type.An extended
CodecFactory
which can resolve Codecs for subtypes.Marks that a specific extension could not be created.
Thrown when constructing a SqlObject fails.
Thrown when
Jdbi
couldn't create a statement.Thrown when statement execution fails.
Thrown when
Jdbi
isn't able to change the transaction isolation level.Wraps exceptions thrown while producing Java result types.
Thrown after a transaction finishes if we can't reset its isolation level.
Thrown when
Jdbi
couldn't retrieve metadata from the connection.Used for INSERT, UPDATE, and DELETE statements
Configures SQL Object to use AnnotationSqlLocator (the default SqlLocator).
Configures SQL Object to locate SQL using the
ClasspathSqlLocator.findSqlOnClasspath(Class, String)
method.Use the specified
EnumStrategy
for binding and mapping enum
values.Meta-Annotation used to identify annotations that modify configuration in the context of an extension object or method.
Meta-Annotation used to map a method to an extension handler.
Meta-Annotation used to identify extension method decorating annotations.
Configures a SQL object class or method to rewrite SQL statements using Freemarker.
Configures SQL Object to locate SQL using the
FreemarkerSqlLocator
class.Used to specify specific row mapper on a query method.
Used to specify a row reducer on a result-bearing method.
Use the specified
SqlParser
class to parse SQL for the annotated SQL object class or method.Configures a SQL object class or method to rewrite SQL statements using StringTemplate.
Configures SQL Object to locate SQL using the
StringTemplateSqlLocator.findStringTemplate(Class, String)
method.Use the specified
TemplateEngine
class to render SQL for the
annotated SQL object class or method.Bind UUID arguments as an Object.
Configures the column to use for map values, for SQL methods that return
Map
, or Guava's Multimap.JDBI-Plugin for vavr.io library
supports single-value arguments (
Option
, ...)
supports vavr collections via ResultBearing.collectInto(java.lang.reflect.Type)
call
supports key-value mappings of a tuple result (implicitly used by map collectors)
supports tuple projection
supports column mapping for Option