Package org.sqlite.core
Class CorePreparedStatement
- java.lang.Object
-
- org.sqlite.core.CoreStatement
-
- org.sqlite.jdbc3.JDBC3Statement
-
- org.sqlite.jdbc4.JDBC4Statement
-
- org.sqlite.core.CorePreparedStatement
-
- All Implemented Interfaces:
AutoCloseable,Statement,Wrapper,Codes
- Direct Known Subclasses:
JDBC3PreparedStatement
public abstract class CorePreparedStatement extends JDBC4Statement
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.sqlite.jdbc3.JDBC3Statement
JDBC3Statement.SQLCallable<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected intbatchQueryCountprotected intcolumnCountprotected intparamCount-
Fields inherited from class org.sqlite.jdbc3.JDBC3Statement
exhaustedResults, 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
-
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
Constructors Modifier Constructor Description protectedCorePreparedStatement(SQLiteConnection conn, String sql)Constructs a prepared statement on a provided connection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbatch(int pos, Object value)Assigns the object value to the element at the specific position of array batch.voidclearBatch()int[]executeBatch()long[]executeLargeBatch()protected voidsetDateByMilliseconds(int pos, Long value, Calendar calendar)Store the date in the user's preferred format (text, int, or real)-
Methods inherited from class org.sqlite.jdbc4.JDBC4Statement
close, closeOnCompletion, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, setPoolable, unwrap
-
Methods inherited from class org.sqlite.jdbc3.JDBC3Statement
addBatch, cancel, clearWarnings, execute, execute, execute, execute, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setQueryTimeout, unsupported, withConnectionTimeout
-
Methods inherited from class org.sqlite.core.CoreStatement
checkIndex, checkOpen, exec, exec, getConnectionConfig, getDatabase, internalClose, notifyFirstStatementExecuted
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearWarnings, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setQueryTimeout
-
-
-
-
Constructor Detail
-
CorePreparedStatement
protected CorePreparedStatement(SQLiteConnection conn, String sql) throws SQLException
Constructs a prepared statement on a provided connection.- Parameters:
conn- Connection on which to create the prepared statement.sql- The SQL script to prepare.- Throws:
SQLException
-
-
Method Detail
-
executeBatch
public int[] executeBatch() throws SQLException- Specified by:
executeBatchin interfaceStatement- Overrides:
executeBatchin classJDBC3Statement- Throws:
SQLException- See Also:
JDBC3Statement.executeBatch()
-
executeLargeBatch
public long[] executeLargeBatch() throws SQLException- Specified by:
executeLargeBatchin interfaceStatement- Overrides:
executeLargeBatchin classJDBC3Statement- Throws:
SQLException- See Also:
JDBC3Statement.executeLargeBatch()
-
clearBatch
public void clearBatch() throws SQLException- Specified by:
clearBatchin interfaceStatement- Overrides:
clearBatchin classJDBC3Statement- Throws:
SQLException- See Also:
()
-
batch
protected void batch(int pos, Object value) throws SQLExceptionAssigns the object value to the element at the specific position of array batch.- Parameters:
pos-value-- Throws:
SQLException
-
setDateByMilliseconds
protected void setDateByMilliseconds(int pos, Long value, Calendar calendar) throws SQLExceptionStore the date in the user's preferred format (text, int, or real)- Throws:
SQLException
-
-