org.sqlite.jdbc
Class JdbcConnection

java.lang.Object
  extended by org.sqlite.jdbc.JdbcConnection
All Implemented Interfaces:
java.sql.Connection

public class JdbcConnection
extends java.lang.Object
implements java.sql.Connection


Field Summary
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Constructor Summary
JdbcConnection(Database db, java.lang.String url)
           
 
Method Summary
 void clearAuthorizer()
          invoke sqlite3_set_authorizer() function.
 void clearBusyHandler()
          invoke sqlite3_busy_handler() function.
 void clearCollationNeededHandler()
          invoke sqlite3_collation_needed() function.
 void clearCommitHook()
          invoke sqlite3_commit_hook() function.
 void clearProfiler()
          invoke sqlite3_profile() function.
 void clearProgressHandler()
          invoke sqlite3_progress_handler() function.
 void clearRollbackHook()
          invoke sqlite3_rollback_hook() function.
 void clearTracer()
          invoke sqlite3_trace() function.
 void clearUpdateHook()
          invoke sqlite3_update_hook() function.
 void clearWarnings()
          SQL Warning is not supported yet.
 void close()
           
 void commit()
           
 void createCollationSequence(Collator col)
          invoke sqlite3_create_collation() function.
 void createFunction(Function func)
          invoke sqlite3_create_function() function.
 JdbcStatement createStatement()
           
 JdbcStatement createStatement(int resultSetType, int resultSetConcurrency)
           
 JdbcStatement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
           
 void disableExtendedResultCodes()
          invoke sqlite3_extended_result_codes(off) function.
 void disableLoadExtention()
          invoke sqlite3_enable_load_extension(off) function.
static void disableSharedCache()
          invoke sqlite3_enable_shared_cache(off) function.
 void dropCollationSequence(Collator col)
          invoke sqlite3_create_function() function.
 void dropFunction(Function func)
          invoke sqlite3_create_function() function.
 void enableExtendedResultCodes()
          invoke sqlite3_extended_result_codes(on) function.
 void enableLoadExtention()
          invoke sqlite3_enable_load_extension(on) function.
static void enableSharedCache()
          invoke sqlite3_enable_shared_cache(on) function.
 boolean getAutoCommit()
           
 int getBusyTimeout()
          Returns the timeout(ms) value.
 java.lang.String getCatalog()
          Catalog is not supported yet.
 int getHoldability()
          It always returns CLOSE_CURSORS_AT_COMMIT.
 int getLastError()
          invoke sqlite3_errcode() function.
 java.lang.String getLastErrorMessage()
          invoke sqlite3_errmsg() function.
 JdbcDatabaseMetaData getMetaData()
           
 java.util.List<java.lang.String[]> getTable(java.lang.String sql, SWIGTYPE_p_p_char errmsg)
          invoke sqlite3_get_table() function.
 int getTransactionIsolation()
          It always returns TRANSACTION_SERIALIZABLE.
 TransactionType getTransactionType()
           
 java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap()
          Not supporetd yet.
 java.sql.SQLWarning getWarnings()
          SQL Warning is not supported yet.
 boolean isClosed()
           
 boolean isReadOnly()
          Retrieves whether this Connection object is in read-only mode.
 void loadExtention(java.lang.String filename, java.lang.String entryPoint, SWIGTYPE_p_p_char errmsg)
          invoke sqlite3_load_extension() function.
 java.lang.String nativeSQL(java.lang.String sql)
          Not supporetd yet.
 java.sql.CallableStatement prepareCall(java.lang.String sql)
          Not supporetd yet.
 java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency)
          Not supporetd yet.
 java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
          Not supporetd yet.
 JdbcPreparedStatement prepareStatement(java.lang.String sql)
           
 JdbcPreparedStatement prepareStatement(java.lang.String sql, int autoGeneratedKeys)
           
 JdbcPreparedStatement prepareStatement(java.lang.String sql, int[] columnIndexes)
          Not supporetd yet.
 JdbcPreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency)
           
 JdbcPreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
           
 JdbcPreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] columnNames)
          Not supporetd yet.
 void releaseSavepoint(java.sql.Savepoint savepoint)
          Not supporetd yet.
