public class BigQueryConnection extends BigQueryNoOpsConnectionAn implementation of java.sql.Connection for establishing a connection with BigQuery and executing SQL statements See Also: BigQueryStatement
Inheritance
java.lang.Object > com.google.cloud.bigquery.jdbc.BigQueryNoOpsConnection > BigQueryConnectionMethods
abort(Executor executor)
public void abort(Executor executor)| Parameter | |
|---|---|
| Name | Description |
executor |
Executor |
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
addOpenStatements(Statement statement)
protected void addOpenStatements(Statement statement)| Parameter | |
|---|---|
| Name | Description |
statement |
Statement |
clearWarnings()
public void clearWarnings()close()
public void close()Releases this BigQueryConnection object's BigQuery resources immediately instead of
waiting for them to be automatically released.
See Also: Connection#close()
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
if a BigQuery access error occurs |
commit()
public void commit()createStatement()
public Statement createStatement()Creates and returns a new Statement object for executing BigQuery SQL queries
See Also: Connection#createStatement()
| Returns | |
|---|---|
| Type | Description |
Statement |
a new |
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
createStatement(int resultSetType, int resultSetConcurrency)
public Statement createStatement(int resultSetType, int resultSetConcurrency)Creates and returns a new Statement object for executing BigQuery SQL queries. This
method is similar to BigQueryConnection#createStatement(), but it overrides the type
and concurrency of the generated ResultSet.
See Also: Connection#createStatement(int, int), ResultSet
| Parameters | |
|---|---|
| Name | Description |
resultSetType |
int |
resultSetConcurrency |
int |
| Returns | |
|---|---|
| Type | Description |
Statement |
|
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
if a BigQuery connection error occurs, if this method is called on a
closed connection, or the given parameters are not |
createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)Creates and returns a new Statement object for executing BigQuery SQL queries. This
method is similar to BigQueryConnection#createStatement(), but it overrides the type,
concurrency, and holdability of the generated ResultSet.
See Also: ResultSet, Connection#createStatement(int, int, int)
| Parameters | |
|---|---|
| Name | Description |
resultSetType |
int |
resultSetConcurrency |
int |
resultSetHoldability |
int |
| Returns | |
|---|---|
| Type | Description |
Statement |
|
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
if a BigQuery connection error occurs, if this method is called on a
closed connection, or the given parameters are not |
getAuthProperties()
public Map<String,String> getAuthProperties()| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getAutoCommit()
public boolean getAutoCommit()| Returns | |
|---|---|
| Type | Description |
boolean |
|
getCatalog()
public String getCatalog()| Returns | |
|---|---|
| Type | Description |
String |
|
getClientInfo()
public Properties getClientInfo()| Returns | |
|---|---|
| Type | Description |
Properties |
|
getClientInfo(String name)
public String getClientInfo(String name)| Parameter | |
|---|---|
| Name | Description |
name |
String |
| Returns | |
|---|---|
| Type | Description |
String |
|
getDefaultDataset()
public DatasetId getDefaultDataset()| Returns | |
|---|---|
| Type | Description |
DatasetId |
|
getHoldability()
public int getHoldability()| Returns | |
|---|---|
| Type | Description |
int |
|
getLocation()
public String getLocation()| Returns | |
|---|---|
| Type | Description |
String |
|
getMetaData()
public DatabaseMetaData getMetaData()| Returns | |
|---|---|
| Type | Description |
DatabaseMetaData |
|
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
getTransactionIsolation()
public int getTransactionIsolation()| Returns | |
|---|---|
| Type | Description |
int |
|
getWarnings()
public SQLWarning getWarnings()| Returns | |
|---|---|
| Type | Description |
SQLWarning |
|
isClosed()
public boolean isClosed()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTransactionStarted()
public boolean isTransactionStarted()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isValid(int timeout)
public boolean isValid(int timeout)| Parameter | |
|---|---|
| Name | Description |
timeout |
int |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
prepareCall(String sql)
public CallableStatement prepareCall(String sql)| Parameter | |
|---|---|
| Name | Description |
sql |
String |
| Returns | |
|---|---|
| Type | Description |
CallableStatement |
|
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
prepareCall(String sql, int resultSetType, int resultSetConcurrency)
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency)| Parameters | |
|---|---|
| Name | Description |
sql |
String |
resultSetType |
int |
resultSetConcurrency |
int |
| Returns | |
|---|---|
| Type | Description |
CallableStatement |
|
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)| Parameters | |
|---|---|
| Name | Description |
sql |
String |
resultSetType |
int |
resultSetConcurrency |
int |
resultSetHoldability |
int |
| Returns | |
|---|---|
| Type | Description |
CallableStatement |
|
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
prepareStatement(String sql)
public PreparedStatement prepareStatement(String sql)| Parameter | |
|---|---|
| Name | Description |
sql |
String |
| Returns | |
|---|---|
| Type | Description |
PreparedStatement |
|
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
prepareStatement(String sql, int autoGeneratedKeys)
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)| Parameters | |
|---|---|
| Name | Description |
sql |
String |
autoGeneratedKeys |
int |
| Returns | |
|---|---|
| Type | Description |
PreparedStatement |
|
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)| Parameters | |
|---|---|
| Name | Description |
sql |
String |
resultSetType |
int |
resultSetConcurrency |
int |
| Returns | |
|---|---|
| Type | Description |
PreparedStatement |
|
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)| Parameters | |
|---|---|
| Name | Description |
sql |
String |
resultSetType |
int |
resultSetConcurrency |
int |
resultSetHoldability |
int |
| Returns | |
|---|---|
| Type | Description |
PreparedStatement |
|
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
prepareStatement(String sql, int[] columnIndexes)
public PreparedStatement prepareStatement(String sql, int[] columnIndexes)| Parameters | |
|---|---|
| Name | Description |
sql |
String |
columnIndexes |
int[] |
| Returns | |
|---|---|
| Type | Description |
PreparedStatement |
|
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
rollback()
public void rollback()| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
setAutoCommit(boolean autoCommit)
public void setAutoCommit(boolean autoCommit)Sets this connection's auto-commit mode to the given state.
If this method is called during a transaction and the auto-commit mode is changed, the
transaction is committed. If setAutoCommit is called and the auto-commit mode is not changed,
the call is a no-op.
See Also: Connection#setAutoCommit(boolean)
| Parameter | |
|---|---|
| Name | Description |
autoCommit |
boolean
|
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
setClientInfo(String name, String value)
public void setClientInfo(String name, String value)| Parameters | |
|---|---|
| Name | Description |
name |
String |
value |
String |
setClientInfo(Properties properties)
public void setClientInfo(Properties properties)| Parameter | |
|---|---|
| Name | Description |
properties |
Properties |
setHoldability(int holdability)
public void setHoldability(int holdability)| Parameter | |
|---|---|
| Name | Description |
holdability |
int |
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|
setTransactionIsolation(int level)
public void setTransactionIsolation(int level)| Parameter | |
|---|---|
| Name | Description |
level |
int |
| Exceptions | |
|---|---|
| Type | Description |
SQLException |
|