Package org.sqlite.jdbc3

## Class JDBC3PreparedStatement

- java.lang.Object
- - org.sqlite.core.CoreStatement
  - - org.sqlite.jdbc3.JDBC3Statement
    - - org.sqlite.jdbc4.JDBC4Statement
      - - org.sqlite.core.CorePreparedStatement
        - - org.sqlite.jdbc3.JDBC3PreparedStatement

All Implemented Interfaces:
  `AutoCloseable`, `Statement`, `Wrapper`, `Codes`

Direct Known Subclasses:
  `JDBC4PreparedStatement`

    public abstract class JDBC3PreparedStatement
    extends CorePreparedStatement

### Nested Class Summary

### Nested classes/interfaces inherited from class org.sqlite.jdbc3.JDBC3Statement

`JDBC3Statement.SQLCallable<T>`

### Field Summary

### Fields inherited from class org.sqlite.core.CorePreparedStatement

`batchQueryCount, columnCount, paramCount`

### Fields inherited from class org.sqlite.jdbc3.JDBC3Statement

`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
`protected` `JDBC3PreparedStatement​(SQLiteConnection conn, String sql)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addBatch()`
`void` `addBatch​(String sql)`
`void` `clearParameters()`
`boolean` `execute()`
`boolean` `execute​(String sql)`
`boolean` `execute​(String sql, int autoGeneratedKeys)`
`boolean` `execute​(String sql, int[] colinds)`
`boolean` `execute​(String sql, String[] colnames)`
`long` `executeLargeUpdate()`
`long` `executeLargeUpdate​(String sql)`
`long` `executeLargeUpdate​(String sql, int autoGeneratedKeys)`
`long` `executeLargeUpdate​(String sql, int[] colinds)`
`long` `executeLargeUpdate​(String sql, String[] cols)`
`ResultSet` `executeQuery()`
`ResultSet` `executeQuery​(String sql)`
`int` `executeUpdate()`
`int` `executeUpdate​(String sql)`
`int` `executeUpdate​(String sql, int autoGeneratedKeys)`
`int` `executeUpdate​(String sql, int[] colinds)`
`int` `executeUpdate​(String sql, String[] cols)`
`ResultSetMetaData` `getMetaData()`
`String` `getParameterClassName​(int param)`
`int` `getParameterCount()`
`ParameterMetaData` `getParameterMetaData()`
`int` `getParameterMode​(int pos)`
`int` `getParameterType​(int pos)`
`String` `getParameterTypeName​(int pos)`
`int` `getPrecision​(int pos)`
`int` `getScale​(int pos)`
`Statement` `getStatement()`
`protected SQLException` `invalid()`
`int` `isNullable​(int pos)`
`boolean` `isSigned​(int pos)`
`void` `setArray​(int i, Array x)`
`void` `setAsciiStream​(int pos, InputStream istream, int length)`
`void` `setBigDecimal​(int pos, BigDecimal value)`
`void` `setBinaryStream​(int pos, InputStream istream, int length)`
`void` `setBlob​(int i, Blob x)`
`void` `setBoolean​(int pos, boolean value)`
`void` `setByte​(int pos, byte value)`
`void` `setBytes​(int pos, byte[] value)`
`void` `setCharacterStream​(int pos, Reader reader, int length)`
`void` `setClob​(int i, Clob x)`
`void` `setDate​(int pos, Date x)`
`void` `setDate​(int pos, Date x, Calendar cal)`
`void` `setDouble​(int pos, double value)`
`void` `setFloat​(int pos, float value)`
`void` `setInt​(int pos, int value)`
`void` `setLong​(int pos, long value)`
`void` `setNull​(int pos, int u1)`
`void` `setNull​(int pos, int u1, String u2)`
`void` `setObject​(int pos, Object value)`
`void` `setObject​(int p, Object v, int t)`
`void` `setObject​(int p, Object v, int t, int s)`
`void` `setRef​(int i, Ref x)`
`void` `setShort​(int pos, short value)`
`void` `setString​(int pos, String value)`
`void` `setTime​(int pos, Time x)`
`void` `setTime​(int pos, Time x, Calendar cal)`
`void` `setTimestamp​(int pos, Timestamp x)`
`void` `setTimestamp​(int pos, Timestamp x, Calendar cal)`
`void` `setUnicodeStream​(int pos, InputStream istream, int length)`
`void` `setURL​(int pos, URL x)`
`protected SQLException` `unsupported()`

### Methods inherited from class org.sqlite.core.CorePreparedStatement

`batch, clearBatch, executeBatch, executeLargeBatch, setDateByMilliseconds`

### Methods inherited from class org.sqlite.jdbc4.JDBC4Statement

`close, closeOnCompletion, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, setPoolable, unwrap`

### Methods inherited from class org.sqlite.jdbc3.JDBC3Statement

`cancel, clearWarnings, executeQuery, 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, 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

`cancel, clearWarnings, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, 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

#### JDBC3PreparedStatement

    protected JDBC3PreparedStatement​(SQLiteConnection conn,
                                     String sql)
                              throws SQLException

Throws:
  `SQLException`

### Method Detail

#### clearParameters

    public void clearParameters()
                         throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.clearParameters()`

