Module org.firebirdsql.jaybird
Package org.firebirdsql.jdbc

# Class FBDriver

java.lang.Object
org.firebirdsql.jdbc.FBDriver

All Implemented Interfaces:
  `Driver`, `FirebirdDriver`

public class FBDriver extends Object implements FirebirdDriver
The Jaybird JDBC Driver implementation for the Firebird database.

Although this class is formally public API of Jaybird, any method not defined by the `Driver` and `FirebirdDriver` interfaces is considered internal API and may change between point releases.

Author:
  David Jencks, Mark Rotteveel

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FBDriver()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `acceptsURL(String url)`
  `Connection`
  `connect(String url, Properties info)`
  `int`
  `getMajorVersion()`
  `int`
  `getMinorVersion()`
  `Logger`
  `getParentLogger()`
  `DriverPropertyInfo[]`
  `getPropertyInfo(String url, Properties info)`
  `boolean`
  `jdbcCompliant()`
  `static Map<String,String>`
  `normalizeProperties(String jdbcUrl, Properties connectionProperties)`
  Merges the properties from the JDBC URL and properties object, normalizes them to a standard name.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FBDriver

    public FBDriver()

- ## Method Details

  - ### connect

    public Connection connect(String url, Properties info) throws SQLException
    Specified by:
      `connect` in interface `Driver`
    Throws:
      `SQLException`

  - ### acceptsURL

    public boolean acceptsURL(String url) throws SQLException
    Specified by:
      `acceptsURL` in interface `Driver`
    Throws:
      `SQLException`

  - ### getPropertyInfo

    public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
    Specified by:
      `getPropertyInfo` in interface `Driver`
    Throws:
      `SQLException`

  - ### getMajorVersion

    public int getMajorVersion()
    Specified by:
      `getMajorVersion` in interface `Driver`

  - ### getMinorVersion

    public int getMinorVersion()
    Specified by:
      `getMinorVersion` in interface `Driver`

  - ### jdbcCompliant

    public boolean jdbcCompliant()
    Specified by:
      `jdbcCompliant` in interface `Driver`

  - ### getParentLogger

    public Logger getParentLogger() throws SQLFeatureNotSupportedException
    Specified by:
      `getParentLogger` in interface `Driver`
    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. Occurrence of multiple (distinct) aliases for the same property result in a `SQLException`.

    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.

    The behaviour of this method does not necessarily match the behaviour of Jaybird when processing properties during `connect(String, Properties)`, as this method performs additional processing that is skipped during connect.

    Parameters:
      `jdbcUrl` - JDBC Url
      `connectionProperties` - Properties object
    Returns:
      New map object with the merged and normalized connection properties
    Throws:
      `SQLException` - For failures to extract connection properties from `jdbcUrl` (URL decoding errors), or presence of the same property under multiple aliases.
    Since:
      4.0.1