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 close()
          invoke sqlite3_close() function.
 void commitTransaction()
          commit toransaction.
 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.
 void registerFunction(Function func)
          invoke 'sqlite3_create_function()' function and the User-Defined function is registered.
 void rollbackTransaction()
          rollback transaction.
 int setBusyTimeout(int ms)
          invoke sqlite3_busy_timeout() function.
 int totalChanges()
          invoke sqlite3_total_changes() function.
 void unregisterFunction(Function func)
          invoke 'sqlite3_create_function()' function and the User-Defined function is unregistered.
 
クラス 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 int 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

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

registerFunction

public void registerFunction(Function func)
                      throws java.sql.SQLException
invoke 'sqlite3_create_function()' function and the User-Defined function is registered.

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

unregisterFunction

public void unregisterFunction(Function func)
                        throws java.sql.SQLException
invoke 'sqlite3_create_function()' function and the User-Defined function is unregistered.

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

finalize

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