|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sqlite.jdbc.JdbcConnection
public class JdbcConnection
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 |
---|
public JdbcConnection(Database db, java.lang.String url) throws java.sql.SQLException
java.sql.SQLException
Method Detail |
---|
public JdbcStatement createStatement() throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
public JdbcPreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql)
prepareCall
in interface java.sql.Connection
java.lang.UnsupportedOperationException
public java.lang.String nativeSQL(java.lang.String sql)
nativeSQL
in interface java.sql.Connection
java.lang.UnsupportedOperationException
public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException
setAutoCommit
in interface java.sql.Connection
java.sql.SQLException
public boolean getAutoCommit() throws java.sql.SQLException
getAutoCommit
in interface java.sql.Connection
java.sql.SQLException
public void commit() throws java.sql.SQLException
commit
in interface java.sql.Connection
java.sql.SQLException
public void rollback() throws java.sql.SQLException
rollback
in interface java.sql.Connection
java.sql.SQLException
public void close() throws java.sql.SQLException
close
in interface java.sql.Connection
java.sql.SQLException
public boolean isClosed() throws java.sql.SQLException
isClosed
in interface java.sql.Connection
java.sql.SQLException
public JdbcDatabaseMetaData getMetaData() throws java.sql.SQLException
getMetaData
in interface java.sql.Connection
java.sql.SQLException
public void setReadOnly(boolean readOnly) throws java.sql.SQLException
setReadOnly
in interface java.sql.Connection
java.sql.SQLException
public boolean isReadOnly() throws java.sql.SQLException
isReadOnly
in interface java.sql.Connection
java.sql.SQLException
- When this method is called on a closed connection.Database.isReadOnly()
public void setCatalog(java.lang.String catalog) throws java.sql.SQLException
setCatalog
in interface java.sql.Connection
catalog
- ignored
java.sql.SQLException
- When this method is called on a closed connection.public java.lang.String getCatalog() throws java.sql.SQLException
getCatalog
in interface java.sql.Connection
java.sql.SQLException
- When this method is called on a closed connection.public void setTransactionIsolation(int level) throws java.sql.SQLException
setTransactionIsolation
in interface java.sql.Connection
java.sql.SQLException
public int getTransactionIsolation() throws java.sql.SQLException
getTransactionIsolation
in interface java.sql.Connection
java.sql.SQLException
- When this method is called on a closed connection.public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.Connection
java.sql.SQLException
- When this method is called on a closed connection.public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Connection
java.sql.SQLException
- When this method is called on a closed connection.public JdbcStatement createStatement(int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
public JdbcPreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency)
prepareCall
in interface java.sql.Connection
java.lang.UnsupportedOperationException
public java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap()
getTypeMap
in interface java.sql.Connection
java.lang.UnsupportedOperationException
public void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
setTypeMap
in interface java.sql.Connection
java.lang.UnsupportedOperationException
public void setHoldability(int holdability) throws java.sql.SQLException
setHoldability
in interface java.sql.Connection
holdability
-
java.sql.SQLException
- When this method is called on a closed connection.public int getHoldability() throws java.sql.SQLException
getHoldability
in interface java.sql.Connection
java.sql.SQLException
- When this method is called on a closed connection.public java.sql.Savepoint setSavepoint()
setSavepoint
in interface java.sql.Connection
java.lang.UnsupportedOperationException
public java.sql.Savepoint setSavepoint(java.lang.String name)
setSavepoint
in interface java.sql.Connection
java.lang.UnsupportedOperationException
public void rollback(java.sql.Savepoint savepoint)
rollback
in interface java.sql.Connection
java.lang.UnsupportedOperationException
public void releaseSavepoint(java.sql.Savepoint savepoint)
releaseSavepoint
in interface java.sql.Connection
java.lang.UnsupportedOperationException
public JdbcStatement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
public JdbcPreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
prepareCall
in interface java.sql.Connection
java.lang.UnsupportedOperationException
public JdbcPreparedStatement prepareStatement(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
sql
- SQL to be evaluatedautoGeneratedKeys
- ignored
java.sql.SQLException
- When this method is called on a closed connection.public JdbcPreparedStatement prepareStatement(java.lang.String sql, int[] columnIndexes)
prepareStatement
in interface java.sql.Connection
java.lang.UnsupportedOperationException
public JdbcPreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] columnNames)
prepareStatement
in interface java.sql.Connection
java.lang.UnsupportedOperationException
protected void validateConnectionOpen() throws java.sql.SQLException
java.sql.SQLException
public void setTransactionType(TransactionType type) throws java.sql.SQLException
type
- 'DEFERRED', 'IMMEDIATE', 'EXCLUSIVE'
java.sql.SQLException
public TransactionType getTransactionType() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.public void createFunction(Function func) throws java.sql.SQLException
func
- User-Defined function
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.Database.createFunction(Function)
public void dropFunction(Function func) throws java.sql.SQLException
func
- User-Defined function
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.Database.dropFunction(Function)
public void createCollationSequence(Collator col) throws java.sql.SQLException
col
- User-Defined Collating Sequences
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.Database.createCollationSequence(Collator)
public void dropCollationSequence(Collator col) throws java.sql.SQLException
col
- User-Defined Collating Sequences
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.Database.dropCollationSequence(Collator)
public void setAuthorizer(Authorizer auth) throws java.sql.SQLException
auth
- authorizer
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.Database.setAuthorizer(Authorizer)
public void clearAuthorizer() throws java.sql.SQLException
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.Database.clearAuthorizer()
public void setBusyTimeout(int ms) throws java.sql.SQLException
ms
- milliseconds
java.sql.SQLException
- When this method is called on a closed connection.Database.setBusyTimeout(int)
public int getBusyTimeout() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.Database.getBusyTimeout()
public void setBusyHandler(BusyHandler busy) throws java.sql.SQLException
busy
- busy handler
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.Database.setBusyHandler(BusyHandler)
public void clearBusyHandler() throws java.sql.SQLException
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.Database.clearBusyHandler()
public void setCollationNeededHandler(CollationNeededHandler needed) throws java.sql.SQLException
needed
- collation needed handler
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.Database.setCollationNeededHandler(CollationNeededHandler)
public void clearCollationNeededHandler() throws java.sql.SQLException
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.Database.clearCollationNeededHandler()
public void setProgressHandler(ProgressHandler prog) throws java.sql.SQLException
prog
- progress handler
java.sql.SQLException
- When this method is called on a closed connection.Database.setProgressHandler(ProgressHandler)
public void clearProgressHandler() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.Database.clearProgressHandler()
public void setCommitHook(CommitHook hook) throws java.sql.SQLException
hook
- commit hoot
java.sql.SQLException
- When this method is called on a closed connection.Database.setCommitHook(CommitHook)
public void clearCommitHook() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.Database.clearCommitHook()
public void setRollbackHook(RollbackHook hook) throws java.sql.SQLException
hook
- rollback hoot
java.sql.SQLException
- When this method is called on a closed connection.Database.setRollbackHook(RollbackHook)
public void clearRollbackHook() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.Database.clearRollbackHook()
public void setUpdateHook(UpdateHook hook) throws java.sql.SQLException
hook
- update hoot
java.sql.SQLException
- When this method is called on a closed connection.Database.setUpdateHook(UpdateHook)
public void clearUpdateHook() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.Database.clearUpdateHook()
public void setProfiler(Profiler profiler) throws java.sql.SQLException
profiler
- profiler
java.sql.SQLException
- When this method is called on a closed connection.Database.setProfiler(Profiler)
public void clearProfiler() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.Database.clearProfiler()
public void setTracer(Tracer tracer) throws java.sql.SQLException
tracer
- tracer
java.sql.SQLException
- When this method is called on a closed connection.Database.setTracer(Tracer)
public void clearTracer() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.Database.clearTracer()
public static void enableSharedCache() throws java.sql.SQLException
java.sql.SQLException
- When the return value of the sqlite3_enable_shared_cache() function is not SQLITE_OK.Database.enableSharedCache()
public static void disableSharedCache() throws java.sql.SQLException
java.sql.SQLException
- When the return value of the sqlite3_enable_shared_cache() function is not SQLITE_OK.Database.disableSharedCache()
public int getLastError() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.Database.getLastError()
,
enableExtendedResultCodes()
,
disableExtendedResultCodes()
public java.lang.String getLastErrorMessage() throws java.sql.SQLException
java.sql.SQLException
- When this method is called on a closed connection.Database.getLastErrorMessage()
,
getLastError()
,
enableExtendedResultCodes()
,
disableExtendedResultCodes()
public java.util.List<java.lang.String[]> getTable(java.lang.String sql, SWIGTYPE_p_p_char errmsg) throws java.sql.SQLException
sql
- SQL to be evaluatederrmsg
- Error message written here
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.Database.getTable(java.lang.String, org.sqlite.swig.SWIGTYPE_p_p_char)
public void enableExtendedResultCodes() throws java.sql.SQLException
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.Database.enableExtendedResultCodes()
public void disableExtendedResultCodes() throws java.sql.SQLException
java.sql.SQLException
- When the return value of the sqlite3_extended_result_codes() function is not SQLITE_OK.Database.disableExtendedResultCodes()
public void enableLoadExtention() throws java.sql.SQLException
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.Database.enableLoadExtention()
public void disableLoadExtention() throws java.sql.SQLException
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.Database.disableLoadExtention()
public void loadExtention(java.lang.String filename, java.lang.String entryPoint, SWIGTYPE_p_p_char errmsg) throws java.sql.SQLException
filename
- the Name of the shared library containing extensionentryPoint
- the Entry point. Use "sqlite3_extension_init" if null.errmsg
- Error message written here
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.Database.loadExtention(java.lang.String, java.lang.String, org.sqlite.swig.SWIGTYPE_p_p_char)
public static void resetAutoExtention()
Database.resetAutoExtention()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |