Package org.firebirdsql.jdbc
Class FBDriver
java.lang.Object
org.firebirdsql.jdbc.FBDriver
- All Implemented Interfaces:
Driver,FirebirdDriver
The Jaybird JDBC Driver implementation for the Firebird database.
- Author:
- David Jencks, Mark Rotteveel
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptsURL(String url) connect(String url, Properties info) connect(FirebirdConnectionProperties properties) Connect to the specified database using the specified connection properties.intintgetPropertyInfo(String url, Properties info) booleanCreate new instance ofFirebirdConnectionPropertiesthat can later be used inFirebirdDriver.connect(FirebirdConnectionProperties)call.normalizeProperties(String jdbcUrl, Properties connectionProperties) Merges the properties from the JDBC URL and properties object, normalizes them to a standard name.
-
Field Details
-
CHARSET
- See Also:
-
USER
- See Also:
-
USER_NAME
- See Also:
-
PASSWORD
- See Also:
-
DATABASE
- See Also:
-
BLOB_BUFFER_LENGTH
- See Also:
-
TPB_MAPPING
- See Also:
-
-
Constructor Details
-
FBDriver
public FBDriver()
-
-
Method Details
-
connect
- Specified by:
connectin interfaceDriver- Throws:
SQLException
-
connect
Description copied from interface:FirebirdDriverConnect to the specified database using the specified connection properties.- Specified by:
connectin interfaceFirebirdDriver- Parameters:
properties- instance ofFirebirdConnectionPropertiescreated inFirebirdDriver.newConnectionProperties()method.- Returns:
- new connection to the Firebird database.
- Throws:
SQLException- if an error happened while connecting to the database.
-
newConnectionProperties
Description copied from interface:FirebirdDriverCreate new instance ofFirebirdConnectionPropertiesthat can later be used inFirebirdDriver.connect(FirebirdConnectionProperties)call.- Specified by:
newConnectionPropertiesin interfaceFirebirdDriver- Returns:
- instance of
FirebirdConnectionProperties.
-
acceptsURL
- Specified by:
acceptsURLin interfaceDriver- Throws:
SQLException
-
getPropertyInfo
- Specified by:
getPropertyInfoin interfaceDriver- Throws:
SQLException
-
getMajorVersion
public int getMajorVersion()- Specified by:
getMajorVersionin interfaceDriver
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersionin interfaceDriver
-
jdbcCompliant
public boolean jdbcCompliant()- Specified by:
jdbcCompliantin interfaceDriver
-
getParentLogger
- Specified by:
getParentLoggerin interfaceDriver- Throws:
SQLFeatureNotSupportedException
-
normalizeProperties
public static Map<String,String> normalizeProperties(String jdbcUrl, Properties connectionProperties) throws SQLException Merges the properties from the JDBC URL and properties object, normalizes them to a standard name.If a property with the exact same name is present in both, the property specified in the JDBC url takes precedence. Short and long form
isc_dpbproperties will be merged if both are present, as will two different (non-isc_dpb) aliases, but precedence is undefined. If a property is specified in the (short or long)isc_dpbform and as an alias, then an exception is thrown.The property name that is the result of normalization, is implementation specific behaviour, and might change in a future version of Jaybird. When present, the (normalized) property `"database"` will be excluded, this also might change in the future.
- Parameters:
jdbcUrl- JDBC UrlconnectionProperties- Properties object- Returns:
- New map object with the merged and normalized connection properties
- Throws:
SQLException- For failures to extract connection properties fromjdbcUrl(URL decoding errors), or presence of the same property under multiple aliases.- Since:
- 4.0.1
-