Statement
object is used for executing a static SQL statement and obtaining the results produced by it.
Only one ResultSet
per Statement
can be open at any point in time. Therefore, if the reading of one ResultSet
is interleaved with the reading of another, each must have been generated by different Statements
. All Statements
execute methods implicitly close a statement's current ResultSet
if an open one exists.
Statement.java の 60 行で定義されています。
Public メソッド | |
Statement (Connection c) | |
void | addBatch (String sql) throws SQLException |
void | cancel () throws SQLException |
void | clearBatch () throws SQLException |
void | clearWarnings () throws SQLException |
int[] | executeBatch () throws SQLException |
void | close () throws SQLException |
boolean | execute (String sql) throws SQLException |
java.sql.ResultSet | executeQuery (String sql) throws SQLException |
int | executeUpdate (String sql) throws SQLException |
java.sql.Connection | getConnection () throws SQLException |
int | getFetchDirection () throws SQLException |
int | getFetchSize () throws SQLException |
int | getMaxFieldSize () throws SQLException |
int | getMaxRows () throws SQLException |
boolean | getMoreResults () throws SQLException |
int | getQueryTimeout () throws SQLException |
java.sql.ResultSet | getResultSet () throws SQLException |
int | getResultSetConcurrency () throws SQLException |
int | getResultSetType () throws SQLException |
int | getUpdateCount () throws SQLException |
SQLWarning | getWarnings () throws SQLException |
void | setCursorName (String name) throws SQLException |
void | setEscapeProcessing (boolean enable) throws SQLException |
void | setFetchDirection (int direction) throws SQLException |
void | setFetchSize (int rows) throws SQLException |
void | setMaxFieldSize (int max) throws SQLException |
void | setMaxRows (int max) throws SQLException |
void | setQueryTimeout (int seconds) throws SQLException |
void | setResultSetConcurrency (int value) throws SQLException |
void | setResultSetType (int value) throws SQLException |
boolean | getMoreResults (int current) throws SQLException |
java.sql.ResultSet | getGeneratedKeys () throws SQLException |
int | executeUpdate (String sql, int autoGeneratedKeys) throws SQLException |
int | executeUpdate (String sql, int columnIndexes[]) throws SQLException |
int | executeUpdate (String sql, String columnNames[]) throws SQLException |
boolean | execute (String sql, int autoGeneratedKeys) throws SQLException |
boolean | execute (String sql, int columnIndexes[]) throws SQLException |
boolean | execute (String sql, String columnNames[]) throws SQLException |
int | getResultSetHoldability () throws SQLException |
Protected メソッド | |
java.sql.ResultSet | executeQuery (String sqlSkeleton, String sqlQuery) throws SQLException |
int | executeUpdateWithSkeleton (String sqlSkeleton, String sqlQuery) throws SQLException |
Protected 変数 | |
Connection | connection = null |
boolean | escapeProcessing = true |
java.sql.ResultSet | generatedKeys = null |
int | generatedKeysFlag = java.sql.Statement.NO_GENERATED_KEYS |
Private 変数 | |
Vector | batch = null |
SQLWarning | warnings = null |
java.sql.ResultSet | result = null |
int | updateCount = -1 |
int | timeout = 0 |
int | fetchSize = 0 |
String | cursorName |
int | resultSetType |
int | maxFieldSize = 0 |
int | maxRows = 0 |
|
Creates a new
参照先 org.objectweb.cjdbc.driver.Statement.connection, と org.objectweb.cjdbc.driver.Statement.resultSetType.
|
|
Adds sql to the current list of commands.
参照先 org.objectweb.cjdbc.driver.Statement.batch.
|
|
Could be use by one thread to cancel a statement that is being executed by another thread. We don't support that for instance.
|
|
Empties the current list of commands.
参照先 org.objectweb.cjdbc.driver.Statement.batch.
|
|
After this call,
参照先 org.objectweb.cjdbc.driver.Statement.warnings.
|
|
In many cases, it is desirable to immediately release a Statement's database and JDBC resources instead of waiting for this to happen when it is automatically closed. The close method provides this immediate release. Note: A Statement is automatically closed when it is garbage collected. When a Statement is closed, its current ResultSet, if one exists, is also closed.
org.objectweb.cjdbc.driver.PreparedStatementで再定義されています。 Statement.java の 209 行で定義されています。 参照先 org.objectweb.cjdbc.driver.Statement.connection, と org.objectweb.cjdbc.driver.Statement.result.
|
|
Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the names 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 given SQL statement is not an In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.
The
|
|
Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. 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 given SQL statement is not an Under some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.
The
|
|
Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval. The driver will ignore this signal if the SQL statement is not an In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.
The
参照先 org.objectweb.cjdbc.driver.Statement.execute(), と org.objectweb.cjdbc.driver.Statement.generatedKeysFlag.
|
|
Execute a SQL statement that may return multiple results.
参照先 org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.executeUpdate(), org.objectweb.cjdbc.driver.Statement.result, と org.objectweb.cjdbc.driver.Statement.updateCount. 参照元 org.objectweb.cjdbc.driver.Statement.execute().
|
|
Execute a batch of commands
参照先 org.objectweb.cjdbc.driver.Statement.batch, と org.objectweb.cjdbc.driver.Statement.result.
|
|
Execute a SQL statement that returns a single ResultSet
参照先 org.objectweb.cjdbc.driver.Statement.connection, org.objectweb.cjdbc.driver.Statement.cursorName, org.objectweb.cjdbc.driver.Statement.escapeProcessing, org.objectweb.cjdbc.driver.Connection.execReadRequest(), org.objectweb.cjdbc.driver.Connection.execReadStoredProcedure(), org.objectweb.cjdbc.driver.Statement.fetchSize, org.objectweb.cjdbc.driver.Connection.LINE_SEPARATOR, org.objectweb.cjdbc.driver.Statement.maxRows, org.objectweb.cjdbc.driver.Connection.needSqlSkeleton, org.objectweb.cjdbc.driver.Statement.result, org.objectweb.cjdbc.driver.Statement.timeout, と org.objectweb.cjdbc.driver.Statement.updateCount.
|
|
Execute a SQL statement that returns a single ResultSet
参照元 org.objectweb.cjdbc.driver.Statement.execute().
|
|
Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. The driver will ignore the array if the SQL statement is not an
|
|
Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. The driver will ignore the array if the SQL statement is not an
|
|
Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this
参照先 org.objectweb.cjdbc.driver.Statement.executeUpdate(), と org.objectweb.cjdbc.driver.Statement.generatedKeysFlag.
|
|
Execute a SQL INSERT, UPDATE or DELETE statement. In addition SQL statements that return nothing such as SQL DDL statements can be executed
参照先 org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton(). 参照元 org.objectweb.cjdbc.driver.Statement.execute(), と org.objectweb.cjdbc.driver.Statement.executeUpdate().
|
|
Execute a SQL INSERT, UPDATE or DELETE statement. In addition SQL statements that return nothing such as SQL DDL statements can be executed
参照先 org.objectweb.cjdbc.driver.Statement.connection, org.objectweb.cjdbc.driver.Statement.escapeProcessing, org.objectweb.cjdbc.driver.Connection.execWriteRequest(), org.objectweb.cjdbc.driver.Connection.execWriteRequestWithKeys(), org.objectweb.cjdbc.driver.Connection.execWriteStoredProcedure(), org.objectweb.cjdbc.driver.Statement.generatedKeys, org.objectweb.cjdbc.driver.Statement.generatedKeysFlag, org.objectweb.cjdbc.driver.Connection.LINE_SEPARATOR, org.objectweb.cjdbc.driver.Connection.needSqlSkeleton, org.objectweb.cjdbc.driver.Statement.result, org.objectweb.cjdbc.driver.Statement.timeout, と org.objectweb.cjdbc.driver.Statement.updateCount. 参照元 org.objectweb.cjdbc.driver.Statement.executeUpdate().
|
|
Retrieve the connection that created this Statement object
参照先 org.objectweb.cjdbc.driver.Statement.connection.
|
|
Not supported yet.
|
|
参照先 org.objectweb.cjdbc.driver.Statement.fetchSize.
|
|
Retrieves any auto-generated keys created as a result of executing this
参照先 org.objectweb.cjdbc.driver.Statement.generatedKeys.
|
|
The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to Note: We don't do anything with this value yet.
参照先 org.objectweb.cjdbc.driver.Statement.maxFieldSize.
|
|
The maxRows limit is set to limit the number of rows that any
参照先 org.objectweb.cjdbc.driver.Statement.maxRows.
|
|
Moves to this
There are no more results when the following is
(!getMoreResults() && (getUpdateCount() == -1)
|
|
Multiple results are not suppoted so this method always return false and reset the update count to -1. Any open ResultSet is implicitly closed.
参照先 org.objectweb.cjdbc.driver.Statement.result, と org.objectweb.cjdbc.driver.Statement.updateCount.
|
|
The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded, a
参照先 org.objectweb.cjdbc.driver.Statement.timeout.
|
|
Returns the current result as a
参照先 org.objectweb.cjdbc.driver.Statement.result. 参照元 org.objectweb.cjdbc.driver.PreparedStatement.getMetaData().
|
|
Retrieve the concurrency mode for the
|
|
Retrieves the result set holdability for
|
|
Retrieve the type of the generated
参照先 org.objectweb.cjdbc.driver.Statement.resultSetType.
|
|
Returns the current result as an update count, if the result is a
参照先 org.objectweb.cjdbc.driver.Statement.updateCount.
|
|
The first warning reported by calls on this Statement is returned. A Statement's execute methods clear its SQLWarning chain. Subsequent The Warning chain is automatically cleared each time a statement is (re)executed.
Note: if you are processing a
参照先 org.objectweb.cjdbc.driver.Statement.warnings.
|
|
Defines the SQL cursor name that will be used by subsequent execute methods. This name can then be used in SQL positioned update/delete statements to identify the current row in the ResultSet generated by this statement. If a database doesn't support positioned update/delete, this method is a no-op.
参照先 org.objectweb.cjdbc.driver.Statement.cursorName.
|
|
If escape scanning is on (the default), the driver will do escape substitution before sending the SQL to the database.
参照先 org.objectweb.cjdbc.driver.Statement.escapeProcessing.
|
|
This hint is silently ignored and assumes FETCH_FORWARD which is the way C-JDBC has been optimized for.
|
|
Set the default fetch size for the produced ResultSet.
参照先 org.objectweb.cjdbc.driver.Statement.fetchSize.
|
|
Sets the
参照先 org.objectweb.cjdbc.driver.Statement.maxFieldSize.
|
|
Sets the maximum number of rows.
参照先 org.objectweb.cjdbc.driver.Statement.maxRows.
|
|
Sets the queryTimeout limit.
参照先 org.objectweb.cjdbc.driver.Statement.timeout.
|
|
参照元 org.objectweb.cjdbc.driver.Connection.createStatement(), org.objectweb.cjdbc.driver.Connection.prepareCall(), と org.objectweb.cjdbc.driver.Connection.prepareStatement().
|
|
参照先 org.objectweb.cjdbc.driver.Statement.resultSetType. 参照元 org.objectweb.cjdbc.driver.Connection.createStatement(), org.objectweb.cjdbc.driver.Connection.prepareCall(), と org.objectweb.cjdbc.driver.Connection.prepareStatement().
|
|
Vector for batch commands Statement.java の 66 行で定義されています。 参照元 org.objectweb.cjdbc.driver.Statement.addBatch(), org.objectweb.cjdbc.driver.Statement.clearBatch(), と org.objectweb.cjdbc.driver.Statement.executeBatch(). |
|
|
Cursor name used jointly with fetch size Statement.java の 83 行で定義されています。 参照元 org.objectweb.cjdbc.driver.Statement.executeQuery(), と org.objectweb.cjdbc.driver.Statement.setCursorName(). |
|
Should the driver to escape processing before sending to the DB? Statement.java の 97 行で定義されています。 参照元 org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton(), と org.objectweb.cjdbc.driver.Statement.setEscapeProcessing(). |
|
Default ResultSet fetch size Statement.java の 81 行で定義されています。 参照元 org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.getFetchSize(), と org.objectweb.cjdbc.driver.Statement.setFetchSize(). |
|
Auto generated keys Statement.java の 100 行で定義されています。 参照元 org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton(), と org.objectweb.cjdbc.driver.Statement.getGeneratedKeys(). |
|
|
Maximum field size (unused) Statement.java の 89 行で定義されています。 参照元 org.objectweb.cjdbc.driver.Statement.getMaxFieldSize(), と org.objectweb.cjdbc.driver.Statement.setMaxFieldSize(). |
|
Maximum number of rows (unused) Statement.java の 92 行で定義されています。 参照元 org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.getMaxRows(), と org.objectweb.cjdbc.driver.Statement.setMaxRows(). |
|
|
Type of the ResultSet defaults to TYPE_FORWARD_ONLY Statement.java の 86 行で定義されています。 参照元 org.objectweb.cjdbc.driver.Statement.getResultSetType(), org.objectweb.cjdbc.driver.Statement.setResultSetType(), と org.objectweb.cjdbc.driver.Statement.Statement(). |
|
Query timeout in seconds (0 means no timeout) Statement.java の 78 行で定義されています。 参照元 org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton(), org.objectweb.cjdbc.driver.Statement.getQueryTimeout(), と org.objectweb.cjdbc.driver.Statement.setQueryTimeout(). |
|
|
The warnings chain Statement.java の 69 行で定義されています。 参照元 org.objectweb.cjdbc.driver.Statement.clearWarnings(), と org.objectweb.cjdbc.driver.Statement.getWarnings(). |