Class UnregisteredDriver

    • Constructor Detail

      • UnregisteredDriver

        protected UnregisteredDriver()
    • Method Detail

      • createHandler

        protected Handler createHandler()
        Creates a Handler.
      • getFactoryClassName

        protected java.lang.String getFactoryClassName​(UnregisteredDriver.JdbcVersion jdbcVersion)
        Returns the name of a class to be factory for JDBC objects (connection, statement) appropriate for the current JDBC version.
      • createDriverVersion

        protected abstract DriverVersion createDriverVersion()
        Creates an object describing the name and version of this driver. Called from the driver constructor.
      • getConnectionProperties

        protected java.util.Collection<ConnectionProperty> getConnectionProperties()
        Returns the connection properties supported by this driver.
      • instantiateFactory

        protected static AvaticaFactory instantiateFactory​(java.lang.String factoryClassName)
        Helper method for creating factories.
      • handle

        private static java.lang.RuntimeException handle​(java.lang.String msg,
                                                         java.lang.Throwable e)
      • connect

        public java.sql.Connection connect​(java.lang.String url,
                                           java.util.Properties info)
                                    throws java.sql.SQLException
        Specified by:
        connect in interface java.sql.Driver
        Throws:
        java.sql.SQLException
      • acceptsURL

        public boolean acceptsURL​(java.lang.String url)
                           throws java.sql.SQLException
        Specified by:
        acceptsURL in interface java.sql.Driver
        Throws:
        java.sql.SQLException
      • getConnectStringPrefix

        protected abstract java.lang.String getConnectStringPrefix()
        Returns the prefix of the connect string that this driver will recognize as its own. For example, "jdbc:calcite:".
      • getPropertyInfo

        public java.sql.DriverPropertyInfo[] getPropertyInfo​(java.lang.String url,
                                                             java.util.Properties info)
                                                      throws java.sql.SQLException
        Specified by:
        getPropertyInfo in interface java.sql.Driver
        Throws:
        java.sql.SQLException
      • getParentLogger

        public java.util.logging.Logger getParentLogger()
        Specified by:
        getParentLogger in interface java.sql.Driver
      • getDriverVersion

        public DriverVersion getDriverVersion()
        Returns the driver version object. Not in the JDBC API.
        Returns:
        Driver version
      • getMajorVersion

        public final int getMajorVersion()
        Specified by:
        getMajorVersion in interface java.sql.Driver
      • getMinorVersion

        public final int getMinorVersion()
        Specified by:
        getMinorVersion in interface java.sql.Driver
      • jdbcCompliant

        public boolean jdbcCompliant()
        Specified by:
        jdbcCompliant in interface java.sql.Driver
      • register

        protected void register()
        Registers this driver with the driver manager.
      • createMeta

        public abstract Meta createMeta​(AvaticaConnection connection)
        Creates a service handler that will give connections from this Driver their behavior.