Class SnowflakeDriver

  • All Implemented Interfaces:
    Driver
    Direct Known Subclasses:
    SnowflakeDriver

    public class SnowflakeDriver
    extends Object
    implements Driver
    JDBC Driver implementation for Snowflake.

    To use this driver, specify the following URL formats:

    • jdbc:snowflake://host:port - Standard connection
    • jdbc:snowflake:auto - Auto-configuration from connections.toml

    The driver is automatically registered with DriverManager when loaded.

    See Also:
    Driver
    • Constructor Detail

      • SnowflakeDriver

        public SnowflakeDriver()
    • Method Detail

      • acceptsURL

        public boolean acceptsURL​(String url)
        Checks whether a given URL is in a valid Snowflake JDBC format.

        Valid formats:

        • jdbc:snowflake://host[:port] - Standard connection
        • jdbc:snowflake:auto - Auto-configuration
        Specified by:
        acceptsURL in interface Driver
        Parameters:
        url - the database URL
        Returns:
        true if the URL is valid and accepted by this driver
      • connect

        public Connection connect​(String url,
                                  Properties info)
                           throws SQLException
        Establishes a connection to the Snowflake database.
        Specified by:
        connect in interface Driver
        Parameters:
        url - the database URL
        info - additional connection properties
        Returns:
        a Connection object, or null if the URL is not accepted
        Throws:
        SQLException - if a database access error occurs
      • connect

        public Connection connect()
                           throws SQLException
        Establishes a connection using auto-configuration.
        Returns:
        a Connection object
        Throws:
        SQLException - if a database access error occurs
      • getPatchVersion

        public long getPatchVersion()
        Gets the driver patch version number. This is not part of the standard JDBC Driver interface, but is needed for full version information.
        Returns:
        driver patch version number
      • getImplementationVersion

        public static String getImplementationVersion()
        Gets driver version information for telemetry and logging.
        Returns:
        full version string (e.g., "4.0.0")
      • jdbcCompliant

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