static void resetAutoExtention()
          invoke sqlite3_reset_auto_extension() function.
 void rollback()
           
 void rollback(java.sql.Savepoint savepoint)
          Not supporetd yet.
 void setAuthorizer(Authorizer auth)
          invoke sqlite3_set_authorizer() function.
 void setAutoCommit(boolean autoCommit)
           
 void setBusyHandler(BusyHandler busy)
          invoke sqlite3_busy_handler() function.
 void setBusyTimeout(int ms)
          invoke sqlite3_busy_timeout() function.
 void setCatalog(java.lang.String catalog)
          Catalog is not supported yet.
 void setCollationNeededHandler(CollationNeededHandler needed)
          invoke sqlite3_collation_needed() function.
 void setCommitHook(CommitHook hook)
          invoke sqlite3_commit_hook() function.
 void setHoldability(int holdability)
          Supported result set holdability is ResultSet.CLOSE_CURSORS_AT_COMMIT only.
 void setProfiler(Profiler profiler)
          invoke sqlite3_profile() function.
 void setProgressHandler(ProgressHandler prog)
          invoke sqlite3_progress_handler() function.
 void setReadOnly(boolean readOnly)
           
 void setRollbackHook(RollbackHook hook)
          invoke sqlite3_rollback_hook() function.
 java.sql.Savepoint setSavepoint()
          Not supporetd yet.
 java.sql.Savepoint setSavepoint(java.lang.String name)
          Not supporetd yet.
 void setTracer(Tracer tracer)
          invoke sqlite3_trace() function.
 void setTransactionIsolation(int level)
           
 void setTransactionType(TransactionType type)
           
 void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
          Not supporetd yet.
 void setUpdateHook(UpdateHook hook)
          invoke sqlite3_update_hook() function.
protected  void validateConnectionOpen()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcConnection

public JdbcConnection(Database db,
                      java.lang.String url)
               throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

createStatement

public JdbcStatement createStatement()
                              throws java.sql.SQLException
Specified by:
createStatement in interface java.sql.Connection
Throws:
java.sql.SQLException

prepareStatement

public JdbcPreparedStatement prepareStatement(java.lang.String sql)
                                       throws java.sql.SQLException
Specified by:
prepareStatement in interface java.sql.Connection
Throws:
java.sql.SQLException

prepareCall

public java.sql.CallableStatement prepareCall(java.lang.String sql)
Not supporetd yet.

Specified by:
prepareCall in interface java.sql.Connection
Throws:
java.lang.UnsupportedOperationException

nativeSQL

public java.lang.String nativeSQL(java.lang.String sql)
Not supporetd yet.

Specified by:
nativeSQL in interface java.sql.Connection
Throws:
java.lang.UnsupportedOperationException

setAutoCommit

public void setAutoCommit(boolean autoCommit)
                   throws java.sql.SQLException
Specified by:
setAutoCommit in interface java.sql.Connection
Throws:
java.sql.SQLException

getAutoCommit

public boolean getAutoCommit()
                      throws java.sql.SQLException
Specified by:
getAutoCommit in interface java.sql.Connection
Throws:
java.sql.SQLException

commit

public void commit()
            throws java.sql.SQLException
Specified by:
commit in interface java.sql.Connection
Throws:
java.sql.SQLException

rollback

public void rollback()
              throws java.sql.SQLException
Specified by:
rollback in interface java.sql.Connection
Throws:
java.sql.SQLException

close

public void close()
           throws java.sql.SQLException
Specified by:
close in interface java.sql.Connection
Throws:
java.sql.SQLException

isClosed

public boolean isClosed()
                 throws java.sql.SQLException
Specified by:
isClosed in interface java.sql.Connection
Throws:
java.sql.SQLException

getMetaData

public JdbcDatabaseMetaData getMetaData()
                                 throws java.sql.SQLException
Specified by:
getMetaData in interface java.sql.Connection
Throws:
java.sql.SQLException

setReadOnly

public void setReadOnly(boolean readOnly)
                 throws java.sql.SQLException
