Methods Summary |
---|
public native void | bind(int pos, java.lang.String value)Bind positional String to compiled SQLite3 statement.
|
public native void | bind(int pos)Bind positional SQL null to compiled SQLite3 statement.
|
public native void | bind(int pos, int value)Bind positional integer value to compiled SQLite3 statement.
|
public native void | bind(int pos, long value)Bind positional long value to compiled SQLite3 statement.
|
public native void | bind(int pos, double value)Bind positional double value to compiled SQLite3 statement.
|
public native void | bind(int pos, byte[] value)Bind positional byte array to compiled SQLite3 statement.
|
public native int | bind_parameter_count()Return number of parameters in compiled SQLite3 statement.
|
public native int | bind_parameter_index(java.lang.String name)Return index of named parameter in compiled SQLite3 statement.
|
public native java.lang.String | bind_parameter_name(int pos)Return name of parameter in compiled SQLite3 statement.
|
public native void | bind_zeroblob(int pos, int length)Bind positional zero'ed blob to compiled SQLite3 statement.
|
public native void | clear_bindings()Clear all bound parameters of the compiled SQLite3 statement.
|
public native void | close()Close the compiled SQLite3 statement.
|
public java.lang.Object | column(int col)Retrieve column data as object from exec'ed SQLite3 statement.
switch (column_type(col)) {
case Constants.SQLITE_INTEGER:
return new Long(column_long(col));
case Constants.SQLITE_FLOAT:
return new Double(column_double(col));
case Constants.SQLITE_BLOB:
return column_bytes(col);
case Constants.SQLITE3_TEXT:
return column_string(col);
}
return null;
|
public native byte[] | column_bytes(int col)Retrieve blob column from exec'ed SQLite3 statement.
|
public native int | column_count()Retrieve number of columns of exec'ed SQLite3 statement.
|
public native java.lang.String | column_database_name(int col)Return database name of column of SQLite3 statement.
|
public native java.lang.String | column_decltype(int col)Return declared column type of SQLite3 statement.
|
public native double | column_double(int col)Retrieve double column from exec'ed SQLite3 statement.
|
public native int | column_int(int col)Retrieve integer column from exec'ed SQLite3 statement.
|
public native long | column_long(int col)Retrieve long column from exec'ed SQLite3 statement.
|
public native java.lang.String | column_origin_name(int col)Return origin column name of column of SQLite3 statement.
|
public native java.lang.String | column_string(int col)Retrieve string column from exec'ed SQLite3 statement.
|
public native java.lang.String | column_table_name(int col)Return table name of column of SQLite3 statement.
|
public native int | column_type(int col)Retrieve column type from exec'ed SQLite3 statement.
|
protected native void | finalize()Destructor for object.
|
private static native void | internal_init()Internal native initializer.
|
public native boolean | prepare()Prepare the next SQL statement for the Stmt instance.
|
public native void | reset()Reset the compiled SQLite3 statement without
clearing parameter bindings.
|
public native boolean | step()Perform one step of compiled SQLite3 statement.
Example:
...
try {
Stmt s = db.prepare("select * from x; select * from y;");
s.bind(...);
...
s.bind(...);
while (s.step(cb)) {
Object o = s.value(...);
...
}
// s.reset() for re-execution or
// s.prepare() for the next piece of SQL
while (s.prepare()) {
s.bind(...);
...
s.bind(...);
while (s.step(cb)) {
Object o = s.value(...);
...
}
}
} catch (SQLite.Exception e) {
s.close();
}
|