ISQLServerConnection, Serializable, AutoCloseable, Connection, WrapperSQLServerConnection43public class SQLServerConnection extends Object implements ISQLServerConnection, Serializable
SQLServerConnection manages transaction control for all statements that were created from it. SQLServerConnection may participate in XA distributed transactions managed via an XAResource adapter.
SQLServerConnection instantiates a new TDSChannel object for use by itself and all statement objects that are created under this connection. SQLServerConnection is thread safe.
SQLServerConnection manages a pool of prepared statement handles. Prepared statements are prepared once and typically executed many times with different data values for their parameters. Prepared statements are also maintained across logical (pooled) connection closes.
SQLServerConnection is not thread safe, however multiple statements created from a single connection can be processing simultaneously in concurrent threads.
This class's public functions need to be kept identical to the SQLServerConnectionPoolProxy's.
The API javadoc for JDBC API methods that this class implements are not repeated here. Please see Sun's JDBC API interfaces javadoc for those details. NOTE: All the public functions in this class also need to be defined in SQLServerConnectionPoolProxy Declare all new custom (non-static) Public APIs in ISQLServerConnection interface such that they can also be implemented by SQLServerConnectionPoolProxy
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLETRANSACTION_SNAPSHOT| Modifier and Type | Method | Description |
|---|---|---|
void |
abort(Executor executor) |
|
protected void |
beginRequestInternal() |
|
void |
clearWarnings() |
|
void |
close() |
|
void |
closeUnreferencedPreparedStatementHandles() |
Forces the un-prepare requests for any outstanding discarded prepared statements to be executed.
|
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 nType,
int nConcur,
int resultSetHoldability) |
|
Statement |
createStatement(int nType,
int nConcur,
int resultSetHoldability,
SQLServerStatementColumnEncryptionSetting stmtColEncSetting) |
Creates a
Statement object that will generate ResultSet objects with the given type,
concurrency, and holdability. |
Struct |
createStruct(String typeName,
Object[] attributes) |
|
protected void |
endRequestInternal() |
|
boolean |
getAutoCommit() |
|
String |
getCatalog() |
|
UUID |
getClientConnectionId() |
Returns the connection ID of the most recent connection attempt, regardless of whether the attempt succeeded or
failed.
|
Properties |
getClientInfo() |
|
String |
getClientInfo(String name) |
|
static Map<String,List<String>> |
getColumnEncryptionTrustedMasterKeyPaths() |
Returns the Trusted Master Key Paths.
|
boolean |
getDisableStatementPooling() |
Returns the value whether statement pooling is disabled.
|
int |
getDiscardedServerPreparedStatementCount() |
Returns the number of currently outstanding prepared statement un-prepare actions.
|
boolean |
getEnablePrepareOnFirstPreparedStatementCall() |
Returns the behavior for a specific connection instance.
|
int |
getHoldability() |
|
DatabaseMetaData |
getMetaData() |
|
int |
getNetworkTimeout() |
|
String |
getSchema() |
|
boolean |
getSendTimeAsDatetime() |
Returns the value of the sendTimeAsDatetime property.
|
int |
getServerPreparedStatementDiscardThreshold() |
Returns the behavior for a specific connection instance.
|
int |
getStatementHandleCacheEntryCount() |
Returns the current number of pooled prepared statement handles.
|
int |
getStatementPoolingCacheSize() |
Returns the size of the prepared statement cache for this connection.
|
int |
getTransactionIsolation() |
|
Map<String,Class<?>> |
getTypeMap() |
|
boolean |
getUseBulkCopyForBatchInsert() |
Returns the useBulkCopyForBatchInsert value.
|
SQLWarning |
getWarnings() |
|
boolean |
isClosed() |
|
boolean |
isReadOnly() |
|
boolean |
isStatementPoolingEnabled() |
Returns whether statement pooling is enabled or not for this connection.
|
boolean |
isValid(int timeout) |
Determine whether the connection is still valid.
|
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 nType,
int nConcur,
int resultSetHoldability) |
|
CallableStatement |
prepareCall(String sql,
int nType,
int nConcur,
int resultSetHoldability,
SQLServerStatementColumnEncryptionSetting stmtColEncSetiing) |
Creates a
CallableStatement object that will generate ResultSet objects with the given
type and concurrency. |
PreparedStatement |
prepareStatement(String sql) |
|
PreparedStatement |
prepareStatement(String sql,
int flag) |
|
PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes) |
|
PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes,
SQLServerStatementColumnEncryptionSetting stmtColEncSetting) |
Creates a default
PreparedStatement object capable of returning the auto-generated keys designated
by the given array. |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency) |
|
PreparedStatement |
prepareStatement(String sql,
int nType,
int nConcur,
int resultSetHoldability) |
|
PreparedStatement |
prepareStatement(String sql,
int nType,
int nConcur,
int resultSetHoldability,
SQLServerStatementColumnEncryptionSetting stmtColEncSetting) |
Creates a
PreparedStatement object that will generate ResultSet objects with the given
type, concurrency, and holdability. |
PreparedStatement |
prepareStatement(String sql,
int flag,
SQLServerStatementColumnEncryptionSetting stmtColEncSetting) |
Creates a default
PreparedStatement object that has the capability to retrieve auto-generated keys. |
PreparedStatement |
prepareStatement(String sql,
String[] columnNames) |
|
PreparedStatement |
prepareStatement(String sql,
String[] columnNames,
SQLServerStatementColumnEncryptionSetting stmtColEncSetting) |
Creates a default
PreparedStatement object capable of returning the auto-generated keys designated
by the given array. |
static void |
registerColumnEncryptionKeyStoreProviders(Map<String,SQLServerColumnEncryptionKeyStoreProvider> clientKeyStoreProviders) |
Registers key store providers in the globalCustomColumnEncryptionKeyStoreProviders.
|
void |
releaseSavepoint(Savepoint savepoint) |
|
static void |
removeColumnEncryptionTrustedMasterKeyPaths(String server) |
Removes the trusted Master key Path from the columnEncryptionTrustedMasterKeyPaths.
|
void |
rollback() |
|
void |
rollback(Savepoint s) |
|
void |
setAutoCommit(boolean newAutoCommitMode) |
|
void |
setCatalog(String catalog) |
|
void |
setClientInfo(String name,
String value) |
|
void |
setClientInfo(Properties properties) |
|
static void |
setColumnEncryptionKeyCacheTtl(int columnEncryptionKeyCacheTTL,
TimeUnit unit) |
Sets time-to-live for column encryption key entries in the column encryption key cache for the Always Encrypted
feature.
|
static void |
setColumnEncryptionTrustedMasterKeyPaths(Map<String,List<String>> trustedKeyPaths) |
Sets Trusted Master Key Paths in the columnEncryptionTrustedMasterKeyPaths.
|
void |
setDisableStatementPooling(boolean value) |
Sets the value to Disable/enable statement pooling.
|
void |
setEnablePrepareOnFirstPreparedStatementCall(boolean value) |
Sets the behavior for a specific connection instance.
|
void |
setHoldability(int holdability) |
|
void |
setNetworkTimeout(Executor executor,
int timeout) |
|
void |
setReadOnly(boolean readOnly) |
|
Savepoint |
setSavepoint() |
|
Savepoint |
setSavepoint(String sName) |
|
void |
setSchema(String schema) |
|
void |
setSendTimeAsDatetime(boolean sendTimeAsDateTimeValue) |
Sets the value of the sendTimeAsDatetime connection property.
|
void |
setServerPreparedStatementDiscardThreshold(int value) |
Sets the behavior for a specific connection instance.
|
void |
setStatementPoolingCacheSize(int value) |
Sets the size of the prepared statement cache for this connection.
|
void |
setTransactionIsolation(int level) |
|
void |
setTypeMap(Map<String,Class<?>> map) |
|
void |
setUseBulkCopyForBatchInsert(boolean useBulkCopyForBatchInsert) |
Specifies the flag for using Bulk Copy API for batch insert operations.
|
String |
toString() |
Provides a helper function to return an ID string suitable for tracing.
|
<T> T |
unwrap(Class<T> iface) |
|
static void |
updateColumnEncryptionTrustedMasterKeyPaths(String server,
List<String> trustedKeyPaths) |
Updates the columnEncryptionTrustedMasterKeyPaths with the new Server and trustedKeyPaths.
|
beginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValidpublic boolean getUseBulkCopyForBatchInsert()
public void setUseBulkCopyForBatchInsert(boolean useBulkCopyForBatchInsert)
useBulkCopyForBatchInsert - boolean value for useBulkCopyForBatchInsert.public final boolean getSendTimeAsDatetime()
ISQLServerConnectiongetSendTimeAsDatetime in interface ISQLServerConnectionpublic static void registerColumnEncryptionKeyStoreProviders(Map<String,SQLServerColumnEncryptionKeyStoreProvider> clientKeyStoreProviders) throws SQLServerException
clientKeyStoreProviders - a map containing the store providers information.SQLServerException - when an error occurspublic static void setColumnEncryptionTrustedMasterKeyPaths(Map<String,List<String>> trustedKeyPaths)
trustedKeyPaths - all master key paths that are trustedpublic static void updateColumnEncryptionTrustedMasterKeyPaths(String server, List<String> trustedKeyPaths)
server - String server nametrustedKeyPaths - all master key paths that are trustedpublic static void removeColumnEncryptionTrustedMasterKeyPaths(String server)
server - String server namepublic static Map<String,List<String>> getColumnEncryptionTrustedMasterKeyPaths()
public UUID getClientConnectionId() throws SQLServerException
ISQLServerConnectiongetClientConnectionId in interface ISQLServerConnectionSQLServerException - If any errors occur.public String toString()
public Statement createStatement() throws SQLServerException
createStatement in interface ConnectionSQLServerExceptionpublic PreparedStatement prepareStatement(String sql) throws SQLServerException
prepareStatement in interface ConnectionSQLServerExceptionpublic CallableStatement prepareCall(String sql) throws SQLServerException
prepareCall in interface ConnectionSQLServerExceptionpublic String nativeSQL(String sql) throws SQLServerException
nativeSQL in interface ConnectionSQLServerExceptionpublic void setAutoCommit(boolean newAutoCommitMode)
throws SQLServerException
setAutoCommit in interface ConnectionSQLServerExceptionpublic boolean getAutoCommit()
throws SQLServerException
getAutoCommit in interface ConnectionSQLServerExceptionpublic void commit()
throws SQLServerException
commit in interface ConnectionSQLServerExceptionpublic void rollback()
throws SQLServerException
rollback in interface ConnectionSQLServerExceptionpublic void abort(Executor executor) throws SQLException
abort in interface ConnectionSQLExceptionpublic void close()
throws SQLServerException
close in interface AutoCloseableclose in interface ConnectionSQLServerExceptionpublic boolean isClosed()
throws SQLServerException
isClosed in interface ConnectionSQLServerExceptionpublic DatabaseMetaData getMetaData() throws SQLServerException
getMetaData in interface ConnectionSQLServerExceptionpublic void setReadOnly(boolean readOnly)
throws SQLServerException
setReadOnly in interface ConnectionSQLServerExceptionpublic boolean isReadOnly()
throws SQLServerException
isReadOnly in interface ConnectionSQLServerExceptionpublic void setCatalog(String catalog) throws SQLServerException
setCatalog in interface ConnectionSQLServerExceptionpublic String getCatalog() throws SQLServerException
getCatalog in interface ConnectionSQLServerExceptionpublic void setTransactionIsolation(int level)
throws SQLServerException
setTransactionIsolation in interface ConnectionSQLServerExceptionpublic int getTransactionIsolation()
throws SQLServerException
getTransactionIsolation in interface ConnectionSQLServerExceptionpublic SQLWarning getWarnings() throws SQLServerException
getWarnings in interface ConnectionSQLServerExceptionpublic void clearWarnings()
throws SQLServerException
clearWarnings in interface ConnectionSQLServerExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLServerException
createStatement in interface ConnectionSQLServerExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLServerException
prepareStatement in interface ConnectionSQLServerExceptionpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLServerException
prepareCall in interface ConnectionSQLServerExceptionpublic void setTypeMap(Map<String,Class<?>> map) throws SQLException
setTypeMap in interface ConnectionSQLExceptionpublic Map<String,Class<?>> getTypeMap() throws SQLServerException
getTypeMap in interface ConnectionSQLServerExceptionpublic Statement createStatement(int nType, int nConcur, int resultSetHoldability) throws SQLServerException
createStatement in interface ConnectionSQLServerExceptionpublic Statement createStatement(int nType, int nConcur, int resultSetHoldability, SQLServerStatementColumnEncryptionSetting stmtColEncSetting) throws SQLServerException
ISQLServerConnectionStatement object that will generate ResultSet objects with the given type,
concurrency, and holdability. This method is the same as the createStatement method above, but it
allows the default result set type, concurrency, and holdability to be overridden.createStatement in interface ISQLServerConnectionnType - one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVEnConcur - one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEresultSetHoldability - one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITstmtColEncSetting - Specifies how data will be sent and received when reading and writing encrypted columns.Statement object that will generate ResultSet objects with the given
type, concurrency, and holdabilitySQLServerException - if a database access error occurs, this method is called on a closed connection or the given parameters
are not ResultSet constants indicating type, concurrency, and holdabilitypublic PreparedStatement prepareStatement(String sql, int nType, int nConcur, int resultSetHoldability) throws SQLServerException
prepareStatement in interface ConnectionSQLServerExceptionpublic PreparedStatement prepareStatement(String sql, int nType, int nConcur, int resultSetHoldability, SQLServerStatementColumnEncryptionSetting stmtColEncSetting) throws SQLServerException
ISQLServerConnectionPreparedStatement object that will generate ResultSet objects with the given
type, concurrency, and holdability.
This method is the same as the prepareStatement method above, but it allows the default result set
type, concurrency, and holdability to be overridden.
prepareStatement in interface ISQLServerConnectionsql - a String object that is the SQL statement to be sent to the database; may contain one or more
'?' IN parametersnType - one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVEnConcur - one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEresultSetHoldability - one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITstmtColEncSetting - Specifies how data will be sent and received when reading and writing encrypted columns.PreparedStatement object, containing the pre-compiled SQL statement, that will
generate ResultSet objects with the given type, concurrency, and holdabilitySQLServerException - if a database access error occurs, this method is called on a closed connection or the given parameters
are not ResultSet constants indicating type, concurrency, and holdabilitypublic CallableStatement prepareCall(String sql, int nType, int nConcur, int resultSetHoldability) throws SQLServerException
prepareCall in interface ConnectionSQLServerExceptionpublic CallableStatement prepareCall(String sql, int nType, int nConcur, int resultSetHoldability, SQLServerStatementColumnEncryptionSetting stmtColEncSetiing) throws SQLServerException
ISQLServerConnectionCallableStatement object that will generate ResultSet objects with the given
type and concurrency. This method is the same as the prepareCall method above, but it allows the
default result set type, result set concurrency type and holdability to be overridden.prepareCall in interface ISQLServerConnectionsql - a String object that is the SQL statement to be sent to the database; may contain on or more
'?' parametersnType - one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVEnConcur - one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEresultSetHoldability - one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITstmtColEncSetiing - Specifies how data will be sent and received when reading and writing encrypted columns.CallableStatement object, containing the pre-compiled SQL statement, that will
generate ResultSet objects with the given type, concurrency, and holdabilitySQLServerException - if a database access error occurs, this method is called on a closed connection or the given parameters
are not ResultSet constants indicating type, concurrency, and holdabilitypublic PreparedStatement prepareStatement(String sql, int flag) throws SQLServerException
prepareStatement in interface ConnectionSQLServerExceptionpublic PreparedStatement prepareStatement(String sql, int flag, SQLServerStatementColumnEncryptionSetting stmtColEncSetting) throws SQLServerException
ISQLServerConnectionPreparedStatement object that has the capability to retrieve auto-generated keys.
The given constant tells the driver whether it should make auto-generated keys available for retrieval. This
parameter is ignored if the SQL statement is not an INSERT statement, or an SQL statement able to
return auto-generated keys (the list of such statements is vendor-specific).
Note: This method is optimized for handling parametric SQL statements that benefit from precompilation. If
the driver supports precompilation, the method prepareStatement will send the statement to the
database for precompilation. Some drivers may not support precompilation. In this case, the statement may not be
sent to the database until the PreparedStatement object is executed. This has no direct effect on
users; however, it does affect which methods throw certain SQLExceptions.
Result sets created using the returned PreparedStatement object will by default be type
TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY. The holdability of
the created result sets can be determined by calling Connection.getHoldability().
prepareStatement in interface ISQLServerConnectionsql - an SQL statement that may contain one or more '?' IN parameter placeholdersflag - a flag indicating whether auto-generated keys should be returned; one of
Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYSstmtColEncSetting - Specifies how data will be sent and received when reading and writing encrypted columns.PreparedStatement object, containing the pre-compiled SQL statement, that will have
the capability of returning auto-generated keysSQLServerException - if a database access error occurs, this method is called on a closed connection or the given parameter is
not a Statement constant indicating whether auto-generated keys should be returnedpublic PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLServerException
prepareStatement in interface ConnectionSQLServerExceptionpublic PreparedStatement prepareStatement(String sql, int[] columnIndexes, SQLServerStatementColumnEncryptionSetting stmtColEncSetting) throws SQLServerException
ISQLServerConnectionPreparedStatement object capable of returning the auto-generated keys designated
by the given array. This array contains the indexes of the columns in the target table that contain the
auto-generated keys that should be made available. The driver will ignore the array if the SQL statement is not
an INSERT statement, or an SQL statement able to return auto-generated keys (the list of such
statements is vendor-specific).
An SQL statement with or without IN parameters can be pre-compiled and stored in a PreparedStatement
object. This object can then be used to efficiently execute this statement multiple times.
Note: This method is optimized for handling parametric SQL statements that benefit from precompilation. If
the driver supports precompilation, the method prepareStatement will send the statement to the
database for precompilation. Some drivers may not support precompilation. In this case, the statement may not be
sent to the database until the PreparedStatement object is executed. This has no direct effect on
users; however, it does affect which methods throw certain SQLExceptions.
Result sets created using the returned PreparedStatement object will by default be type
TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY. The holdability of
the created result sets can be determined by calling Connection.getHoldability().
prepareStatement in interface ISQLServerConnectionsql - an SQL statement that may contain one or more '?' IN parameter placeholderscolumnIndexes - an array of column indexes indicating the columns that should be returned from the inserted row or rowsstmtColEncSetting - Specifies how data will be sent and received when reading and writing encrypted columns.PreparedStatement object, containing the pre-compiled statement, that is capable of
returning the auto-generated keys designated by the given array of column indexesSQLServerException - if a database access error occurs or this method is called on a closed connectionpublic PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLServerException
prepareStatement in interface ConnectionSQLServerExceptionpublic PreparedStatement prepareStatement(String sql, String[] columnNames, SQLServerStatementColumnEncryptionSetting stmtColEncSetting) throws SQLServerException
ISQLServerConnectionPreparedStatement object capable of returning the auto-generated keys designated
by the given array. This array contains the names of the columns in the target table that contain the
auto-generated keys that should be returned. The driver will ignore the array if the SQL statement is not an
INSERT statement, or an SQL statement able to return auto-generated keys (the list of such
statements is vendor-specific).
An SQL statement with or without IN parameters can be pre-compiled and stored in a PreparedStatement
object. This object can then be used to efficiently execute this statement multiple times.
Note: This method is optimized for handling parametric SQL statements that benefit from precompilation. If
the driver supports precompilation, the method prepareStatement will send the statement to the
database for precompilation. Some drivers may not support precompilation. In this case, the statement may not be
sent to the database until the PreparedStatement object is executed. This has no direct effect on
users; however, it does affect which methods throw certain SQLExceptions.
Result sets created using the returned PreparedStatement object will by default be type
TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY. The holdability of
the created result sets can be determined by calling Connection.getHoldability().
prepareStatement in interface ISQLServerConnectionsql - an SQL statement that may contain one or more '?' IN parameter placeholderscolumnNames - an array of column names indicating the columns that should be returned from the inserted row or rowsstmtColEncSetting - Specifies how data will be sent and received when reading and writing encrypted columns.PreparedStatement object, containing the pre-compiled statement, that is capable of
returning the auto-generated keys designated by the given array of column namesSQLServerException - if a database access error occurs or this method is called on a closed connectionpublic void releaseSavepoint(Savepoint savepoint) throws SQLException
releaseSavepoint in interface ConnectionSQLExceptionpublic Savepoint setSavepoint(String sName) throws SQLServerException
setSavepoint in interface ConnectionSQLServerExceptionpublic Savepoint setSavepoint() throws SQLServerException
setSavepoint in interface ConnectionSQLServerExceptionpublic void rollback(Savepoint s) throws SQLServerException
rollback in interface ConnectionSQLServerExceptionpublic int getHoldability()
throws SQLServerException
getHoldability in interface ConnectionSQLServerExceptionpublic void setHoldability(int holdability)
throws SQLServerException
setHoldability in interface ConnectionSQLServerExceptionpublic int getNetworkTimeout()
throws SQLException
getNetworkTimeout in interface ConnectionSQLExceptionpublic void setNetworkTimeout(Executor executor, int timeout) throws SQLException
setNetworkTimeout in interface ConnectionSQLExceptionpublic String getSchema() throws SQLException
getSchema in interface ConnectionSQLExceptionpublic void setSchema(String schema) throws SQLException
setSchema in interface ConnectionSQLExceptionpublic void setSendTimeAsDatetime(boolean sendTimeAsDateTimeValue)
ISQLServerConnectionsetSendTimeAsDatetime in interface ISQLServerConnectionsendTimeAsDateTimeValue - enables/disables setting the sendTimeAsDatetime connection property. For more information about how the
Microsoft JDBC Driver for SQL Server configures java.sql.Time values before sending them to the server,
see Configuring How
java.sql.Time Values are Sent to the Server.public Array createArrayOf(String typeName, Object[] elements) throws SQLException
createArrayOf in interface ConnectionSQLExceptionpublic Blob createBlob() throws SQLException
createBlob in interface ConnectionSQLExceptionpublic Clob createClob() throws SQLException
createClob in interface ConnectionSQLExceptionpublic NClob createNClob() throws SQLException
createNClob in interface ConnectionSQLExceptionpublic SQLXML createSQLXML() throws SQLException
createSQLXML in interface ConnectionSQLExceptionpublic Struct createStruct(String typeName, Object[] attributes) throws SQLException
createStruct in interface ConnectionSQLExceptionpublic Properties getClientInfo() throws SQLException
getClientInfo in interface ConnectionSQLExceptionpublic String getClientInfo(String name) throws SQLException
getClientInfo in interface ConnectionSQLExceptionpublic void setClientInfo(Properties properties) throws SQLClientInfoException
setClientInfo in interface ConnectionSQLClientInfoExceptionpublic void setClientInfo(String name, String value) throws SQLClientInfoException
setClientInfo in interface ConnectionSQLClientInfoExceptionpublic boolean isValid(int timeout)
throws SQLException
isValid in interface Connectiontimeout - 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 WrapperSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionprotected void beginRequestInternal()
throws SQLException
SQLExceptionprotected void endRequestInternal()
throws SQLException
SQLExceptionpublic static void setColumnEncryptionKeyCacheTtl(int columnEncryptionKeyCacheTTL,
TimeUnit unit)
throws SQLServerException
columnEncryptionKeyCacheTTL - The timeunit in secondsunit - The Timeunit.SQLServerException - when an error occurspublic int getDiscardedServerPreparedStatementCount()
ISQLServerConnectiongetDiscardedServerPreparedStatementCount in interface ISQLServerConnectionpublic void closeUnreferencedPreparedStatementHandles()
ISQLServerConnectioncloseUnreferencedPreparedStatementHandles in interface ISQLServerConnectionpublic boolean getEnablePrepareOnFirstPreparedStatementCall()
ISQLServerConnectiongetEnablePrepareOnFirstPreparedStatementCall in interface ISQLServerConnectionpublic void setEnablePrepareOnFirstPreparedStatementCall(boolean value)
ISQLServerConnectionsetEnablePrepareOnFirstPreparedStatementCall in interface ISQLServerConnectionvalue - Changes the setting per the description.public int getServerPreparedStatementDiscardThreshold()
ISQLServerConnectiongetServerPreparedStatementDiscardThreshold in interface ISQLServerConnectionpublic void setServerPreparedStatementDiscardThreshold(int value)
ISQLServerConnectionsetServerPreparedStatementDiscardThreshold in interface ISQLServerConnectionvalue - Changes the setting per the description.public boolean getDisableStatementPooling()
ISQLServerConnectiongetDisableStatementPooling in interface ISQLServerConnectionpublic void setDisableStatementPooling(boolean value)
ISQLServerConnectionsetDisableStatementPooling in interface ISQLServerConnectionvalue - true to disable statement pooling, false to enable it.public int getStatementPoolingCacheSize()
ISQLServerConnectiongetStatementPoolingCacheSize in interface ISQLServerConnectionpublic int getStatementHandleCacheEntryCount()
ISQLServerConnectiongetStatementHandleCacheEntryCount in interface ISQLServerConnectionpublic boolean isStatementPoolingEnabled()
ISQLServerConnectionisStatementPoolingEnabled in interface ISQLServerConnectionpublic void setStatementPoolingCacheSize(int value)
ISQLServerConnectionsetStatementPoolingCacheSize in interface ISQLServerConnectionvalue - The new cache size.Copyright © 2018 Microsoft Corporation. All rights reserved.