public class SQLServerStatement extends Object implements ISQLServerStatement
| Modifier and Type | Field and Description |
|---|---|
protected SQLServerStatementColumnEncryptionSetting |
stmtColumnEncriptionSetting |
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO| Modifier and Type | Method and Description |
|---|---|
void |
addBatch(String sql) |
void |
cancel() |
void |
clearBatch() |
void |
clearWarnings() |
void |
close() |
void |
closeOnCompletion() |
boolean |
execute(String sql)
Execute an update or query.
|
boolean |
execute(String sql,
int autoGeneratedKeys) |
boolean |
execute(String sql,
int[] columnIndexes) |
boolean |
execute(String sql,
String[] columnNames) |
int[] |
executeBatch()
Send a batch of statements to the database.
|
long[] |
executeLargeBatch() |
long |
executeLargeUpdate(String sql)
Execute a JDBC update
|
long |
executeLargeUpdate(String sql,
int autoGeneratedKeys) |
long |
executeLargeUpdate(String sql,
int[] columnIndexes) |
long |
executeLargeUpdate(String sql,
String[] columnNames) |
ResultSet |
executeQuery(String sql)
Execute a result set query
|
int |
executeUpdate(String sql)
Execute a JDBC update
|
int |
executeUpdate(String sql,
int autoGeneratedKeys) |
int |
executeUpdate(String sql,
int[] columnIndexes) |
int |
executeUpdate(String sql,
String[] columnNames) |
Connection |
getConnection()
Return the statement's connection
|
int |
getFetchDirection() |
int |
getFetchSize() |
ResultSet |
getGeneratedKeys() |
long |
getLargeMaxRows() |
long |
getLargeUpdateCount() |
int |
getMaxFieldSize() |
int |
getMaxRows() |
boolean |
getMoreResults()
Check for more results in the TDS stream
|
boolean |
getMoreResults(int mode) |
int |
getQueryTimeout() |
String |
getResponseBuffering() |
ResultSet |
getResultSet() |
int |
getResultSetConcurrency() |
int |
getResultSetHoldability() |
int |
getResultSetType() |
int |
getUpdateCount() |
SQLWarning |
getWarnings() |
boolean |
isClosed() |
boolean |
isCloseOnCompletion() |
boolean |
isPoolable() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setCursorName(String name) |
void |
setEscapeProcessing(boolean enable) |
void |
setFetchDirection(int nDir) |
void |
setFetchSize(int rows) |
void |
setLargeMaxRows(long max) |
void |
setMaxFieldSize(int max) |
void |
setMaxRows(int max) |
void |
setPoolable(boolean poolable) |
void |
setQueryTimeout(int seconds) |
void |
setResponseBuffering(String value) |
String |
toString()
The statement's id for logging info
|
<T> T |
unwrap(Class<T> iface) |
protected SQLServerStatementColumnEncryptionSetting stmtColumnEncriptionSetting
public String toString()
public void close()
throws SQLServerException
close in interface AutoCloseableclose in interface StatementSQLServerExceptionpublic void closeOnCompletion()
throws SQLException
closeOnCompletion in interface StatementSQLExceptionpublic ResultSet executeQuery(String sql) throws SQLServerException
executeQuery in interface Statementsql - the SQL querySQLServerException - The SQL was invalid.public int executeUpdate(String sql) throws SQLServerException
executeUpdate in interface Statementsql - the SQL querySQLServerException - The SQL was invalid.public long executeLargeUpdate(String sql) throws SQLServerException
executeLargeUpdate in interface Statementsql - the SQL querySQLServerException - The SQL was invalid.public boolean execute(String sql) throws SQLServerException
execute in interface Statementsql - The update or query.SQLServerException - The SQL statement was not valid.public final int getMaxFieldSize()
throws SQLServerException
getMaxFieldSize in interface StatementSQLServerExceptionpublic final void setMaxFieldSize(int max)
throws SQLServerException
setMaxFieldSize in interface StatementSQLServerExceptionpublic final int getMaxRows()
throws SQLServerException
getMaxRows in interface StatementSQLServerExceptionpublic final long getLargeMaxRows()
throws SQLServerException
getLargeMaxRows in interface StatementSQLServerExceptionpublic final void setMaxRows(int max)
throws SQLServerException
setMaxRows in interface StatementSQLServerExceptionpublic final void setLargeMaxRows(long max)
throws SQLServerException
setLargeMaxRows in interface StatementSQLServerExceptionpublic final void setEscapeProcessing(boolean enable)
throws SQLServerException
setEscapeProcessing in interface StatementSQLServerExceptionpublic final int getQueryTimeout()
throws SQLServerException
getQueryTimeout in interface StatementSQLServerExceptionpublic final void setQueryTimeout(int seconds)
throws SQLServerException
setQueryTimeout in interface StatementSQLServerExceptionpublic final void cancel()
throws SQLServerException
cancel in interface StatementSQLServerExceptionpublic final SQLWarning getWarnings() throws SQLServerException
getWarnings in interface StatementSQLServerExceptionpublic final void clearWarnings()
throws SQLServerException
clearWarnings in interface StatementSQLServerExceptionpublic final void setCursorName(String name) throws SQLServerException
setCursorName in interface StatementSQLServerExceptionpublic final ResultSet getResultSet() throws SQLServerException
getResultSet in interface StatementSQLServerExceptionpublic final int getUpdateCount()
throws SQLServerException
getUpdateCount in interface StatementSQLServerExceptionpublic final long getLargeUpdateCount()
throws SQLServerException
getLargeUpdateCount in interface StatementSQLServerExceptionpublic final boolean getMoreResults()
throws SQLServerException
getMoreResults in interface StatementSQLServerExceptionpublic final void setFetchDirection(int nDir)
throws SQLServerException
setFetchDirection in interface StatementSQLServerExceptionpublic final int getFetchDirection()
throws SQLServerException
getFetchDirection in interface StatementSQLServerExceptionpublic final void setFetchSize(int rows)
throws SQLServerException
setFetchSize in interface StatementSQLServerExceptionpublic final int getFetchSize()
throws SQLServerException
getFetchSize in interface StatementSQLServerExceptionpublic final int getResultSetConcurrency()
throws SQLServerException
getResultSetConcurrency in interface StatementSQLServerExceptionpublic final int getResultSetType()
throws SQLServerException
getResultSetType in interface StatementSQLServerExceptionpublic void addBatch(String sql) throws SQLServerException
addBatch in interface StatementSQLServerExceptionpublic void clearBatch()
throws SQLServerException
clearBatch in interface StatementSQLServerExceptionpublic int[] executeBatch()
throws SQLServerException,
BatchUpdateException
executeBatch in interface StatementSQLServerExceptionBatchUpdateExceptionpublic long[] executeLargeBatch()
throws SQLServerException,
BatchUpdateException
executeLargeBatch in interface StatementSQLServerExceptionBatchUpdateExceptionpublic final Connection getConnection() throws SQLServerException
getConnection in interface StatementSQLServerExceptionpublic final int getResultSetHoldability()
throws SQLException
getResultSetHoldability in interface StatementSQLExceptionpublic final boolean execute(String sql, int autoGeneratedKeys) throws SQLServerException
execute in interface StatementSQLServerExceptionpublic final boolean execute(String sql, int[] columnIndexes) throws SQLServerException
execute in interface StatementSQLServerExceptionpublic final boolean execute(String sql, String[] columnNames) throws SQLServerException
execute in interface StatementSQLServerExceptionpublic final int executeUpdate(String sql, int autoGeneratedKeys) throws SQLServerException
executeUpdate in interface StatementSQLServerExceptionpublic final long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLServerException
executeLargeUpdate in interface StatementSQLServerExceptionpublic final int executeUpdate(String sql, int[] columnIndexes) throws SQLServerException
executeUpdate in interface StatementSQLServerExceptionpublic final long executeLargeUpdate(String sql, int[] columnIndexes) throws SQLServerException
executeLargeUpdate in interface StatementSQLServerExceptionpublic final int executeUpdate(String sql, String[] columnNames) throws SQLServerException
executeUpdate in interface StatementSQLServerExceptionpublic final long executeLargeUpdate(String sql, String[] columnNames) throws SQLServerException
executeLargeUpdate in interface StatementSQLServerExceptionpublic final ResultSet getGeneratedKeys() throws SQLServerException
getGeneratedKeys in interface StatementSQLServerExceptionpublic final boolean getMoreResults(int mode)
throws SQLServerException
getMoreResults in interface StatementSQLServerExceptionpublic boolean isClosed()
throws SQLException
isClosed in interface StatementSQLExceptionpublic boolean isCloseOnCompletion()
throws SQLException
isCloseOnCompletion in interface StatementSQLExceptionpublic boolean isPoolable()
throws SQLException
isPoolable in interface StatementSQLExceptionpublic void setPoolable(boolean poolable)
throws SQLException
setPoolable in interface StatementSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic final void setResponseBuffering(String value) throws SQLServerException
setResponseBuffering in interface ISQLServerStatementSQLServerExceptionpublic final String getResponseBuffering() throws SQLServerException
getResponseBuffering in interface ISQLServerStatementSQLServerExceptionCopyright © 2016. All rights reserved.