#### execute

    public boolean execute()
                    throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.execute()`

#### executeQuery

    public ResultSet executeQuery()
                           throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.executeQuery()`

#### executeUpdate

    public int executeUpdate()
                      throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.executeUpdate()`

#### executeLargeUpdate

    public long executeLargeUpdate()
                            throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.executeLargeUpdate()`

#### addBatch

    public void addBatch()
                  throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.addBatch()`

#### getParameterMetaData

    public ParameterMetaData getParameterMetaData()

See Also:
  `PreparedStatement.getParameterMetaData()`

#### getParameterCount

    public int getParameterCount()
                          throws SQLException

Throws:
  `SQLException`
See Also:
  `ParameterMetaData.getParameterCount()`

#### getParameterClassName

    public String getParameterClassName​(int param)
                                 throws SQLException

Throws:
  `SQLException`
See Also:
  `ParameterMetaData.getParameterClassName(int)`

#### getParameterTypeName

    public String getParameterTypeName​(int pos)
                                throws SQLException

Throws:
  `SQLException`
See Also:
  `ParameterMetaData.getParameterTypeName(int)`

#### getParameterType

    public int getParameterType​(int pos)
                         throws SQLException

Throws:
  `SQLException`
See Also:
  `ParameterMetaData.getParameterType(int)`

#### getParameterMode

    public int getParameterMode​(int pos)

See Also:
  `ParameterMetaData.getParameterMode(int)`

#### getPrecision

    public int getPrecision​(int pos)

See Also:
  `ParameterMetaData.getPrecision(int)`

#### getScale

    public int getScale​(int pos)

See Also:
  `ParameterMetaData.getScale(int)`

#### isNullable

    public int isNullable​(int pos)

See Also:
  `ParameterMetaData.isNullable(int)`

#### isSigned

    public boolean isSigned​(int pos)

See Also:
  `ParameterMetaData.isSigned(int)`

#### getStatement

    public Statement getStatement()

Returns:

#### setBigDecimal

    public void setBigDecimal​(int pos,
                              BigDecimal value)
                       throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setBigDecimal(int, java.math.BigDecimal)`

#### setBinaryStream

    public void setBinaryStream​(int pos,
                                InputStream istream,
                                int length)
                         throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setBinaryStream(int, java.io.InputStream, int)`

#### setAsciiStream

    public void setAsciiStream​(int pos,
                               InputStream istream,
                               int length)
                        throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setAsciiStream(int, java.io.InputStream, int)`

#### setUnicodeStream

    public void setUnicodeStream​(int pos,
                                 InputStream istream,
                                 int length)
                          throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setUnicodeStream(int, java.io.InputStream, int)`

#### setBoolean

    public void setBoolean​(int pos,
                           boolean value)
                    throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setBoolean(int, boolean)`

#### setByte

    public void setByte​(int pos,
                        byte value)
                 throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setByte(int, byte)`

#### setBytes

    public void setBytes​(int pos,
                         byte[] value)
                  throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setBytes(int, byte[])`

#### setDouble

    public void setDouble​(int pos,
                          double value)
                   throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setDouble(int, double)`

#### setFloat

    public void setFloat​(int pos,
                         float value)
                  throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setFloat(int, float)`

#### setInt

    public void setInt​(int pos,
                       int value)
                throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setInt(int, int)`

#### setLong

    public void setLong​(int pos,
                        long value)
                 throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setLong(int, long)`

#### setNull

    public void setNull​(int pos,
                        int u1)
                 throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setNull(int, int)`

#### setNull

    public void setNull​(int pos,
                        int u1,
                        String u2)
                 throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setNull(int, int, java.lang.String)`

#### setObject

    public void setObject​(int pos,
                          Object value)
                   throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setObject(int, java.lang.Object)`

#### setObject

    public void setObject​(int p,
                          Object v,
                          int t)
                   throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setObject(int, java.lang.Object, int)`

#### setObject

    public void setObject​(int p,
                          Object v,
                          int t,
                          int s)
                   throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setObject(int, java.lang.Object, int, int)`

#### setShort

    public void setShort​(int pos,
                         short value)
                  throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setShort(int, short)`

#### setString

    public void setString​(int pos,
                          String value)
                   throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setString(int, java.lang.String)`

#### setCharacterStream

    public void setCharacterStream​(int pos,
                                   Reader reader,
                                   int length)
                            throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setCharacterStream(int, java.io.Reader, int)`

#### setDate

    public void setDate​(int pos,
                        Date x)
                 throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setDate(int, java.sql.Date)`

#### setDate

    public void setDate​(int pos,
                        Date x,
                        Calendar cal)
                 throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setDate(int, java.sql.Date, java.util.Calendar)`

#### setTime

    public void setTime​(int pos,
                        Time x)
                 throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setTime(int, java.sql.Time)`

#### setTime

    public void setTime​(int pos,
                        Time x,
                        Calendar cal)
                 throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setTime(int, java.sql.Time, java.util.Calendar)`

