public class SQLServerConnection extends Object implements ISQLServerConnection
TRANSACTION_SNAPSHOT
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
public final boolean getSendTimeAsDatetime()
public static void registerColumnEncryptionKeyStoreProviders(Map<String,SQLServerColumnEncryptionKeyStoreProvider> clientKeyStoreProviders) throws SQLServerException
SQLServerException
public static void setColumnEncryptionTrustedMasterKeyPaths(Map<String,List<String>> trustedKeyPaths)
public static void updateColumnEncryptionTrustedMasterKeyPaths(String server, List<String> trustedKeyPaths)
public static void removeColumnEncryptionTrustedMasterKeyPaths(String server)
public static Map<String,List<String>> getColumnEncryptionTrustedMasterKeyPaths()
public UUID getClientConnectionId() throws SQLServerException
getClientConnectionId
in interface ISQLServerConnection
SQLServerException
public String toString()
public Statement createStatement() throws SQLServerException
createStatement
in interface Connection
SQLServerException
public PreparedStatement prepareStatement(String sql) throws SQLServerException
prepareStatement
in interface Connection
SQLServerException
public CallableStatement prepareCall(String sql) throws SQLServerException
prepareCall
in interface Connection
SQLServerException
public String nativeSQL(String sql) throws SQLServerException
nativeSQL
in interface Connection
SQLServerException
public void setAutoCommit(boolean newAutoCommitMode) throws SQLServerException
setAutoCommit
in interface Connection
SQLServerException
public boolean getAutoCommit() throws SQLServerException
getAutoCommit
in interface Connection
SQLServerException
public void commit() throws SQLServerException
commit
in interface Connection
SQLServerException
- if no transaction exists.public void rollback() throws SQLServerException
rollback
in interface Connection
SQLServerException
- if no transaction exists or if the connection is in auto-commit mode.public void abort(Executor executor) throws SQLException
abort
in interface Connection
SQLException
public void close() throws SQLServerException
close
in interface AutoCloseable
close
in interface Connection
SQLServerException
public boolean isClosed() throws SQLServerException
isClosed
in interface Connection
SQLServerException
public DatabaseMetaData getMetaData() throws SQLServerException
getMetaData
in interface Connection
SQLServerException
public void setReadOnly(boolean readOnly) throws SQLServerException
setReadOnly
in interface Connection
SQLServerException
public boolean isReadOnly() throws SQLServerException
isReadOnly
in interface Connection
SQLServerException
public void setCatalog(String catalog) throws SQLServerException
setCatalog
in interface Connection
SQLServerException
public String getCatalog() throws SQLServerException
getCatalog
in interface Connection
SQLServerException
public void setTransactionIsolation(int level) throws SQLServerException
setTransactionIsolation
in interface Connection
SQLServerException
public int getTransactionIsolation() throws SQLServerException
getTransactionIsolation
in interface Connection
SQLServerException
public SQLWarning getWarnings() throws SQLServerException
getWarnings
in interface Connection
SQLServerException
public void clearWarnings() throws SQLServerException
clearWarnings
in interface Connection
SQLServerException
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLServerException
createStatement
in interface Connection
SQLServerException
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLServerException
prepareStatement
in interface Connection
SQLServerException
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLServerException
prepareCall
in interface Connection
SQLServerException
public void setTypeMap(Map<String,Class<?>> map) throws SQLServerException
setTypeMap
in interface Connection
SQLServerException
public Map<String,Class<?>> getTypeMap() throws SQLServerException
getTypeMap
in interface Connection
SQLServerException
public Statement createStatement(int nType, int nConcur, int statementHoldability) throws SQLServerException
createStatement
in interface Connection
SQLServerException
public Statement createStatement(int nType, int nConcur, int statementHoldability, SQLServerStatementColumnEncryptionSetting stmtColEncSetting) throws SQLServerException
SQLServerException
public PreparedStatement prepareStatement(String sql, int nType, int nConcur, int statementHoldability) throws SQLServerException
prepareStatement
in interface Connection
SQLServerException
public PreparedStatement prepareStatement(String sql, int nType, int nConcur, int statementHoldability, SQLServerStatementColumnEncryptionSetting stmtColEncSetting) throws SQLServerException
SQLServerException
public CallableStatement prepareCall(String sql, int nType, int nConcur, int statementHoldability) throws SQLServerException
prepareCall
in interface Connection
SQLServerException
public CallableStatement prepareCall(String sql, int nType, int nConcur, int statementHoldability, SQLServerStatementColumnEncryptionSetting stmtColEncSetiing) throws SQLServerException
SQLServerException
public PreparedStatement prepareStatement(String sql, int flag) throws SQLServerException
prepareStatement
in interface Connection
SQLServerException
public PreparedStatement prepareStatement(String sql, int flag, SQLServerStatementColumnEncryptionSetting stmtColEncSetting) throws SQLServerException
SQLServerException
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLServerException
prepareStatement
in interface Connection
SQLServerException
public PreparedStatement prepareStatement(String sql, int[] columnIndexes, SQLServerStatementColumnEncryptionSetting stmtColEncSetting) throws SQLServerException
SQLServerException
public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLServerException
prepareStatement
in interface Connection
SQLServerException
public PreparedStatement prepareStatement(String sql, String[] columnNames, SQLServerStatementColumnEncryptionSetting stmtColEncSetting) throws SQLServerException
SQLServerException
public void releaseSavepoint(Savepoint savepoint) throws SQLServerException
releaseSavepoint
in interface Connection
SQLServerException
public Savepoint setSavepoint(String sName) throws SQLServerException
setSavepoint
in interface Connection
SQLServerException
public Savepoint setSavepoint() throws SQLServerException
setSavepoint
in interface Connection
SQLServerException
public void rollback(Savepoint s) throws SQLServerException
rollback
in interface Connection
SQLServerException
public int getHoldability() throws SQLServerException
getHoldability
in interface Connection
SQLServerException
public void setHoldability(int holdability) throws SQLServerException
setHoldability
in interface Connection
SQLServerException
public int getNetworkTimeout() throws SQLException
getNetworkTimeout
in interface Connection
SQLException
public void setNetworkTimeout(Executor executor, int timeout) throws SQLException
setNetworkTimeout
in interface Connection
SQLException
public String getSchema() throws SQLException
getSchema
in interface Connection
SQLException
public void setSchema(String schema) throws SQLException
setSchema
in interface Connection
SQLException
public void setSendTimeAsDatetime(boolean sendTimeAsDateTimeValue)
public Array createArrayOf(String typeName, Object[] elements) throws SQLException
createArrayOf
in interface Connection
SQLException
public Blob createBlob() throws SQLException
createBlob
in interface Connection
SQLException
public Clob createClob() throws SQLException
createClob
in interface Connection
SQLException
public NClob createNClob() throws SQLException
createNClob
in interface Connection
SQLException
public SQLXML createSQLXML() throws SQLException
createSQLXML
in interface Connection
SQLException
public Struct createStruct(String typeName, Object[] attributes) throws SQLException
createStruct
in interface Connection
SQLException
public Properties getClientInfo() throws SQLException
getClientInfo
in interface Connection
SQLException
public String getClientInfo(String name) throws SQLException
getClientInfo
in interface Connection
SQLException
public void setClientInfo(Properties properties) throws SQLClientInfoException
setClientInfo
in interface Connection
SQLClientInfoException
public void setClientInfo(String name, String value) throws SQLClientInfoException
setClientInfo
in interface Connection
SQLClientInfoException
public boolean isValid(int timeout) throws SQLException
isValid
in interface Connection
timeout
- The time in seconds to wait for the database operation used to validate the
connection to complete. If the timeout period expires before the operation
completes, this method returns false. A value of 0 indicates a timeout is
not applied to the database operation. Note that if the value is 0, the call
to isValid may block indefinitely if the connection is not valid...SQLException
- if the value supplied for the timeout is less than 0.public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor
in interface Wrapper
SQLException
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap
in interface Wrapper
SQLException
public static void setColumnEncryptionKeyCacheTtl(int columnEncryptionKeyCacheTTL, TimeUnit unit) throws SQLServerException
SQLServerException
Copyright © 2016. All rights reserved.