Package net.snowflake.client.jdbc
Class SnowflakeDriver
- java.lang.Object
-
- net.snowflake.client.jdbc.SnowflakeDriver
-
- All Implemented Interfaces:
Driver
- Direct Known Subclasses:
SnowflakeDriver
public class SnowflakeDriver extends Object implements Driver
JDBC Driver implementation of Snowflake for production. To use this driver, specify the following URL: jdbc:snowflake://host:portNote: don't add logger to this class since logger init will potentially break driver class loading
-
-
Field Summary
Fields Modifier and Type Field Description static String
AUTO_CONNECTION_STRING_PREFIX
protected static boolean
disableIncidents
static Properties
EMPTY_PROPERTIES
static String
implementVersion
-
Constructor Summary
Constructors Constructor Description SnowflakeDriver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptsURL(String url)
Checks whether a given url is in a valid format.Connection
connect()
Connect method using connection configuration fileConnection
connect(String url, Properties info)
Connect methodstatic String
getDisableArrowResultFormatMessage()
static String
getImplementationTitle()
Utility method to verify if the standard or fips snowflake-jdbc driver is being used.static String
getJdbcJarname()
Utility method to get the complete jar name with version.int
getMajorVersion()
int
getMinorVersion()
Logger
getParentLogger()
DriverPropertyInfo[]
getPropertyInfo(String url, Properties info)
static boolean
isDisableArrowResultFormat()
static boolean
isDisableIncidents()
boolean
jdbcCompliant()
static void
main(String[] args)
static void
setDisableIncidents(boolean throttleIncidents)
-
-
-
Field Detail
-
AUTO_CONNECTION_STRING_PREFIX
public static final String AUTO_CONNECTION_STRING_PREFIX
- See Also:
- Constant Field Values
-
EMPTY_PROPERTIES
public static final Properties EMPTY_PROPERTIES
-
implementVersion
public static String implementVersion
-
disableIncidents
protected static boolean disableIncidents
-
-
Method Detail
-
isDisableArrowResultFormat
public static boolean isDisableArrowResultFormat()
-
getDisableArrowResultFormatMessage
public static String getDisableArrowResultFormatMessage()
-
getImplementationTitle
public static String getImplementationTitle()
Utility method to verify if the standard or fips snowflake-jdbc driver is being used.- Returns:
-
getJdbcJarname
public static String getJdbcJarname()
Utility method to get the complete jar name with version.- Returns:
-
acceptsURL
public boolean acceptsURL(String url)
Checks whether a given url is in a valid format.The current uri format is: jdbc:snowflake://[host[:port]]
jdbc:snowflake:// - run in embedded mode jdbc:snowflake://localhost - connect to localhost default port (8080)
jdbc:snowflake://localhost:8080- connect to localhost port 8080
- Specified by:
acceptsURL
in interfaceDriver
- Parameters:
url
- url of the database including host and port- Returns:
- true if the url is valid
-
connect
public Connection connect(String url, Properties info) throws SQLException
Connect method- Specified by:
connect
in interfaceDriver
- Parameters:
url
- jdbc urlinfo
- addition info for passing database/schema names- Returns:
- connection
- Throws:
SQLException
- if failed to create a snowflake connection
-
connect
@SnowflakeJdbcInternalApi public Connection connect() throws SQLException
Connect method using connection configuration file- Returns:
- connection
- Throws:
SQLException
- if failed to create a snowflake connection
-
getMajorVersion
public int getMajorVersion()
- Specified by:
getMajorVersion
in interfaceDriver
-
getMinorVersion
public int getMinorVersion()
- Specified by:
getMinorVersion
in interfaceDriver
-
getPropertyInfo
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
- Specified by:
getPropertyInfo
in interfaceDriver
- Throws:
SQLException
-
jdbcCompliant
public boolean jdbcCompliant()
- Specified by:
jdbcCompliant
in interfaceDriver
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLogger
in interfaceDriver
- Throws:
SQLFeatureNotSupportedException
-
isDisableIncidents
public static boolean isDisableIncidents()
-
setDisableIncidents
public static void setDisableIncidents(boolean throttleIncidents)
-
main
public static final void main(String[] args)
-
-