Class AdbcDriverManager
- java.lang.Object
-
- org.apache.arrow.adbc.drivermanager.AdbcDriverManager
-
public final class AdbcDriverManager extends Object
Instantiate connections to ADBC databases generically based on driver name.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AdbcDatabaseconnect(String driverFactoryName, org.apache.arrow.memory.BufferAllocator allocator, Map<String,Object> parameters)Connect to a database.static AdbcDriverManagergetInstance()voidregisterDriver(String driverFactoryName, Function<org.apache.arrow.memory.BufferAllocator,AdbcDriver> driverFactory)Register a driver manually.
-
-
-
Method Detail
-
connect
public AdbcDatabase connect(String driverFactoryName, org.apache.arrow.memory.BufferAllocator allocator, Map<String,Object> parameters) throws AdbcException
Connect to a database.- Parameters:
driverFactoryName- The driver to use.allocator- The allocator to use.parameters- Parameters for the driver.- Returns:
- The AdbcDatabase instance.
- Throws:
AdbcException- if the driver was not found or if connection fails.
-
registerDriver
public void registerDriver(String driverFactoryName, Function<org.apache.arrow.memory.BufferAllocator,AdbcDriver> driverFactory)
Register a driver manually.- Parameters:
driverFactoryName- The name of the driver to associate with the construction function.driverFactory- The function to use to instantiate the driver.
-
getInstance
public static AdbcDriverManager getInstance()
-
-