public class Connection extends Object implements Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Constructor and Description |
|---|
Connection(Configuration conf,
ReentrantLock lock,
com.singlestore.jdbc.client.Client client) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(Executor executor) |
void |
cancelCurrentQuery()
Cancels the current query - clones the current protocol and executes a query using the new
connection.
|
void |
clearWarnings() |
void |
close() |
void |
commit() |
Array |
createArrayOf(String typeName,
Object[] elements) |
Blob |
createBlob() |
Clob |
createClob() |
NClob |
createNClob() |
SQLXML |
createSQLXML() |
Statement |
createStatement() |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency) |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
Struct |
createStruct(String typeName,
Object[] attributes) |
void |
fireStatementClosed(PreparedStatement prep) |
boolean |
getAutoCommit() |
String |
getCatalog() |
com.singlestore.jdbc.client.Client |
getClient() |
Properties |
getClientInfo() |
String |
getClientInfo(String name) |
Context |
getContext() |
protected ExceptionFactory |
getExceptionFactory() |
int |
getHoldability() |
int |
getLowercaseTableNames()
Are table case sensitive or not .
|
DatabaseMetaData |
getMetaData() |
int |
getNetworkTimeout() |
String |
getSchema() |
long |
getThreadId() |
int |
getTransactionIsolation() |
Map<String,Class<?>> |
getTypeMap() |
int |
getWaitTimeout() |
SQLWarning |
getWarnings() |
boolean |
isClosed() |
boolean |
isReadOnly() |
boolean |
isValid(int timeout) |
boolean |
isWrapperFor(Class<?> iface) |
String |
nativeSQL(String sql) |
CallableStatement |
prepareCall(String sql) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
PreparedStatement |
prepareInternal(String sql,
int autoGeneratedKeys,
int resultSetType,
int resultSetConcurrency,
boolean useBinary) |
PreparedStatement |
prepareStatement(String sql) |
PreparedStatement |
prepareStatement(String sql,
int autoGeneratedKeys) |
PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
PreparedStatement |
prepareStatement(String sql,
String[] columnNames) |
void |
releaseSavepoint(Savepoint savepoint) |
void |
reset()
Reset connection set has it was after creating a "fresh" new connection.
|
void |
rollback() |
void |
rollback(Savepoint savepoint) |
void |
setAutoCommit(boolean autoCommit) |
void |
setCatalog(String catalog) |
void |
setClientInfo(Properties properties) |
void |
setClientInfo(String name,
String value) |
void |
setHoldability(int holdability) |
void |
setNetworkTimeout(Executor executor,
int milliseconds) |
void |
setPoolConnection(SingleStorePoolConnection poolConnection) |
void |
setReadOnly(boolean readOnly) |
Savepoint |
setSavepoint() |
Savepoint |
setSavepoint(String name) |
void |
setSchema(String schema) |
void |
setTransactionIsolation(int level) |
void |
setTypeMap(Map<String,Class<?>> map) |
<T> T |
unwrap(Class<T> iface) |
public Connection(Configuration conf, ReentrantLock lock, com.singlestore.jdbc.client.Client client)
public void setPoolConnection(SingleStorePoolConnection poolConnection)
public void cancelCurrentQuery()
throws SQLException
SQLException - never thrownpublic Statement createStatement()
createStatement in interface Connectionpublic PreparedStatement prepareStatement(String sql) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic PreparedStatement prepareInternal(String sql, int autoGeneratedKeys, int resultSetType, int resultSetConcurrency, boolean useBinary) throws SQLException
SQLExceptionpublic CallableStatement prepareCall(String sql) throws SQLException
prepareCall in interface ConnectionSQLExceptionpublic String nativeSQL(String sql) throws SQLException
nativeSQL in interface ConnectionSQLExceptionpublic boolean getAutoCommit()
getAutoCommit in interface Connectionpublic void setAutoCommit(boolean autoCommit)
throws SQLException
setAutoCommit in interface ConnectionSQLExceptionpublic void commit()
throws SQLException
commit in interface ConnectionSQLExceptionpublic void rollback()
throws SQLException
rollback in interface ConnectionSQLExceptionpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface ConnectionSQLExceptionpublic boolean isClosed()
isClosed in interface Connectionpublic Context getContext()
public int getLowercaseTableNames()
throws SQLException
SQLException - if a connection error occurpublic DatabaseMetaData getMetaData()
getMetaData in interface Connectionpublic boolean isReadOnly()
isReadOnly in interface Connectionpublic void setReadOnly(boolean readOnly)
throws SQLException
setReadOnly in interface ConnectionSQLExceptionpublic String getCatalog() throws SQLException
getCatalog in interface ConnectionSQLExceptionpublic void setCatalog(String catalog) throws SQLException
setCatalog in interface ConnectionSQLExceptionpublic int getTransactionIsolation()
throws SQLException
getTransactionIsolation in interface ConnectionSQLExceptionpublic void setTransactionIsolation(int level)
throws SQLException
setTransactionIsolation in interface ConnectionSQLExceptionpublic SQLWarning getWarnings() throws SQLException
getWarnings in interface ConnectionSQLExceptionpublic void clearWarnings()
clearWarnings in interface Connectionpublic Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
createStatement in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareCall in interface ConnectionSQLExceptionpublic Map<String,Class<?>> getTypeMap()
getTypeMap in interface Connectionpublic void setTypeMap(Map<String,Class<?>> map) throws SQLException
setTypeMap in interface ConnectionSQLExceptionpublic int getHoldability()
getHoldability in interface Connectionpublic void setHoldability(int holdability)
setHoldability in interface Connectionpublic Savepoint setSavepoint() throws SQLException
setSavepoint in interface ConnectionSQLExceptionpublic Savepoint setSavepoint(String name) throws SQLException
setSavepoint in interface ConnectionSQLExceptionpublic void rollback(Savepoint savepoint) throws SQLException
rollback in interface ConnectionSQLExceptionpublic void releaseSavepoint(Savepoint savepoint) throws SQLException
releaseSavepoint in interface ConnectionSQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
createStatement in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareCall in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic Clob createClob()
createClob in interface Connectionpublic Blob createBlob()
createBlob in interface Connectionpublic NClob createNClob()
createNClob in interface Connectionpublic SQLXML createSQLXML() throws SQLException
createSQLXML in interface ConnectionSQLExceptionpublic boolean isValid(int timeout)
throws SQLException
isValid in interface ConnectionSQLExceptionpublic void setClientInfo(String name, String value)
setClientInfo in interface Connectionpublic String getClientInfo(String name)
getClientInfo in interface Connectionpublic Properties getClientInfo()
getClientInfo in interface Connectionpublic void setClientInfo(Properties properties)
setClientInfo in interface Connectionpublic Array createArrayOf(String typeName, Object[] elements) throws SQLException
createArrayOf in interface ConnectionSQLExceptionpublic Struct createStruct(String typeName, Object[] attributes) throws SQLException
createStruct in interface ConnectionSQLExceptionpublic String getSchema()
getSchema in interface Connectionpublic void setSchema(String schema)
setSchema in interface Connectionpublic void abort(Executor executor) throws SQLException
abort in interface ConnectionSQLExceptionpublic void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
setNetworkTimeout in interface ConnectionSQLExceptionpublic int getNetworkTimeout()
getNetworkTimeout in interface Connectionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> iface)
isWrapperFor in interface Wrapperpublic int getWaitTimeout()
public com.singlestore.jdbc.client.Client getClient()
public void reset()
throws SQLException
BUT : - session variable state are reset only if option useResetConnection is set and - if using the option "useServerPrepStmts", PREPARE statement are still prepared
SQLException - if resetting operation failedpublic long getThreadId()
public void fireStatementClosed(PreparedStatement prep)
protected ExceptionFactory getExceptionFactory()
Copyright © 2023 SingleStore. All rights reserved.