| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object | +--org.gjt.mm.mysql.Statement
| Constructor Summary | |
| Statement(Connection C)
Constructor for a Statement. |
|
| 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 Statement's database and JDBC resources instead of waiting for this to happen when it is automatically closed. |
| java.sql.ResultSet | executeQuery(java.lang.String Sql)
Execute a SQL statement that retruns a single ResultSet |
| boolean | execute(java.lang.String Sql)
Execute a SQL statement that may return multiple results. |
| int | executeUpdate(java.lang.String Sql)
Execute a SQL INSERT, UPDATE or DELETE statement. |
| int | getMaxFieldSize()
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()
The maxRows limit is set to limit the number of rows that any ResultSet can contain. |
| boolean | getMoreResults()
getMoreResults moves to a Statement's next result. |
| int | getQueryTimeout()
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 as an update count, if the result is a ResultSet or there are no more results, -1 is returned. |
| 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 execute methods. |
| void | setEscapeProcessing(boolean enable)
If escape scanning is on (the default), the driver will do escape substitution before sending the SQL to the database. |
| void | setMaxFieldSize(int max)
Sets the maxFieldSize |
| void | setMaxRows(int max)
Set the maximum number of rows |
| void | setQueryTimeout(int seconds)
Sets the queryTimeout limit |
| Methods inherited from class java.lang.Object | |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait | |
| Constructor Detail |
public Statement(Connection C)
c
- the Connection instantation that creates us| Method Detail |
public java.sql.ResultSet executeQuery(java.lang.String Sql)
throws java.sql.SQLException
Sql
- typically a static SQL SELECT statement
public int executeUpdate(java.lang.String Sql)
throws java.sql.SQLException
Sql
- a SQL statement
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
public void setMaxFieldSize(int max)
throws java.sql.SQLException
max
- the new max column size limit; zero means unlimited
public int getMaxRows()
throws java.sql.SQLException
public void setMaxRows(int max)
throws java.sql.SQLException
max
- the new max rows limit; zero means unlimited
public void setEscapeProcessing(boolean enable)
throws java.sql.SQLException
enable
- true to enable; false to disable
public int getQueryTimeout()
throws java.sql.SQLException
public void setQueryTimeout(int seconds)
throws java.sql.SQLException
seconds
- - the new query timeout limit in seconds
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: This MySQL driver does not support cursors.
name
- the new cursor name
public boolean execute(java.lang.String Sql)
throws java.sql.SQLException
sql
- any SQL statement
public java.sql.ResultSet getResultSet()
throws java.sql.SQLException
public int getUpdateCount()
throws java.sql.SQLException
public boolean getMoreResults()
throws java.sql.SQLException
| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||