Specified by:
setReadOnly in interface java.sql.Connection
Throws:
java.sql.SQLException

isReadOnly

public boolean isReadOnly()
                   throws java.sql.SQLException
Retrieves whether this Connection object is in read-only mode.

Specified by:
isReadOnly in interface java.sql.Connection
Returns:
true if this Connection object is read-only; false otherwise
Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.isReadOnly()

setCatalog

public void setCatalog(java.lang.String catalog)
                throws java.sql.SQLException
Catalog is not supported yet.

Specified by:
setCatalog in interface java.sql.Connection
Parameters:
catalog - ignored
Throws:
java.sql.SQLException - When this method is called on a closed connection.

getCatalog

public java.lang.String getCatalog()
                            throws java.sql.SQLException
Catalog is not supported yet. It always returns null.

Specified by:
getCatalog in interface java.sql.Connection
Returns:
null
Throws:
java.sql.SQLException - When this method is called on a closed connection.

setTransactionIsolation

public void setTransactionIsolation(int level)
                             throws java.sql.SQLException
Specified by:
setTransactionIsolation in interface java.sql.Connection
Throws:
java.sql.SQLException

getTransactionIsolation

public int getTransactionIsolation()
                            throws java.sql.SQLException
It always returns TRANSACTION_SERIALIZABLE.

Specified by:
getTransactionIsolation in interface java.sql.Connection
Returns:
java.sql.Connection.TRANSACTION_SERIALIZABLE
Throws:
java.sql.SQLException - When this method is called on a closed connection.

getWarnings

public java.sql.SQLWarning getWarnings()
                                throws java.sql.SQLException
SQL Warning is not supported yet. It always returns null.

Specified by:
getWarnings in interface java.sql.Connection
Returns:
null
Throws:
java.sql.SQLException - When this method is called on a closed connection.

clearWarnings

public void clearWarnings()
                   throws java.sql.SQLException
SQL Warning is not supported yet.

Specified by:
clearWarnings in interface java.sql.Connection
Throws:
java.sql.SQLException - When this method is called on a closed connection.

createStatement

public JdbcStatement createStatement(int resultSetType,
                                     int resultSetConcurrency)
                              throws java.sql.SQLException
Specified by:
createStatement in interface java.sql.Connection
Throws:
java.sql.SQLException

prepareStatement

public JdbcPreparedStatement prepareStatement(java.lang.String sql,
                                              int resultSetType,
                                              int resultSetConcurrency)
                                       throws java.sql.SQLException
Specified by:
prepareStatement in interface java.sql.Connection
Throws:
java.sql.SQLException

prepareCall

public java.sql.CallableStatement prepareCall(java.lang.String sql,
                                              int resultSetType,
                                              int resultSetConcurrency)
Not supporetd yet.

Specified by:
prepareCall in interface java.sql.Connection
Throws:
java.lang.UnsupportedOperationException

getTypeMap

public java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap()
Not supporetd yet.

Specified by:
getTypeMap in interface java.sql.Connection
Throws:
java.lang.UnsupportedOperationException

setTypeMap

public void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
Not supporetd yet.

Specified by:
setTypeMap in interface java.sql.Connection
Throws:
java.lang.UnsupportedOperationException

setHoldability

public void setHoldability(int holdability)
                    throws java.sql.SQLException
Supported result set holdability is ResultSet.CLOSE_CURSORS_AT_COMMIT only.

Specified by:
setHoldability in interface java.sql.Connection
Parameters:
holdability -
Throws:
java.sql.SQLException - When this method is called on a closed connection.

getHoldability

public int getHoldability()
                   throws java.sql.SQLException
It always returns CLOSE_CURSORS_AT_COMMIT.

Specified by:
getHoldability in interface java.sql.Connection
Returns:
java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT
Throws:
java.sql.SQLException - When this method is called on a closed connection.

setSavepoint

public java.sql.Savepoint setSavepoint()
Not supporetd yet.

Specified by:
setSavepoint in interface java.sql.Connection
Throws:
java.lang.UnsupportedOperationException

setSavepoint

