| Modifier and Type | Field and Description |
|---|---|
static int |
DEBUG |
static int |
INFO |
static int |
OFF |
| Constructor and Description |
|---|
CloudSpannerDriver() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsURL(String url) |
Connection |
connect(String url,
Properties info)
Connects to a Google Cloud Spanner database.
|
static void |
deregister()
According to JDBC specification, this driver is registered against
DriverManager when the class is loaded. |
static int |
getDriverMajorVersion() |
static int |
getDriverMinorVersion() |
static int |
getLogLevel() |
int |
getMajorVersion() |
int |
getMinorVersion() |
Logger |
getParentLogger() |
DriverPropertyInfo[] |
getPropertyInfo(String url,
Properties info) |
static String |
getVersion() |
static boolean |
isRegistered() |
boolean |
jdbcCompliant() |
static String |
quoteIdentifier(String identifier) |
static void |
register()
Register the driver against
DriverManager. |
static void |
setLogLevel(int logLevel) |
static String |
unquoteIdentifier(String identifier) |
public static final int DEBUG
public static final int INFO
public static final int OFF
public Connection connect(String url, Properties info) throws SQLException
connect in interface Driverurl - Connection URL in the form
jdbc:cloudspanner://localhost;Project
=projectId;Instance=instanceId
;Database=databaseName;PvtKeyPath
=path_to_key_file;SimulateProductName=product_nameinfo - not usedSQLException - if an error occurs while connecting to Google Cloud Spannerpublic boolean acceptsURL(String url) throws SQLException
acceptsURL in interface DriverSQLExceptionpublic DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
getPropertyInfo in interface DriverSQLExceptionpublic int getMajorVersion()
getMajorVersion in interface Driverpublic static int getDriverMajorVersion()
public int getMinorVersion()
getMinorVersion in interface Driverpublic static int getDriverMinorVersion()
public static String getVersion()
public boolean jdbcCompliant()
jdbcCompliant in interface Driverpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface DriverSQLFeatureNotSupportedExceptionpublic static void setLogLevel(int logLevel)
public static int getLogLevel()
public static void register()
throws SQLException
DriverManager. This is done
automatically when the class is loaded. Dropping the driver from
DriverManager's list is possible using deregister() method.IllegalStateException - if the driver is already registeredSQLException - if registering the driver failspublic static void deregister()
throws SQLException
DriverManager when the class is loaded. To avoid leaks, this
method allow unregistering the driver so that the class can be gc'ed if
necessary.IllegalStateException - if the driver is not registeredSQLException - if deregistering the driver failspublic static boolean isRegistered()
true if the driver is registered against
DriverManagerCopyright © 2017. All rights reserved.