|
||||||||||
| 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.
Database.prepare(java.lang.String),
Database.prepare(java.lang.String, org.sqlite.swig.SQLite3.SQLite3StmtPtrPtr),
Database.prepareMultiple(java.lang.String)| Method Summary | |
|---|---|
void |
bindBlob(int parameterIndex,
SWIGTYPE_p_void val,
int len)
invoke sqlite3_bind_blob() function. |
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 |
bindValue(int parameterIndex,
SWIGTYPE_p_Mem val)
invoke sqlite3_bind_value() function. |
void |
bindZeroBlob(int parameterIndex,
int bytes)
invoke sqlite3_bind_zeroblob() 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 |
getSQL()
Retrieving Statement SQL. |
java.lang.String |
getString(int columnIndex)
invoke sqlite3_column_text() function. |
SWIGTYPE_p_Mem |
getValue(int columnIndex)
invoke sqlite3_column_value() function. |
boolean |
isClosed()
Retrieves whether this Statement object has been closed. |
boolean |
isManaged()
True is returned when generated with PreparedStatement. |
Statement |
nextStatement()
invoke sqlite3_next_stmt() function. |
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 |
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 set
public 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 Query
public 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 SWIGTYPE_p_Mem getValue(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 bindValue(int parameterIndex,
SWIGTYPE_p_Mem val)
throws java.sql.SQLException
parameterIndex - the first parameter is 1, the second is 2, ...val - the sqlite3_value* object
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_bind_value() function is not SQLITE_OK.
public void bindBlob(int parameterIndex,
SWIGTYPE_p_void 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 bindZeroBlob(int parameterIndex,
int bytes)
throws java.sql.SQLException
parameterIndex - the first parameter is 1, the second is 2, ...bytes - the number of bytes
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_bind_zeroblob() 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 SWIGTYPE_p_sqlite3 getDbHandle()
throws java.sql.SQLException
java.sql.SQLException - When this method is called on a closed connection.
public boolean producedResultSet()
throws java.sql.SQLException
java.sql.SQLException - When this method is called on a closed connection.getColumnCount()
public java.lang.String getSQL()
throws java.sql.SQLException
java.sql.SQLException - When this method is called on a closed connection.public boolean isClosed()
isClosed in interface Closeable
public void close()
throws java.sql.SQLException
close in interface Closeablejava.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.Objectjava.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.
public Statement nextStatement()
throws java.sql.SQLException
java.sql.SQLExceptionDatabase.nextStatement(org.sqlite.Statement)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||