public java.sql.Savepoint setSavepoint(java.lang.String name)
Not supporetd yet.

Specified by:
setSavepoint in interface java.sql.Connection
Throws:
java.lang.UnsupportedOperationException

rollback

public void rollback(java.sql.Savepoint savepoint)
Not supporetd yet.

Specified by:
rollback in interface java.sql.Connection
Throws:
java.lang.UnsupportedOperationException

releaseSavepoint

public void releaseSavepoint(java.sql.Savepoint savepoint)
Not supporetd yet.

Specified by:
releaseSavepoint in interface java.sql.Connection
Throws:
java.lang.UnsupportedOperationException

createStatement

public JdbcStatement createStatement(int resultSetType,
                                     int resultSetConcurrency,
                                     int resultSetHoldability)
                              throws java.sql.SQLException
Specified by:
createStatement in interface java.sql.Connection
Throws:
java.sql.SQLException

prepareStatement

public JdbcPreparedStatement prepareStatement(java.lang.String sql,
                                              int resultSetType,
                                              int resultSetConcurrency,
                                              int resultSetHoldability)
                                       throws java.sql.SQLException
Specified by:
prepareStatement in interface java.sql.Connection
Throws:
java.sql.SQLException

prepareCall

public java.sql.CallableStatement prepareCall(java.lang.String sql,
                                              int resultSetType,
                                              int resultSetConcurrency,
                                              int resultSetHoldability)
Not supporetd yet.

Specified by:
prepareCall in interface java.sql.Connection
Throws:
java.lang.UnsupportedOperationException

prepareStatement

public JdbcPreparedStatement prepareStatement(java.lang.String sql,
                                              int autoGeneratedKeys)
                                       throws java.sql.SQLException
Specified by:
prepareStatement in interface java.sql.Connection
Parameters:
sql - SQL to be evaluated
autoGeneratedKeys - ignored
Returns:
Throws:
java.sql.SQLException - When this method is called on a closed connection.

prepareStatement

public JdbcPreparedStatement prepareStatement(java.lang.String sql,
                                              int[] columnIndexes)
Not supporetd yet.

Specified by:
prepareStatement in interface java.sql.Connection
Throws:
java.lang.UnsupportedOperationException

prepareStatement

public JdbcPreparedStatement prepareStatement(java.lang.String sql,
                                              java.lang.String[] columnNames)
Not supporetd yet.

Specified by:
prepareStatement in interface java.sql.Connection
Throws:
java.lang.UnsupportedOperationException

validateConnectionOpen

protected void validateConnectionOpen()
                               throws java.sql.SQLException
Throws:
java.sql.SQLException

setTransactionType

public void setTransactionType(TransactionType type)
                        throws java.sql.SQLException
Parameters:
type - 'DEFERRED', 'IMMEDIATE', 'EXCLUSIVE'
Throws:
java.sql.SQLException
See Also:
BEGIN TRANSACTION

getTransactionType

public TransactionType getTransactionType()
                                   throws java.sql.SQLException
Returns:
transaction type
Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
BEGIN TRANSACTION

createFunction

public void createFunction(Function func)
                    throws java.sql.SQLException
invoke sqlite3_create_function() function.

Parameters:
func - User-Defined function
Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_create_function() function is not SQLITE_OK.
See Also:
Database.createFunction(Function)

dropFunction

public void dropFunction(Function func)
                  throws java.sql.SQLException
invoke sqlite3_create_function() function.

Parameters:
func - User-Defined function
Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_create_function() function is not SQLITE_OK.
See Also:
Database.dropFunction(Function)

createCollationSequence

public void createCollationSequence(Collator col)
                             throws java.sql.SQLException
invoke sqlite3_create_collation() function.

Parameters:
col - User-Defined Collating Sequences
Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_create_collation() function is not SQLITE_OK.
See Also:
Database.createCollationSequence(Collator)

dropCollationSequence

public void dropCollationSequence(Collator col)
                           throws java.sql.SQLException
invoke sqlite3_create_function() function.

Parameters:
col - User-Defined Collating Sequences
Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_create_collation() function is not SQLITE_OK.
See Also:
Database.dropCollationSequence(Collator)

