org.sqlite
クラス Database

java.lang.Object
  上位を拡張 org.sqlite.Database

public class Database
extends java.lang.Object

sqlite3 wrapper class.
NOTE: SQLite 3.3.5 based.


フィールドの概要
protected  java.util.Properties info
           
 
コンストラクタの概要
Database(java.lang.String filename, java.util.Properties info)
           
 
メソッドの概要
 void beginTransaction(TransactionType type)
          begin transaction.
 int changes()
          invoke sqlite3_changes() function.
 void clearAuthorizer()
          invoke sqlite3_set_authorizer() function.
 void clearAuthorizer(Authorizer auth)
          invoke sqlite3_set_authorizer() function.
 void clearBusyHandler()
          invoke sqlite3_set_authorizer() function.
 void clearBusyHandler(BusyHandler busy)
          invoke sqlite3_busy_handler() function.
 void clearCommitHook()
          invoke sqlite3_commit_hook() function.
 void clearCommitHook(CommitHook hook)
          invoke sqlite3_commit_hook() function.
 void clearProgressHandler()
          invoke sqlite3_progress_handler() function.
 void clearProgressHandler(ProgressHandler prog)
          invoke sqlite3_progress_handler() function.
 void clearRollbackHook()
          invoke sqlite3_rollback_hook() function.
 void clearRollbackHook(RollbackHook hook)
          invoke sqlite3_rollback_hook() function.
 void clearUpdateHook()
          invoke sqlite3_update_hook() function.
 void clearUpdateHook(UpdateHook hook)
          invoke sqlite3_update_hook() function.
 void close()
          invoke sqlite3_close() function.
 void commitTransaction()
          commit toransaction.
 void createCollation(Collator col)
          invoke sqlite3_create_collation() function.
 void createFunction(Function func)
          invoke sqlite3_create_function() function.
 void disableSharedCache()
          invoke sqlite3_enable_shared_cache(false) function.
 void dropCollation(Collator col)
          invoke sqlite3_create_function() function.
 void dropFunction(Function func)
          invoke sqlite3_create_function() function.
 void enableSharedCache()
          invoke sqlite3_enable_shared_cache(true) function.
 int execute(java.lang.String sql)
          invoke sqlite3_exec() function.
protected  void finalize()
           
 boolean getAutoCommit()
          invoke sqlite3_get_autocommit() function.
 int getBusyTimeout()
          Retrieves the timeout(ms) value.
 ColumnMetaData getColumnMetaData(java.lang.String dbName, java.lang.String tableName, java.lang.String columnName)
          invoke sqlite3_table_column_metadata() function.
 java.lang.String getProductName()
          It always returns "SQLite".
 void interrupt()
          invoke sqlite3_interrupt() function.
 boolean isClosed()
          Retrieves whether this Database object has been closed.
 boolean isInMemoryMode()
           
 boolean isReadOnly()
           
 long lastInsertRowId()
          invoke sqlite3_last_insert_rowid() function.
 void pragma(java.lang.String[] commands)
          execute PRAGMA commands by sqlite3_exec() finction.
 Statement prepare(java.lang.String sql)
          create UNMANAGED Statement instance.
 Statement prepare(java.lang.String sql, SQLite3StmtPtrPtr ppStmt)
          create MANAGED Statement instance.
 java.util.List<Statement> prepareMultiple(java.lang.String sql)
          create multiple UNMANAGED Statement instance.
 void rollbackTransaction()
          rollback transaction.
 void setAuthorizer(Authorizer auth)
          invoke sqlite3_set_authorizer() function.
 void setBusyHandler(BusyHandler busy)
          invoke sqlite3_busy_handler() function.
 void setBusyTimeout(int ms)
          invoke sqlite3_busy_timeout() function.
 void setCommitHook(CommitHook hook)
          invoke sqlite3_commit_hook() function.
 void setProgressHandler(ProgressHandler prog)
          invoke sqlite3_progress_handler() function.
 void setRollbackHook(RollbackHook hook)
          invoke sqlite3_rollback_hook() function.
 void setUpdateHook(UpdateHook hook)
          invoke sqlite3_update_hook() function.
 int totalChanges()
          invoke sqlite3_total_changes() function.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

info

protected final java.util.Properties info
コンストラクタの詳細

Database

public Database(java.lang.String filename,
                java.util.Properties info)
         throws java.sql.SQLException
例外:
java.sql.SQLException
メソッドの詳細

getProductName

public java.lang.String getProductName()
It always returns "SQLite".

戻り値:
"SQLite"

isInMemoryMode

public boolean isInMemoryMode()

isReadOnly

public boolean isReadOnly()

isClosed

public boolean isClosed()
Retrieves whether this Database object has been closed.

戻り値:
true if this Database object is closed. false if it is still open.

close

public void close()
           throws java.sql.SQLException
invoke sqlite3_close() function.

例外:
java.sql.SQLException
関連項目:
Closing A Database Connection

getAutoCommit

public boolean getAutoCommit()
invoke sqlite3_get_autocommit() function.

戻り値:
true if auto commit mode.
関連項目:
Test To See If The Database Is In Auto-Commit Mode

setBusyTimeout

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

パラメータ:
ms - milliseconds
例外:
java.sql.SQLException
関連項目:
Set A Busy Timeout

getBusyTimeout

public int getBusyTimeout()
Retrieves the timeout(ms) value.

戻り値:
timeout(ms) value.

execute

public int execute(java.lang.String sql)
            throws java.sql.SQLException
invoke sqlite3_exec() function.

パラメータ:
sql -
戻り値:
例外:
java.sql.SQLException
関連項目:
One-Step Query Execution Interface

pragma

public void pragma(java.lang.String[] commands)
            throws java.sql.SQLException
execute PRAGMA commands by sqlite3_exec() finction.

パラメータ:
commands - command list
例外:
java.sql.SQLException
関連項目:
Pragma statements supported by SQLite

beginTransaction

public void beginTransaction(TransactionType type)
                      throws java.sql.SQLException
begin transaction.

パラメータ:
type - transaction type.
例外:
java.sql.SQLException
関連項目:
BEGIN TRANSACTION

commitTransaction

public void commitTransaction()
                       throws java.sql.SQLException
commit toransaction.

例外:
java.sql.SQLException
関連項目:
BEGIN TRANSACTION

rollbackTransaction

public void rollbackTransaction()
                         throws java.sql.SQLException
rollback transaction.

例外:
java.sql.SQLException
関連項目:
BEGIN TRANSACTION

prepare

public Statement prepare(java.lang.String sql,
                         SQLite3StmtPtrPtr ppStmt)
                  throws java.sql.SQLException
create MANAGED Statement instance.

パラメータ:
sql -
ppStmt -
戻り値:
例外:
java.sql.SQLException
関連項目:
Compiling An SQL Statement

prepare

public Statement prepare(java.lang.String sql)
                  throws java.sql.SQLException
create UNMANAGED Statement instance.

パラメータ:
sql -
戻り値:
例外:
java.sql.SQLException
関連項目:
Compiling An SQL Statement

prepareMultiple

public java.util.List<Statement> prepareMultiple(java.lang.String sql)
                                          throws java.sql.SQLException
create multiple UNMANAGED Statement instance.

パラメータ:
sql -
戻り値:
array of Statement
例外:
java.sql.SQLException
関連項目:
Compiling An SQL Statement

interrupt

public void interrupt()
               throws java.sql.SQLException
invoke sqlite3_interrupt() function.

例外:
java.sql.SQLException
関連項目:
Interrupt A Long-Running Query

changes

public int changes()
invoke sqlite3_changes() function.

戻り値:
関連項目:
Count The Number Of Rows Modified

totalChanges

public int totalChanges()
invoke sqlite3_total_changes() function.

戻り値:
関連項目:
Total Number Of Rows Modified

lastInsertRowId

public long lastInsertRowId()
invoke sqlite3_last_insert_rowid() function.

戻り値:
関連項目:
Last Insert Rowid

getColumnMetaData

public ColumnMetaData getColumnMetaData(java.lang.String dbName,
                                        java.lang.String tableName,
                                        java.lang.String columnName)
                                 throws java.sql.SQLException
invoke sqlite3_table_column_metadata() function.

パラメータ:
dbName -
tableName -
columnName -
戻り値:
例外:
java.sql.SQLException
関連項目:
Extract Metadata About A Column Of A Table

createFunction

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

パラメータ:
func - User-Defined function
例外:
java.sql.SQLException
関連項目:
Create Or Redefine SQL Functions

dropFunction

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

パラメータ:
func - User-Defined function
例外:
java.sql.SQLException
関連項目:
Create Or Redefine SQL Functions

createCollation

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

パラメータ:
col - User-Defined Collating Sequences
例外:
java.sql.SQLException
関連項目:
Define New Collating Sequences

dropCollation

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

パラメータ:
col - User-Defined Collating Sequences
例外:
java.sql.SQLException
関連項目:
Define New Collating Sequences

setAuthorizer

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

パラメータ:
auth -
例外:
java.sql.SQLException
関連項目:
Compile-Time Authorization Callbacks

clearAuthorizer

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

パラメータ:
auth -
例外:
java.sql.SQLException
関連項目:
Compile-Time Authorization Callbacks

clearAuthorizer

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

例外:
java.sql.SQLException
関連項目:
Compile-Time Authorization Callbacks

setBusyHandler

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

パラメータ:
busy - busy handler
例外:
java.sql.SQLException
関連項目:
Register A Callback To Handle SQLITE_BUSY Errors

clearBusyHandler

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

パラメータ:
busy - busy handler
例外:
java.sql.SQLException
関連項目:
Register A Callback To Handle SQLITE_BUSY Errors

clearBusyHandler

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

例外:
java.sql.SQLException
関連項目:
Register A Callback To Handle SQLITE_BUSY Errors

setProgressHandler

public void setProgressHandler(ProgressHandler prog)
invoke sqlite3_progress_handler() function.

パラメータ:
prog - progress handler
例外:
java.sql.SQLException
関連項目:
Query Progress Callbacks

clearProgressHandler

public void clearProgressHandler(ProgressHandler prog)
invoke sqlite3_progress_handler() function.

パラメータ:
prog - progress handler
例外:
java.sql.SQLException
関連項目:
Query Progress Callbacks

clearProgressHandler

public void clearProgressHandler()
invoke sqlite3_progress_handler() function.

例外:
java.sql.SQLException
関連項目:
Query Progress Callbacks

setCommitHook

public void setCommitHook(CommitHook hook)
invoke sqlite3_commit_hook() function.

パラメータ:
hook - commit hoot
例外:
java.sql.SQLException
関連項目:
Commit And Rollback Notification Callbacks

clearCommitHook

public void clearCommitHook(CommitHook hook)
invoke sqlite3_commit_hook() function.

パラメータ:
hook - commit hoot
例外:
java.sql.SQLException
関連項目:
Commit And Rollback Notification Callbacks

clearCommitHook

public void clearCommitHook()
invoke sqlite3_commit_hook() function.

例外:
java.sql.SQLException
関連項目:
Commit And Rollback Notification Callbacks

setRollbackHook

public void setRollbackHook(RollbackHook hook)
invoke sqlite3_rollback_hook() function.

パラメータ:
hook - rollback hoot
例外:
java.sql.SQLException
関連項目:
Commit And Rollback Notification Callbacks

clearRollbackHook

public void clearRollbackHook(RollbackHook hook)
invoke sqlite3_rollback_hook() function.

パラメータ:
hook - rollback hoot
例外:
java.sql.SQLException
関連項目:
Commit And Rollback Notification Callbacks

clearRollbackHook

public void clearRollbackHook()
invoke sqlite3_rollback_hook() function.

例外:
java.sql.SQLException
関連項目:
Commit And Rollback Notification Callbacks

setUpdateHook

public void setUpdateHook(UpdateHook hook)
invoke sqlite3_update_hook() function.

パラメータ:
hook - update hoot
例外:
java.sql.SQLException
関連項目:
Data Change Notification Callbacks

clearUpdateHook

public void clearUpdateHook(UpdateHook hook)
invoke sqlite3_update_hook() function.

パラメータ:
hook - update hoot
例外:
java.sql.SQLException
関連項目:
Data Change Notification Callbacks

clearUpdateHook

public void clearUpdateHook()
invoke sqlite3_update_hook() function.

例外:
java.sql.SQLException
関連項目:
Data Change Notification Callbacks

enableSharedCache

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

例外:
java.sql.SQLException
関連項目:
Enable Or Disable Shared Pager Cache

disableSharedCache

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

例外:
java.sql.SQLException
関連項目:
Enable Or Disable Shared Pager Cache

finalize

protected void finalize()
                 throws java.lang.Throwable
オーバーライド:
クラス java.lang.Object 内の finalize
例外:
java.lang.Throwable