Java ADBC Driver Manager
#
Java ADBC Wrapper for JDBC#
The Java ADBC Driver Manager provides a means to manage ADBC drivers and facilitate connections to databases using the ADBC API. This particular implementation wraps around the JDBC API.
Constants#
- org.apache.arrow.adbc.driver.jdbc.JdbcDriver.PARAM_DATASOURCE#
A parameter for creating an
AdbcDatabase
from aDataSource
.
- org.apache.arrow.adbc.driver.jdbc.JdbcDriver.PARAM_JDBC_QUIRKS#
A parameter for specifying backend-specific configuration.
- org.apache.arrow.adbc.driver.jdbc.JdbcDriver.PARAM_URI#
A parameter for specifying a URI to connect to, aligning with the C/Go implementations.
Classes#
- class org.apache.arrow.adbc.driver.jdbc.JdbcDriver#
An ADBC driver implementation that wraps around the JDBC API.
- open(Map<String, Object> parameters)#
Opens a new database connection using the specified parameters.
- class org.apache.arrow.adbc.driver.jdbc.JdbcDataSourceDatabase#
Represents an ADBC database backed by a JDBC
DataSource
.
Utilities#
The JdbcDriver
class provides utility methods to fetch and validate parameters from the provided options map.
- org.apache.arrow.adbc.driver.jdbc.JdbcDriver.getParam(Class<T> klass, Map<String, Object> parameters, String... choices)#
Retrieves a parameter from the provided map, validating its type and ensuring no duplicates.
Usage#
The JdbcDriver
class is registered with the AdbcDriverManager
upon class loading. To utilize this driver:
Ensure the necessary dependencies are in place.
Create a
Map<String, Object>
containing the connection parameters.Use the
AdbcDriverManager
to obtain an instance of theJdbcDriver
.Open a new database connection using the driver’s
open
method.
Exceptions#
Any errors during the driver operations throw the AdbcException
. This exception provides detailed messages indicating the nature of the problem.