setAuthorizer

public void setAuthorizer(Authorizer auth)
                   throws java.sql.SQLException
invoke sqlite3_set_authorizer() function.

Parameters:
auth - authorizer
Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_set_authorizer() function is not SQLITE_OK.
See Also:
Database.setAuthorizer(Authorizer)

clearAuthorizer

public void clearAuthorizer()
                     throws java.sql.SQLException
invoke sqlite3_set_authorizer() function.

Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_set_authorizer() function is not SQLITE_OK.
See Also:
Database.clearAuthorizer()

setBusyTimeout

public void setBusyTimeout(int ms)
                    throws java.sql.SQLException
invoke sqlite3_busy_timeout() function.

Parameters:
ms - milliseconds
Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.setBusyTimeout(int)

getBusyTimeout

public int getBusyTimeout()
                   throws java.sql.SQLException
Returns the timeout(ms) value.

Returns:
timeout(ms) value.
Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.getBusyTimeout()

setBusyHandler

public void setBusyHandler(BusyHandler busy)
                    throws java.sql.SQLException
invoke sqlite3_busy_handler() function.

Parameters:
busy - busy handler
Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_busy_handler() function is not SQLITE_OK.
See Also:
Database.setBusyHandler(BusyHandler)

clearBusyHandler

public void clearBusyHandler()
                      throws java.sql.SQLException
invoke sqlite3_busy_handler() function.

Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_busy_handler() function is not SQLITE_OK.
See Also:
Database.clearBusyHandler()

setCollationNeededHandler

public void setCollationNeededHandler(CollationNeededHandler needed)
                               throws java.sql.SQLException
invoke sqlite3_collation_needed() function.

Parameters:
needed - collation needed handler
Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_collation_needed() function is not SQLITE_OK.
See Also:
Database.setCollationNeededHandler(CollationNeededHandler)

clearCollationNeededHandler

public void clearCollationNeededHandler()
                                 throws java.sql.SQLException
invoke sqlite3_collation_needed() function.

Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_collation_needed() function is not SQLITE_OK.
See Also:
Database.clearCollationNeededHandler()

setProgressHandler

public void setProgressHandler(ProgressHandler prog)
                        throws java.sql.SQLException
invoke sqlite3_progress_handler() function.

Parameters:
prog - progress handler
Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.setProgressHandler(ProgressHandler)

clearProgressHandler

public void clearProgressHandler()
                          throws java.sql.SQLException
invoke sqlite3_progress_handler() function.

Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.clearProgressHandler()

setCommitHook

public void setCommitHook(CommitHook hook)
                   throws java.sql.SQLException
invoke sqlite3_commit_hook() function.

Parameters:
hook - commit hoot
Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.setCommitHook(CommitHook)

clearCommitHook

public void clearCommitHook()
                     throws java.sql.SQLException
invoke sqlite3_commit_hook() function.

Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.clearCommitHook()

setRollbackHook

public void setRollbackHook(RollbackHook hook)
                     throws java.sql.SQLException
invoke sqlite3_rollback_hook() function.

Parameters:
hook - rollback hoot
Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.setRollbackHook(RollbackHook)

clearRollbackHook

public void clearRollbackHook()
                       throws java.sql.SQLException
invoke sqlite3_rollback_hook() function.

Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.clearRollbackHook()

setUpdateHook

public void setUpdateHook(UpdateHook hook)
                   throws java.sql.SQLException
invoke sqlite3_update_hook() function.

Parameters:
hook - update hoot
Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.setUpdateHook(UpdateHook)

clearUpdateHook

public void clearUpdateHook()
                     throws java.sql.SQLException
invoke sqlite3_update_hook() function.

Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.clearUpdateHook()

setProfiler

public void setProfiler(Profiler profiler)
                 throws java.sql.SQLException
invoke sqlite3_profile() function.

Parameters:
profiler - profiler
Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.setProfiler(Profiler)

clearProfiler

public void clearProfiler()
                   throws java.sql.SQLException
invoke sqlite3_profile() function.

Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.clearProfiler()

setTracer

