|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sqlite.Statement
public class Statement
sqlite3_stmt wrapper class.
NOTE: SQLite 3.3.5 based.
Method Summary | |
---|---|
void |
bindBytes(int parameterIndex,
byte[] val)
invoke sqlite3_bind_blob() function. |
void |
bindBytes(int parameterIndex,
byte[] val,
int len)
invoke sqlite3_bind_blob() function. |
void |
bindDouble(int parameterIndex,
double val)
invoke sqlite3_bind_double() function. |
void |
bindInt(int parameterIndex,
int val)
invoke sqlite3_bind_int() function. |
void |
bindLong(int parameterIndex,
long val)
invoke sqlite3_bind_int64() function. |
void |
bindNull(int parameterIndex)
invoke sqlite3_bind_null() function. |
void |
bindText(int parameterIndex,
java.lang.String val)
invoke sqlite3_bind_text() function. |
void |
clearBinding()
invoke sqlite3_clear_bindings() function. |
void |
close()
invoke sqlite3_finalize() function. |
int |
execute()
invoke step() method. |
protected void |
finalize()
Close statement if statement is not closed yet. |
SWIGTYPE_p_void |
getBlob(int columnIndex)
invoke sqlite3_column_blob() function. |
int |
getByteLength(int columnIndex)
invoke sqlite3_column_bytes() function. |
byte[] |
getBytes(int columnIndex)
invoke sqlite3_column_blob() function. |
int |
getColumnCount()
invoke sqlite3_column_count() function. |
java.lang.String |
getColumnDatabaseName(int columnIndex)
invoke sqlite3_column_database_name() function. |
java.lang.String |
getColumnLabel(int columnIndex)
invoke sqlite3_column_name() function. |
java.lang.String |
getColumnName(int columnIndex)
invoke sqlite3_column_origin_name() function. |
java.lang.String |
getColumnTableName(int columnIndex)
invoke sqlite3_column_table_name() function. |
int |
getColumnType(int columnIndex)
invoke sqlite3_column_type() function. NOTE: Required to invoke the step() method beforehand. |
java.lang.String |
getColumnTypeName(int columnIndex)
invoke sqlite3_column_decltype() function. |
Database |
getDatabase()
Retrieves the Database object that produced this Statement object. |
int |
getDataCount()
invoke sqlite3_data_count() function. NOTE: Required to invoke the step() method beforehand. |
SWIGTYPE_p_sqlite3 |
getDbHandle()
invoke sqlite3_db_handle() function. |
double |
getDouble(int columnIndex)
invoke sqlite3_column_double() function. |
int |
getInt(int columnIndex)
invoke sqlite3_column_int() function. |
long |
getLong(int columnIndex)
invoke sqlite3_column_int64() function. |
int |
getParameterCount()
invoke sqlite3_bind_parameter_count() function. |
int |
getParameterIndex(java.lang.String parameterName)
invoke sqlite3_bind_parameter_index() function. |
java.lang.String |
getParameterName(int parameterIndex)
invoke sqlite3_bind_parameter_name() function. |
java.lang.String |
getString(int columnIndex)
invoke sqlite3_column_text() function. |
boolean |
isClosed()
Retrieves whether this Statement object has been closed. |
boolean |
isExpired()
Deprecated. |
boolean |
isManaged()
True is returned when generated with PreparedStatement. |
boolean |
producedResultSet()
true if the return value of getColumnCount() is not 0. |
void |
reset()
invoke sqlite3_reset() function. |
int |
step()
invoke sqlite3_step() function. |
void |
transferBinding(Statement dest)
Deprecated. |
void |
validateColumnIndexRange(int columnIndex)
|
protected void |
validateStatementOpen()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean isManaged()
public int getParameterCount() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.public int getParameterIndex(java.lang.String parameterName) throws java.sql.SQLException
parameterName
- parameter name
java.sql.SQLException
- When this method is called on a closed connection.public java.lang.String getParameterName(int parameterIndex) throws java.sql.SQLException
parameterIndex
- the first parameter is 1, the second is 2, ...
java.sql.SQLException
- When this method is called on a closed connection.public int getColumnCount() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.public int getDataCount() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.step()
,
Number of columns in a result setpublic java.lang.String getColumnDatabaseName(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.public java.lang.String getColumnLabel(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.public java.lang.String getColumnName(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.public int getColumnType(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.step()
,
Results Values From A Querypublic java.lang.String getColumnTableName(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.public java.lang.String getColumnTypeName(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.public java.lang.String getString(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.public int getInt(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.public long getLong(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.public double getDouble(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.public byte[] getBytes(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.public SWIGTYPE_p_void getBlob(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.public int getByteLength(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- When the columnIndex is not valid. When this method is called on a closed connection.public void bindNull(int parameterIndex) throws java.sql.SQLException
parameterIndex
- the first parameter is 1, the second is 2, ...
java.sql.SQLException
- When this method is called on a closed connection. When the return value of the sqlite3_bind_null() function is not SQLITE_OK.public void bindInt(int parameterIndex, int val) throws java.sql.SQLException
parameterIndex
- the first parameter is 1, the second is 2, ...val
- the parameter value
java.sql.SQLException
- When this method is called on a closed connection. When the return value of the sqlite3_bind_int() function is not SQLITE_OK.public void bindLong(int parameterIndex, long val) throws java.sql.SQLException
parameterIndex
- the first parameter is 1, the second is 2, ...val
- the parameter value
java.sql.SQLException
- When this method is called on a closed connection. When the return value of the sqlite3_bind_int64() function is not SQLITE_OK.public void bindDouble(int parameterIndex, double val) throws java.sql.SQLException
parameterIndex
- the first parameter is 1, the second is 2, ...val
- the parameter value
java.sql.SQLException
- When this method is called on a closed connection. When the return value of the sqlite3_bind_double() function is not SQLITE_OK.public void bindText(int parameterIndex, java.lang.String val) throws java.sql.SQLException
parameterIndex
- the first parameter is 1, the second is 2, ...val
- the parameter value
java.sql.SQLException
- When this method is called on a closed connection. When the return value of the sqlite3_bind_text() function is not SQLITE_OK.public void bindBytes(int parameterIndex, byte[] val) throws java.sql.SQLException
parameterIndex
- the first parameter is 1, the second is 2, ...val
- the parameter value
java.sql.SQLException
- When this method is called on a closed connection. When the return value of the sqlite3_bind_blob() function is not SQLITE_OK.bindBytes(int, byte[], int)
public void bindBytes(int parameterIndex, byte[] val, int len) throws java.sql.SQLException
parameterIndex
- the first parameter is 1, the second is 2, ...val
- the parameter valuelen
- the number of bytes
java.sql.SQLException
- When this method is called on a closed connection. When the return value of the sqlite3_bind_blob() function is not SQLITE_OK.public void clearBinding() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection. When the return value of the sqlite3_clear_bindings() function is not SQLITE_OK.public void reset() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection. When the return value of the sqlite3_reset() function is not SQLITE_OK.public int step() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection. When the return value of the sqlite3_step() function is neither SQLITE_DONE nor SQLITE_ROW.public int execute() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection. When the return value of the sqlite3_step() function is neither SQLITE_DONE nor SQLITE_ROW.step()
public boolean isExpired() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection. When the return value of the sqlite3_expired() function is non-zero.public SWIGTYPE_p_sqlite3 getDbHandle() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.public void transferBinding(Statement dest) throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection. When the return value of the sqlite3_transfer_bindings() function is not SQLITE_OK.public boolean producedResultSet() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.getColumnCount()
public boolean isClosed()
public void close() throws java.sql.SQLException
java.sql.SQLException
- When the return value of the sqlite3_finalize() function is neither SQLITE_OK nor SQLITE_ABORT.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
- When this method is called on a closed connection.public void validateColumnIndexRange(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2, ...
java.sql.SQLException
- the column index out of range.public Database getDatabase() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |