Package org.sqlite.jdbc3
Class JDBC3Statement
- java.lang.Object
-
- org.sqlite.core.CoreStatement
-
- org.sqlite.jdbc3.JDBC3Statement
-
- All Implemented Interfaces:
Codes
- Direct Known Subclasses:
JDBC4Statement
public abstract class JDBC3Statement extends CoreStatement
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
JDBC3Statement.BackupObserver
protected static interface
JDBC3Statement.SQLCallable<T>
-
Field Summary
Fields Modifier and Type Field Description protected boolean
exhaustedResults
private int
queryTimeout
protected long
updateCount
-
Fields inherited from class org.sqlite.core.CoreStatement
batch, batchPos, conn, pointer, resultsWaiting, rs, sql
-
Fields inherited from interface org.sqlite.core.Codes
SQLITE_ABORT, SQLITE_AUTH, SQLITE_BLOB, SQLITE_BUSY, SQLITE_CANTOPEN, SQLITE_CONSTRAINT, SQLITE_CORRUPT, SQLITE_DONE, SQLITE_EMPTY, SQLITE_ERROR, SQLITE_FLOAT, SQLITE_FULL, SQLITE_INTEGER, SQLITE_INTERNAL, SQLITE_INTERRUPT, SQLITE_IOERR, SQLITE_LOCKED, SQLITE_MISMATCH, SQLITE_MISUSE, SQLITE_NOLFS, SQLITE_NOMEM, SQLITE_NOTFOUND, SQLITE_NULL, SQLITE_OK, SQLITE_PERM, SQLITE_PROTOCOL, SQLITE_READONLY, SQLITE_ROW, SQLITE_SCHEMA, SQLITE_TEXT, SQLITE_TOOBIG
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JDBC3Statement(SQLiteConnection conn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBatch(java.lang.String sql)
void
cancel()
void
clearBatch()
void
clearWarnings()
void
close()
boolean
execute(java.lang.String sql)
boolean
execute(java.lang.String sql, int autoGeneratedKeys)
boolean
execute(java.lang.String sql, int[] colinds)
boolean
execute(java.lang.String sql, java.lang.String[] colnames)
int[]
executeBatch()
long[]
executeLargeBatch()
long
executeLargeUpdate(java.lang.String sql)
long
executeLargeUpdate(java.lang.String sql, int autoGeneratedKeys)
long
executeLargeUpdate(java.lang.String sql, int[] colinds)
long
executeLargeUpdate(java.lang.String sql, java.lang.String[] cols)
java.sql.ResultSet
executeQuery(java.lang.String sql)
java.sql.ResultSet
executeQuery(java.lang.String sql, boolean closeStmt)
int
executeUpdate(java.lang.String sql)
int
executeUpdate(java.lang.String sql, int autoGeneratedKeys)
int
executeUpdate(java.lang.String sql, int[] colinds)
int
executeUpdate(java.lang.String sql, java.lang.String[] cols)
java.sql.Connection
getConnection()
int
getFetchDirection()
int
getFetchSize()
long
getLargeMaxRows()
long
getLargeUpdateCount()
This function has a complex behaviour best understood by carefully reading the JavaDoc for getMoreResults() and considering the test StatementTest.execute().int
getMaxFieldSize()
int
getMaxRows()
boolean
getMoreResults()
SQLite does not support multiple results from execute().boolean
getMoreResults(int current)
int
getQueryTimeout()
java.sql.ResultSet
getResultSet()
int
getResultSetConcurrency()
int
getResultSetHoldability()
int
getResultSetType()
int
getUpdateCount()
This function has a complex behaviour best understood by carefully reading the JavaDoc for getMoreResults() and considering the test StatementTest.execute().java.sql.SQLWarning
getWarnings()
void
setCursorName(java.lang.String name)
void
setEscapeProcessing(boolean enable)
void
setFetchDirection(int direction)
void
setFetchSize(int r)
void
setLargeMaxRows(long max)
void
setMaxFieldSize(int max)
void
setMaxRows(int max)
void
setQueryTimeout(int seconds)
protected java.sql.SQLException
unsupported()
protected <T> T
withConnectionTimeout(JDBC3Statement.SQLCallable<T> callable)
-
Methods inherited from class org.sqlite.core.CoreStatement
checkIndex, checkOpen, clearGeneratedKeys, exec, exec, getConnectionConfig, getDatabase, getGeneratedKeys, internalClose, notifyFirstStatementExecuted, updateGeneratedKeys
-
-
-
-
Constructor Detail
-
JDBC3Statement
protected JDBC3Statement(SQLiteConnection conn)
-
-
Method Detail
-
close
public void close() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.close()
-
execute
public boolean execute(java.lang.String sql) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.execute(java.lang.String)
-
execute
public boolean execute(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.execute(java.lang.String, int)
-
executeQuery
public java.sql.ResultSet executeQuery(java.lang.String sql, boolean closeStmt) throws java.sql.SQLException
- Specified by:
executeQuery
in classCoreStatement
- Parameters:
closeStmt
- Whether to close this statement when the resultset is closed.- Throws:
java.sql.SQLException
- See Also:
Statement.executeQuery(java.lang.String)
-
executeQuery
public java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.executeQuery(java.lang.String)
-
executeUpdate
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.executeUpdate(java.lang.String)
-
executeUpdate
public int executeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.executeUpdate(java.lang.String, int)
-
executeLargeUpdate
public long executeLargeUpdate(java.lang.String sql) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.executeLargeUpdate(java.lang.String)
-
executeLargeUpdate
public long executeLargeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.executeLargeUpdate(java.lang.String, int)
-
getResultSet
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.getResultSet()
-
getUpdateCount
public int getUpdateCount() throws java.sql.SQLException
This function has a complex behaviour best understood by carefully reading the JavaDoc for getMoreResults() and considering the test StatementTest.execute().- Throws:
java.sql.SQLException
- See Also:
Statement.getUpdateCount()
-
getLargeUpdateCount
public long getLargeUpdateCount() throws java.sql.SQLException
This function has a complex behaviour best understood by carefully reading the JavaDoc for getMoreResults() and considering the test StatementTest.execute().- Throws:
java.sql.SQLException
- See Also:
Statement.getLargeUpdateCount()
-
addBatch
public void addBatch(java.lang.String sql) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.addBatch(java.lang.String)
-
clearBatch
public void clearBatch() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.clearBatch()
-
executeBatch
public int[] executeBatch() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.executeBatch()
-
executeLargeBatch
public long[] executeLargeBatch() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.executeLargeBatch()
-
setCursorName
public void setCursorName(java.lang.String name)
- See Also:
Statement.setCursorName(java.lang.String)
-
getWarnings
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.getWarnings()
-
clearWarnings
public void clearWarnings() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.clearWarnings()
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.getConnection()
-
cancel
public void cancel() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.cancel()
-
getQueryTimeout
public int getQueryTimeout() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.getQueryTimeout()
-
setQueryTimeout
public void setQueryTimeout(int seconds) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.setQueryTimeout(int)
-
getMaxRows
public int getMaxRows() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.getMaxRows()
-
getLargeMaxRows
public long getLargeMaxRows() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.getLargeMaxRows()
-
setMaxRows
public void setMaxRows(int max) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.setMaxRows(int)
-
setLargeMaxRows
public void setLargeMaxRows(long max) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.setLargeMaxRows(long)
-
getMaxFieldSize
public int getMaxFieldSize() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.getMaxFieldSize()
-
setMaxFieldSize
public void setMaxFieldSize(int max) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.setMaxFieldSize(int)
-
getFetchSize
public int getFetchSize() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.getFetchSize()
-
setFetchSize
public void setFetchSize(int r) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.setFetchSize(int)
-
getFetchDirection
public int getFetchDirection() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.getFetchDirection()
-
setFetchDirection
public void setFetchDirection(int direction) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.setFetchDirection(int)
-
getMoreResults
public boolean getMoreResults() throws java.sql.SQLException
SQLite does not support multiple results from execute().- Throws:
java.sql.SQLException
- See Also:
Statement.getMoreResults()
-
getMoreResults
public boolean getMoreResults(int current) throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.getMoreResults(int)
-
getResultSetConcurrency
public int getResultSetConcurrency() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.getResultSetConcurrency()
-
getResultSetHoldability
public int getResultSetHoldability() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.getResultSetHoldability()
-
getResultSetType
public int getResultSetType() throws java.sql.SQLException
- Throws:
java.sql.SQLException
- See Also:
Statement.getResultSetType()
-
setEscapeProcessing
public void setEscapeProcessing(boolean enable)
- See Also:
Statement.setEscapeProcessing(boolean)
-
unsupported
protected java.sql.SQLException unsupported()
-
execute
public boolean execute(java.lang.String sql, int[] colinds) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql, java.lang.String[] colnames) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, int[] colinds) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, java.lang.String[] cols) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
executeLargeUpdate
public long executeLargeUpdate(java.lang.String sql, int[] colinds) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
executeLargeUpdate
public long executeLargeUpdate(java.lang.String sql, java.lang.String[] cols) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
withConnectionTimeout
protected <T> T withConnectionTimeout(JDBC3Statement.SQLCallable<T> callable) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-