public void setTracer(Tracer tracer)
               throws java.sql.SQLException
invoke sqlite3_trace() function.

Parameters:
tracer - tracer
Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.setTracer(Tracer)

clearTracer

public void clearTracer()
                 throws java.sql.SQLException
invoke sqlite3_trace() function.

Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.clearTracer()

enableSharedCache

public static void enableSharedCache()
                              throws java.sql.SQLException
invoke sqlite3_enable_shared_cache(on) function.

Throws:
java.sql.SQLException - When the return value of the sqlite3_enable_shared_cache() function is not SQLITE_OK.
See Also:
Database.enableSharedCache()

disableSharedCache

public static void disableSharedCache()
                               throws java.sql.SQLException
invoke sqlite3_enable_shared_cache(off) function.

Throws:
java.sql.SQLException - When the return value of the sqlite3_enable_shared_cache() function is not SQLITE_OK.
See Also:
Database.disableSharedCache()

getLastError

public int getLastError()
                 throws java.sql.SQLException
invoke sqlite3_errcode() function.

Returns:
the numeric result code or extended result code for the most recent failed sqlite3_* API call associated with sqlite3 handle 'db'.
Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.getLastError(), enableExtendedResultCodes(), disableExtendedResultCodes()

getLastErrorMessage

public java.lang.String getLastErrorMessage()
                                     throws java.sql.SQLException
invoke sqlite3_errmsg() function.

Returns:
the numeric result code or extended result code for the most recent failed sqlite3_* API call associated with sqlite3 handle 'db'.
Throws:
java.sql.SQLException - When this method is called on a closed connection.
See Also:
Database.getLastErrorMessage(), getLastError(), enableExtendedResultCodes(), disableExtendedResultCodes()

getTable

public java.util.List<java.lang.String[]> getTable(java.lang.String sql,
                                                   SWIGTYPE_p_p_char errmsg)
                                            throws java.sql.SQLException
invoke sqlite3_get_table() function.

Parameters:
sql - SQL to be evaluated
errmsg - Error message written here
Returns:
Results of the query
Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_get_table() function is not SQLITE_OK.
See Also:
Database.getTable(java.lang.String, org.sqlite.swig.SWIGTYPE_p_p_char)

enableExtendedResultCodes

public void enableExtendedResultCodes()
                               throws java.sql.SQLException
invoke sqlite3_extended_result_codes(on) function.

Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_extended_result_codes() function is not SQLITE_OK.
See Also:
Database.enableExtendedResultCodes()

disableExtendedResultCodes

public void disableExtendedResultCodes()
                                throws java.sql.SQLException
invoke sqlite3_extended_result_codes(off) function.

Throws:
java.sql.SQLException - When the return value of the sqlite3_extended_result_codes() function is not SQLITE_OK.
See Also:
Database.disableExtendedResultCodes()

enableLoadExtention

public void enableLoadExtention()
                         throws java.sql.SQLException
invoke sqlite3_enable_load_extension(on) function.

Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_enable_load_extension() function is not SQLITE_OK.
See Also:
Database.enableLoadExtention()

disableLoadExtention

public void disableLoadExtention()
                          throws java.sql.SQLException
invoke sqlite3_enable_load_extension(off) function.

Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_enable_load_extension() function is not SQLITE_OK.
See Also:
Database.disableLoadExtention()

loadExtention

public void loadExtention(java.lang.String filename,
                          java.lang.String entryPoint,
                          SWIGTYPE_p_p_char errmsg)
                   throws java.sql.SQLException
invoke sqlite3_load_extension() function.

Parameters:
filename - the Name of the shared library containing extension
entryPoint - the Entry point. Use "sqlite3_extension_init" if null.
errmsg - Error message written here
Throws:
java.sql.SQLException - When this method is called on a closed connection. When the return value of the sqlite3_load_extension() function is not SQLITE_OK.
See Also:
Database.loadExtention(java.lang.String, java.lang.String, org.sqlite.swig.SWIGTYPE_p_p_char)

resetAutoExtention

public static void resetAutoExtention()
invoke sqlite3_reset_auto_extension() function.

See Also:
Database.resetAutoExtention()