|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sqlite.jdbc.JdbcStatement
public class JdbcStatement
Field Summary | |
---|---|
protected int |
cntUpdate
last update count. |
protected int |
currentRet
current of result |
protected Database |
db
parent Database object. |
protected java.util.List<java.lang.Object> |
results
results of multiple statement |
protected JdbcResultSet |
rs
current ResultSet object. |
Fields inherited from interface java.sql.Statement |
---|
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO |
Constructor Summary | |
---|---|
JdbcStatement(Database db,
java.sql.Connection owner)
|
Method Summary | |
---|---|
void |
addBatch(java.lang.String sql)
|
void |
cancel()
invoke org.sqlite.Database#interrupt() method. |
void |
clearBatch()
|
void |
clearWarnings()
nothing. |
void |
close()
|
void |
close(java.sql.ResultSet drs)
invoke detach() method and close() method. |
protected void |
closeResultSets()
|
void |
detach(java.sql.ResultSet drs)
Detaches the ResultSet object from the life cycle of JdbcStatement. |
protected boolean |
execute(Statement stmt)
|
boolean |
execute(java.lang.String sql)
|
boolean |
execute(java.lang.String sql,
int autoGeneratedKeys)
|
boolean |
execute(java.lang.String sql,
int[] columnIndexes)
Not supporetd yet. |
boolean |
execute(java.lang.String sql,
java.lang.String[] columnNames)
Not supporetd yet. |
int[] |
executeBatch()
|
JdbcResultSet |
executeQuery(java.lang.String sql)
|
int |
executeUpdate(java.lang.String sql)
|
int |
executeUpdate(java.lang.String sql,
int autoGeneratedKeys)
|
int |
executeUpdate(java.lang.String sql,
int[] columnIndexes)
Not supporetd yet. |
int |
executeUpdate(java.lang.String sql,
java.lang.String[] columnNames)
Not supporetd yet. |
protected void |
finalize()
|
java.sql.Connection |
getConnection()
|
int |
getFetchDirection()
It always returns FETCH_FORWARD. |
int |
getFetchSize()
It always returns 0. |
JdbcResultSet |
getGeneratedKeys()
invoke executeQuery("SELECT last_insert_rowid()") method. |
long |
getLastInsertRowId()
invoke org.sqlite.Database#lastInsertRowId() method. |
int |
getMaxFieldSize()
It always returns 0. |
int |
getMaxRows()
It always returns 0. |
boolean |
getMoreResults()
invoke getMoreResults(CLOSE_CURRENT_RESULT) method. |
boolean |
getMoreResults(int current)
Moves to this Statement object's next result, deals with any current ResultSet object(s) according to the instructions specified by the given flag, and returns true if the next result is a ResultSet object. |
int |
getQueryTimeout()
invoke org.sqlite.Database#getBusyTimeout() method and divide by 1000. |
JdbcResultSet |
getResultSet()
|
int |
getResultSetConcurrency()
It always returns CONCUR_READ_ONLY. |
int |
getResultSetHoldability()
It always returns CLOSE_CURSORS_AT_COMMIT. |
int |
getResultSetType()
It always returns TYPE_FORWARD_ONLY. |
int |
getUpdateCount()
|
java.sql.SQLWarning |
getWarnings()
It always returns null. |
boolean |
isClosed()
|
void |
setCursorName(java.lang.String name)
Not supporetd yet. |
void |
setEscapeProcessing(boolean enable)
Not supporetd yet. |
void |
setFetchDirection(int direction)
Supported fetch direction is FETCH_FORWARD only. |
void |
setFetchSize(int rows)
Not supporetd yet. |
void |
setMaxFieldSize(int max)
Not supporetd yet. |
void |
setMaxRows(int max)
Not supporetd yet. |
void |
setQueryTimeout(int seconds)
multiply the seconds by 1000 and invoke org.sqlite.Database#setBusyTimeout(int) method. |
static void |
validateAutoGeneretedKeys(int autoGeneratedKeys)
|
static void |
validateCurrentResult(int current)
|
protected void |
validateStatementOpen()
|
protected void |
validateStaticSQL(Statement stmt)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Database db
protected java.util.List<java.lang.Object> results
protected int currentRet
protected JdbcResultSet rs
protected int cntUpdate
Constructor Detail |
---|
public JdbcStatement(Database db, java.sql.Connection owner)
Method Detail |
---|
public JdbcResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException
executeQuery
in interface java.sql.Statement
java.sql.SQLException
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
public void close() throws java.sql.SQLException
close
in interface java.sql.Statement
java.sql.SQLException
public int getMaxFieldSize() throws java.sql.SQLException
getMaxFieldSize
in interface java.sql.Statement
java.sql.SQLException
public void setMaxFieldSize(int max)
setMaxFieldSize
in interface java.sql.Statement
max
- ignored
java.lang.UnsupportedOperationException
public int getMaxRows() throws java.sql.SQLException
getMaxRows
in interface java.sql.Statement
java.sql.SQLException
public void setMaxRows(int max)
setMaxRows
in interface java.sql.Statement
max
- ignored
java.lang.UnsupportedOperationException
public void setEscapeProcessing(boolean enable)
setEscapeProcessing
in interface java.sql.Statement
enable
- ignored
java.lang.UnsupportedOperationException
public int getQueryTimeout() throws java.sql.SQLException
getQueryTimeout
in interface java.sql.Statement
java.sql.SQLException
Database.getBusyTimeout()
public void setQueryTimeout(int seconds) throws java.sql.SQLException
setQueryTimeout
in interface java.sql.Statement
seconds
-
java.sql.SQLException
Database.setBusyTimeout(int)
public void cancel() throws java.sql.SQLException
cancel
in interface java.sql.Statement
java.sql.SQLException
Database.interrupt()
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.Statement
java.sql.SQLException
public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Statement
java.sql.SQLException
public void setCursorName(java.lang.String name)
setCursorName
in interface java.sql.Statement
java.lang.UnsupportedOperationException
public boolean execute(java.lang.String sql) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
public JdbcResultSet getResultSet() throws java.sql.SQLException
getResultSet
in interface java.sql.Statement
java.sql.SQLException
public int getUpdateCount() throws java.sql.SQLException
getUpdateCount
in interface java.sql.Statement
java.sql.SQLException
public boolean getMoreResults() throws java.sql.SQLException
getMoreResults
in interface java.sql.Statement
java.sql.SQLException
getMoreResults(int)
public void setFetchDirection(int direction) throws java.sql.SQLException
setFetchDirection
in interface java.sql.Statement
direction
-
java.sql.SQLException
public int getFetchDirection() throws java.sql.SQLException
getFetchDirection
in interface java.sql.Statement
java.sql.SQLException
public void setFetchSize(int rows)
setFetchSize
in interface java.sql.Statement
rows
- ignored
java.lang.UnsupportedOperationException
public int getFetchSize() throws java.sql.SQLException
getFetchSize
in interface java.sql.Statement
java.sql.SQLException
public int getResultSetConcurrency() throws java.sql.SQLException
getResultSetConcurrency
in interface java.sql.Statement
java.sql.SQLException
public int getResultSetType() throws java.sql.SQLException
getResultSetType
in interface java.sql.Statement
java.sql.SQLException
public void addBatch(java.lang.String sql) throws java.sql.SQLException
addBatch
in interface java.sql.Statement
java.sql.SQLException
public void clearBatch() throws java.sql.SQLException
clearBatch
in interface java.sql.Statement
java.sql.SQLException
public int[] executeBatch() throws java.sql.SQLException
executeBatch
in interface java.sql.Statement
java.sql.SQLException
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface java.sql.Statement
java.sql.SQLException
public boolean getMoreResults(int current) throws java.sql.SQLException
getMoreResults
in interface java.sql.Statement
current
- Statement.CLOSE_CURRENT_RESULT or Statement.KEEP_CURRENT_RESULT or Statement.CLOSE_ALL_RESULTS
java.sql.SQLException
public JdbcResultSet getGeneratedKeys() throws java.sql.SQLException
getGeneratedKeys
in interface java.sql.Statement
java.sql.SQLException
public int executeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
sql
- SQL to be evaluatedautoGeneratedKeys
- ignored
java.sql.SQLException
public int executeUpdate(java.lang.String sql, int[] columnIndexes)
executeUpdate
in interface java.sql.Statement
sql
- SQL to be evaluatedcolumnIndexes
- ignored
java.lang.UnsupportedOperationException
public int executeUpdate(java.lang.String sql, java.lang.String[] columnNames)
executeUpdate
in interface java.sql.Statement
sql
- SQL to be evaluatedcolumnNames
- ignored
java.lang.UnsupportedOperationException
public boolean execute(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
execute
in interface java.sql.Statement
sql
- SQL to be evaluatedautoGeneratedKeys
- ignored
java.sql.SQLException
public boolean execute(java.lang.String sql, int[] columnIndexes)
execute
in interface java.sql.Statement
sql
- SQL to be evaluatedcolumnIndexes
- ignored
java.lang.UnsupportedOperationException
public boolean execute(java.lang.String sql, java.lang.String[] columnNames)
execute
in interface java.sql.Statement
sql
- SQL to be evaluatedcolumnNames
- ignored
java.lang.UnsupportedOperationException
public int getResultSetHoldability() throws java.sql.SQLException
getResultSetHoldability
in interface java.sql.Statement
java.sql.SQLException
public boolean isClosed()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
protected void validateStatementOpen() throws java.sql.SQLException
java.sql.SQLException
protected void validateStaticSQL(Statement stmt) throws java.sql.SQLException
java.sql.SQLException
public static void validateAutoGeneretedKeys(int autoGeneratedKeys) throws java.sql.SQLException
java.sql.SQLException
public static void validateCurrentResult(int current) throws java.sql.SQLException
java.sql.SQLException
public void detach(java.sql.ResultSet drs) throws java.sql.SQLException
drs
- ResultSet that wants to be detached
java.sql.SQLException
public void close(java.sql.ResultSet drs) throws java.sql.SQLException
drs
- ResultSet that wants to be detached
java.sql.SQLException
detach(ResultSet)
,
close()
public long getLastInsertRowId() throws java.sql.SQLException
java.sql.SQLException
Database.lastInsertRowId()
protected boolean execute(Statement stmt) throws java.sql.SQLException
java.sql.SQLException
protected void closeResultSets() throws java.sql.SQLException
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |