DB.ProgressObserverSQLITE_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| Constructor and Description |
|---|
NativeDB(String url,
String fileName,
SQLiteConfig config) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_close()
Closes the SQLite interface to a database.
|
int |
_exec(String sql)
Complies, evaluates, executes and commits an SQL statement.
|
protected void |
_open(String file,
int openFlags)
Creates an SQLite interface to a database with the provided open flags.
|
int |
backup(String dbName,
String destFileName,
DB.ProgressObserver observer) |
void |
busy_handler(BusyHandler busyHandler)
Sets a busy handler that sleeps
for a specified amount of time when a table is locked.
|
void |
busy_timeout(int ms)
Sets a busy handler that sleeps
for a specified amount of time when a table is locked.
|
int |
changes() |
int |
clear_bindings(long stmt)
Reset all bindings on a prepared statement (reset all host parameters to NULL).
|
void |
clear_progress_handler() |
byte[] |
column_blob(long stmt,
int col) |
int |
column_count(long stmt) |
String |
column_decltype(long stmt,
int col) |
double |
column_double(long stmt,
int col) |
int |
column_int(long stmt,
int col) |
long |
column_long(long stmt,
int col) |
String |
column_name(long stmt,
int col) |
String |
column_table_name(long stmt,
int col) |
String |
column_text(long stmt,
int col) |
int |
column_type(long stmt,
int col) |
int |
create_function(String name,
Function func,
int nArgs,
int flags)
Create a user defined function with given function name and the function object.
|
int |
destroy_function(String name,
int nArgs)
De-registers a user defined function
|
int |
enable_load_extension(boolean enable)
Enables or disables loading of SQLite extensions.
|
protected int |
finalize(long stmt)
Destroys a prepared statement.
|
void |
interrupt()
Aborts any pending operation and returns at its earliest opportunity.
|
String |
libversion()
Returns the value for SQLITE_VERSION, SQLITE_VERSION_NUMBER, and SQLITE_SOURCE_ID C
preprocessor macros that are associated with the library.
|
int |
limit(int id,
int value) |
static boolean |
load()
Loads the SQLite interface backend.
|
protected long |
prepare(String sql)
Complies an SQL statement.
|
void |
register_progress_handler(int vmCalls,
ProgressHandler progressHandler)
Progress handler
|
int |
reset(long stmt)
Sets a prepared statement object back to its initial state,
ready to be re-executed.
|
int |
restore(String dbName,
String sourceFileName,
DB.ProgressObserver observer) |
void |
result_blob(long context,
byte[] val)
Sets the result of an SQL function as blob data type with the pointer to the SQLite database
context and the the result value of byte array.
|
void |
result_double(long context,
double val)
Sets the result of an SQL function as double data type with the pointer to the SQLite
database context and the the result value of double.
|
void |
result_error(long context,
String err)
Sets the result of an SQL function as an error with the pointer to the SQLite database
context and the the error of String.
|
void |
result_int(long context,
int val)
Sets the result of an SQL function as int data type with the pointer to the SQLite database
context and the the result value of int.
|
void |
result_long(long context,
long val)
Sets the result of an SQL function as long data type with the pointer to the SQLite database
context and the the result value of long.
|
void |
result_null(long context)
Sets the result of an SQL function as NULL with the pointer to the SQLite database context.
|
void |
result_text(long context,
String val)
Sets the result of an SQL function as text data type with the pointer to the SQLite database
context and the the result value of String.
|
int |
shared_cache(boolean enable)
Enables or disables the sharing of the database cache and schema data structures between
connections to the same database.
|
int |
step(long stmt)
Evaluates a statement.
|
int |
total_changes() |
byte[] |
value_blob(Function f,
int arg) |
double |
value_double(Function f,
int arg) |
int |
value_int(Function f,
int arg)
Accesses the parameter values on the function or aggregate in int data type with the function
object and the parameter value.
|
long |
value_long(Function f,
int arg) |
String |
value_text(Function f,
int arg) |
int |
value_type(Function f,
int arg) |
addCommitListener, addUpdateListener, close, column_names, exec, execute, executeUpdate, finalize, getConfig, getUrl, isClosed, newSQLException, open, prepare, removeCommitListener, removeUpdateListener, throwexpublic NativeDB(String url, String fileName, SQLiteConfig config) throws SQLException
SQLExceptionpublic static boolean load()
throws Exception
Exceptionprotected void _open(String file, int openFlags) throws SQLException
DB_open in class DBfile - The database to open.openFlags - File opening configurations
(http://www.sqlite.org/c3ref/c_open_autoproxy.html)SQLExceptionDB._open(java.lang.String, int)protected void _close()
throws SQLException
DB_close in class DBSQLExceptionDB._close()public int _exec(String sql) throws SQLException
DB_exec in class DBsql - An SQL statement.SQLExceptionDB._exec(java.lang.String)public int shared_cache(boolean enable)
DBshared_cache in class DBenable - True to enable; false otherwise.DB.shared_cache(boolean)public int enable_load_extension(boolean enable)
DBenable_load_extension in class DBenable - True to enable; false otherwise.DB.enable_load_extension(boolean)public void interrupt()
DBinterrupt in class DBDB.interrupt()public void busy_timeout(int ms)
DBbusy_timeout in class DBms - Time to sleep in milliseconds.DB.busy_timeout(int)public void busy_handler(BusyHandler busyHandler)
DBbusy_handler in class DBDB.busy_handler(BusyHandler)protected long prepare(String sql) throws SQLException
DBprepare in class DBsql - An SQL statement.SQLExceptionDB.prepare(java.lang.String)public String libversion()
DBlibversion in class DBDB.libversion()public int changes()
changes in class DBDB.changes()public int total_changes()
total_changes in class DBDB.total_changes()protected int finalize(long stmt)
DBfinalize in class DBstmt - Pointer to the statement pointer.DB.finalize(long)public int step(long stmt)
DBstep in class DBstmt - Pointer to the statement.DB.step(long)public int reset(long stmt)
DBreset in class DBstmt - Pointer to the statement.DB.reset(long)public int clear_bindings(long stmt)
DBclear_bindings in class DBstmt - Pointer to the statement.DB.clear_bindings(long)public int column_count(long stmt)
column_count in class DBstmt - Pointer to the statement.DB.column_count(long)public int column_type(long stmt,
int col)
column_type in class DBstmt - Pointer to the statement.col - Number of column.DB.column_type(long, int)public String column_decltype(long stmt, int col)
column_decltype in class DBstmt - Pointer to the statement.col - Number of column.DB.column_decltype(long, int)public String column_table_name(long stmt, int col)
column_table_name in class DBstmt - Pointer to the statement.col - Number of column.DB.column_table_name(long, int)public String column_name(long stmt, int col)
column_name in class DBstmt - Pointer to the statement.col - The number of column.DB.column_name(long, int)public String column_text(long stmt, int col)
column_text in class DBstmt - Pointer to the statement.col - Number of column.DB.column_text(long, int)public byte[] column_blob(long stmt,
int col)
column_blob in class DBstmt - Pointer to the statement.col - Number of column.DB.column_blob(long, int)public double column_double(long stmt,
int col)
column_double in class DBstmt - Pointer to the statement.col - Number of column.DB.column_double(long, int)public long column_long(long stmt,
int col)
column_long in class DBstmt - Pointer to the statement.col - Number of column.DB.column_long(long, int)public int column_int(long stmt,
int col)
column_int in class DBstmt - Pointer to the statement.col - Number of column.DB.column_int(long, int)public void result_null(long context)
DBresult_null in class DBcontext - Pointer to the SQLite database context.DB.result_null(long)public void result_text(long context,
String val)
DBresult_text in class DBcontext - Pointer to the SQLite database context.val - Result value of an SQL function.DB.result_text(long, java.lang.String)public void result_blob(long context,
byte[] val)
DBresult_blob in class DBcontext - Pointer to the SQLite database context.val - Result value of an SQL function.DB.result_blob(long, byte[])public void result_double(long context,
double val)
DBresult_double in class DBcontext - Pointer to the SQLite database context.val - Result value of an SQL function.DB.result_double(long, double)public void result_long(long context,
long val)
DBresult_long in class DBcontext - Pointer to the SQLite database context.val - Result value of an SQL function.DB.result_long(long, long)public void result_int(long context,
int val)
DBresult_int in class DBcontext - Pointer to the SQLite database context.val - Result value of an SQL function.DB.result_int(long, int)public void result_error(long context,
String err)
DBresult_error in class DBcontext - Pointer to the SQLite database context.err - Error result of an SQL function.DB.result_error(long, java.lang.String)public String value_text(Function f, int arg)
value_text in class DBf - SQLite function object.arg - Pointer to the parameter of the SQLite function or aggregate.DB.value_text(org.sqlite.Function, int)public byte[] value_blob(Function f, int arg)
value_blob in class DBf - SQLite function object.arg - Pointer to the parameter of the SQLite function or aggregate.DB.value_blob(org.sqlite.Function, int)public double value_double(Function f, int arg)
value_double in class DBf - SQLite function object.arg - Pointer to the parameter of the SQLite function or aggregate.DB.value_double(org.sqlite.Function, int)public long value_long(Function f, int arg)
value_long in class DBf - SQLite function object.arg - Pointer to the parameter of the SQLite function or aggregate.DB.value_long(org.sqlite.Function, int)public int value_int(Function f, int arg)
DBvalue_int in class DBf - SQLite function object.arg - Pointer to the parameter of the SQLite function or aggregate.DB.value_int(org.sqlite.Function, int)public int value_type(Function f, int arg)
value_type in class DBf - SQLite function object.arg - Pointer to the parameter of the SQLite function or aggregate.DB.value_type(org.sqlite.Function, int)public int create_function(String name, Function func, int nArgs, int flags)
DBcreate_function in class DBname - The function name to be created.func - SQLite function object.flags - Extra flags to use when creating the function, such as Function.FLAG_DETERMINISTICDB.create_function(java.lang.String, org.sqlite.Function, int, int)public int destroy_function(String name, int nArgs)
DBdestroy_function in class DBname - Name of the function to de-registered.DB.destroy_function(java.lang.String, int)public int limit(int id,
int value)
throws SQLException
limit in class DBid - The id of the limit.value - The new value of the limit.SQLExceptionpublic int backup(String dbName, String destFileName, DB.ProgressObserver observer) throws SQLException
backup in class DBdbName - Database name to be backed up.destFileName - Target backup file name.observer - ProgressObserver object.SQLExceptionDB.backup(java.lang.String, java.lang.String, org.sqlite.core.DB.ProgressObserver)public int restore(String dbName, String sourceFileName, DB.ProgressObserver observer) throws SQLException
restore in class DBdbName - Database name for restoring data.sourceFileName - Source file name.observer - ProgressObserver object.SQLExceptionDB.restore(java.lang.String, java.lang.String,
org.sqlite.core.DB.ProgressObserver)public void register_progress_handler(int vmCalls,
ProgressHandler progressHandler)
throws SQLException
DBregister_progress_handler in class DBSQLExceptionpublic void clear_progress_handler()
throws SQLException
clear_progress_handler in class DBSQLExceptionCopyright © 2021. All rights reserved.