|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--vortex.sql.vortexStatement
A 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.
Connection.createStatement(),
ResultSet| Field Summary | |
protected java.lang.String |
cName
Cursor' name |
protected java.sql.Connection |
conn
Connection object |
protected dbCursor |
lcur
dbCursor object |
protected dbChannel |
ldb
DBChannel object |
protected vortexRecord |
record
Record object |
protected java.sql.ResultSet |
result
ResultSet object |
| Constructor Summary | |
vortexStatement()
|
|
vortexStatement(java.sql.Connection con,
dbChannel db,
int type,
int concurrency)
|
|
| Method Summary | |
void |
cancel()
Cancel can be used by one thread to cancel a statement that is being executed by another thread. |
void |
clearWarnings()
After this call getWarnings returns null until a new warning is reported for this Statement. |
void |
close()
In many cases, it is desirable to immediately release a Statements's database and JDBC resources instead of waiting for this to happen when it is automatically closed; the close method provides this immediate release. |
boolean |
execute(java.lang.String sql)
Execute a SQL statement that may return multiple results. |
java.sql.ResultSet |
executeQuery(java.lang.String sql)
Execute a SQL statement that returns a single ResultSet. |
int |
executeUpdate(java.lang.String sql)
Execute a SQL INSERT, UPDATE or DELETE statement. |
int |
getMaxFieldSize()
This does not apply to VORTEXjdbc The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. |
int |
getMaxRows()
This does not apply to VORTEXjdbc The maxRows limit is the maximum number of rows that a ResultSet can contain. |
boolean |
getMoreResults()
getMoreResults moves to a Statement's next result. |
int |
getQueryTimeout()
This does not apply to VORTEXjdbc The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. |
java.sql.ResultSet |
getResultSet()
getResultSet returns the current result as a ResultSet. |
int |
getUpdateCount()
getUpdateCount returns the current result, which should be an integer value. |
java.sql.SQLWarning |
getWarnings()
The first warning reported by calls on this Statement is returned. |
void |
setCursorName(java.lang.String name)
setCursorname defines the SQL cursor name that will be used by subsequent Statement execute methods. |
void |
setEscapeProcessing(boolean enable)
This does not apply to VORTEXjdbc If escape scanning is on (the default) the driver will do escape substitution before sending the SQL to the database. |
void |
setMaxFieldSize(int max)
This does not apply to VORTEXjdbc The maxFieldSize limit (in bytes) is set to limit the size of data that can be returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields. |
void |
setMaxRows(int max)
This does not apply to VORTEXjdbc The maxRows limit is set to limit the number of rows that any ResultSet can contain. |
void |
setQueryTimeout(int seconds)
This does not apply to VORTEXjdbc The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected java.lang.String cName
protected java.sql.Connection conn
protected dbChannel ldb
protected dbCursor lcur
protected java.sql.ResultSet result
protected vortexRecord record
| Constructor Detail |
public vortexStatement(java.sql.Connection con,
dbChannel db,
int type,
int concurrency)
throws java.sql.SQLException
public vortexStatement()
throws java.sql.SQLException
| Method Detail |
public java.sql.ResultSet executeQuery(java.lang.String sql)
throws java.sql.SQLException
sql - typically this is a static SQL SELECT statement
public int executeUpdate(java.lang.String sql)
throws java.sql.SQLException
sql - a SQL INSERT, UPDATE or DELETE statement or a SQL
statement that returns nothing
public void close()
throws java.sql.SQLException
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.
public int getMaxFieldSize()
throws java.sql.SQLException
The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded.
public void setMaxFieldSize(int max)
throws java.sql.SQLException
The maxFieldSize limit (in bytes) is set to limit the size of data that can be returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields. If the limit is exceeded, the excess data is silently discarded.
max - the new max column size limit; zero means unlimited
public int getMaxRows()
throws java.sql.SQLException
The maxRows limit is the maximum number of rows that a ResultSet can contain. If the limit is exceeded, the excess rows are silently dropped.
public void setMaxRows(int max)
throws java.sql.SQLException
The maxRows limit is set to limit the number of rows that any ResultSet can contain. If the limit is exceeded, the excess rows are silently dropped.
max - the new max rows limit; zero means unlimited
public void setEscapeProcessing(boolean enable)
throws java.sql.SQLException
If escape scanning is on (the default) the driver will do escape substitution before sending the SQL to the database.
enable - true to enable; false to disable
public int getQueryTimeout()
throws java.sql.SQLException
The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded a SQLException is thrown.
public void setQueryTimeout(int seconds)
throws java.sql.SQLException
The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded a SQLException is thrown.
seconds - the new query timeout limit in seconds; zero means unlimited
public void cancel()
throws java.sql.SQLException
public java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
The warning chain is automatically cleared each time a statement is (re)executed.
Note: If you are processing a ResultSet then any warnings associated with ResultSet reads will be chained on the ResultSet object.
public void clearWarnings()
throws java.sql.SQLException
public void setCursorName(java.lang.String name)
throws java.sql.SQLException
Note: By definition, positioned update/delete execution must be done by a different Statement than the one which generated the ResultSet being used for positioning. Also, cursor names must be unique within a Connection.
name - the new cursor name.
public boolean execute(java.lang.String sql)
throws java.sql.SQLException
sql - any SQL statementgetResultSet(),
getUpdateCount(),
getMoreResults()
public java.sql.ResultSet getResultSet()
throws java.sql.SQLException
execute(java.lang.String)
public int getUpdateCount()
throws java.sql.SQLException
The only way to tell for sure that the result is an update count is to first test to see if it is a ResultSet. If it is not a ResultSet it is an update count.
execute(java.lang.String)
public boolean getMoreResults()
throws java.sql.SQLException
execute(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||