#### setTimestamp

    public void setTimestamp​(int pos,
                             Timestamp x)
                      throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setTimestamp(int, java.sql.Timestamp)`

#### setTimestamp

    public void setTimestamp​(int pos,
                             Timestamp x,
                             Calendar cal)
                      throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.setTimestamp(int, java.sql.Timestamp, java.util.Calendar)`

#### getMetaData

    public ResultSetMetaData getMetaData()
                                  throws SQLException

Throws:
  `SQLException`
See Also:
  `PreparedStatement.getMetaData()`

#### unsupported

    protected SQLException unsupported()

Overrides:
  `unsupported` in class `JDBC3Statement`

#### invalid

    protected SQLException invalid()

#### setArray

    public void setArray​(int i,
                         Array x)
                  throws SQLException

Throws:
  `SQLException`

#### setBlob

    public void setBlob​(int i,
                        Blob x)
                 throws SQLException

Throws:
  `SQLException`

#### setClob

    public void setClob​(int i,
                        Clob x)
                 throws SQLException

Throws:
  `SQLException`

#### setRef

    public void setRef​(int i,
                       Ref x)
                throws SQLException

Throws:
  `SQLException`

#### setURL

    public void setURL​(int pos,
                       URL x)
                throws SQLException

Throws:
  `SQLException`

#### execute

    public boolean execute​(String sql)
                    throws SQLException

Specified by:
  `execute` in interface `Statement`
Overrides:
  `execute` in class `JDBC3Statement`
Throws:
  `SQLException`
See Also:
  `CoreStatement.exec(java.lang.String)`

#### execute

    public boolean execute​(String sql,
                           int autoGeneratedKeys)
                    throws SQLException

Specified by:
  `execute` in interface `Statement`
Overrides:
  `execute` in class `JDBC3Statement`
Throws:
  `SQLException`
See Also:
  `Statement.execute(java.lang.String, int)`

#### execute

    public boolean execute​(String sql,
                           int[] colinds)
                    throws SQLException

Specified by:
  `execute` in interface `Statement`
Overrides:
  `execute` in class `JDBC3Statement`
Throws:
  `SQLException`

#### execute

    public boolean execute​(String sql,
                           String[] colnames)
                    throws SQLException

Specified by:
  `execute` in interface `Statement`
Overrides:
  `execute` in class `JDBC3Statement`
Throws:
  `SQLException`

#### executeUpdate

    public int executeUpdate​(String sql)
                      throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Overrides:
  `executeUpdate` in class `JDBC3Statement`
Throws:
  `SQLException`
See Also:
  `CoreStatement.exec(java.lang.String)`

#### executeUpdate

    public int executeUpdate​(String sql,
                             int autoGeneratedKeys)
                      throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Overrides:
  `executeUpdate` in class `JDBC3Statement`
Throws:
  `SQLException`
See Also:
  `Statement.executeUpdate(java.lang.String, int)`

#### executeUpdate

    public int executeUpdate​(String sql,
                             int[] colinds)
                      throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Overrides:
  `executeUpdate` in class `JDBC3Statement`
Throws:
  `SQLException`

#### executeUpdate

    public int executeUpdate​(String sql,
                             String[] cols)
                      throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Overrides:
  `executeUpdate` in class `JDBC3Statement`
Throws:
  `SQLException`

#### executeLargeUpdate

    public long executeLargeUpdate​(String sql)
                            throws SQLException

Specified by:
  `executeLargeUpdate` in interface `Statement`
Overrides:
  `executeLargeUpdate` in class `JDBC3Statement`
Throws:
  `SQLException`
See Also:
  `Statement.executeLargeUpdate(java.lang.String)`

#### executeLargeUpdate

    public long executeLargeUpdate​(String sql,
                                   int autoGeneratedKeys)
                            throws SQLException

Specified by:
  `executeLargeUpdate` in interface `Statement`
Overrides:
  `executeLargeUpdate` in class `JDBC3Statement`
Throws:
  `SQLException`
See Also:
  `Statement.executeLargeUpdate(java.lang.String, int)`

#### executeLargeUpdate

    public long executeLargeUpdate​(String sql,
                                   int[] colinds)
                            throws SQLException

Specified by:
  `executeLargeUpdate` in interface `Statement`
Overrides:
  `executeLargeUpdate` in class `JDBC3Statement`
Throws:
  `SQLException`

#### executeLargeUpdate

    public long executeLargeUpdate​(String sql,
                                   String[] cols)
                            throws SQLException

Specified by:
  `executeLargeUpdate` in interface `Statement`
Overrides:
  `executeLargeUpdate` in class `JDBC3Statement`
Throws:
  `SQLException`

#### executeQuery

    public ResultSet executeQuery​(String sql)
                           throws SQLException

Specified by:
  `executeQuery` in interface `Statement`
Overrides:
  `executeQuery` in class `JDBC3Statement`
Throws:
  `SQLException`
See Also:
  `CoreStatement.exec(String)`

#### addBatch

    public void addBatch​(String sql)
                  throws SQLException

Specified by:
  `addBatch` in interface `Statement`
Overrides:
  `addBatch` in class `JDBC3Statement`
Throws:
  `SQLException`
See Also:
  `Statement.addBatch(java.lang.String)`