org.sqlite
クラス Statement

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

public class Statement
extends java.lang.Object

sqlite3_stmt wrapper class.
NOTE: SQLite 3.3.5 based.


メソッドの概要
 void bindBytes(int parameterIndex, byte[] val)
          invoke sqlite3_bind_blob() function.
 void bindBytes(int parameterIndex, byte[] val, int len)
          invoke sqlite3_bind_blob() function.
 void bindDouble(int parameterIndex, double val)
          invoke sqlite3_bind_double() function.
 void bindInt(int parameterIndex, int val)
          invoke sqlite3_bind_int() function.
 void bindLong(int parameterIndex, long val)
          invoke sqlite3_bind_int64() function.
 void bindNull(int parameterIndex)
          invoke sqlite3_bind_null() function.
 void bindText(int parameterIndex, java.lang.String val)
          invoke sqlite3_bind_text() function.
 void clearBinding()
          invoke sqlite3_clear_bindings() function.
 void close()
          invoke sqlite3_finalize() function.
 int execute()
          invoke step() method.
protected  void finalize()
           
 SWIGTYPE_p_void getBlob(int columnIndex)
          invoke sqlite3_column_blob() function.
 int getByteLength(int columnIndex)
          invoke sqlite3_column_bytes() function.
 byte[] getBytes(int columnIndex)
          invoke sqlite3_column_blob() function.
 int getColumnCount()
          invoke sqlite3_column_count() function.
 java.lang.String getColumnLabel(int columnIndex)
          invoke sqlite3_column_name() function.
 ColumnMetaData getColumnMetaData(java.lang.String dbName, java.lang.String tableName, java.lang.String columnName)
          invoke org.sqlite.Database#getColumnMetaData() method.
 java.lang.String getColumnName(int columnIndex)
          invoke sqlite3_column_origin_name() function.
 java.lang.String getColumnTableName(int columnIndex)
          invoke sqlite3_column_table_name() function.
 int getColumnType(int columnIndex)
          invoke sqlite3_column_type() function.
 java.lang.String getColumnTypeName(int columnIndex)
          invoke sqlite3_column_decltype() function.
 Database getDatabase()
           
 int getDataCount()
          invoke sqlite3_data_count() function.
 SWIGTYPE_p_sqlite3 getDbHandle()
          invoke sqlite3_db_handle() function.
 double getDouble(int columnIndex)
          invoke sqlite3_column_double() function.
 int getInt(int columnIndex)
          invoke sqlite3_column_int() function.
 long getLong(int columnIndex)
          invoke sqlite3_column_int64() function.
 int getParameterCount()
          invoke sqlite3_bind_parameter_count() function.
 int getParameterIndex(java.lang.String parameterName)
          invoke sqlite3_bind_parameter_index() function.
 java.lang.String getParameterName(int parameterIndex)
          invoke sqlite3_bind_parameter_name() function.
 java.lang.String getString(int columnIndex)
          invoke sqlite3_column_text() function.
 boolean isClosed()
           
 boolean isExpired()
          invoke sqlite3_expired() function.
 boolean isManaged()
          True is returned when generated with PreparedStatement.
 boolean producedResultSet()
          true if the return value of getColumnCount() is not 0.
 void reset()
          invoke sqlite3_reset() function.
 int step()
          invoke sqlite3_step() function.
protected  void validateColumnIndexRange(int columnIndex)
           
protected  void validateStatementOpen()
           
 
クラス java.lang.Object から継承されたメソッド
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

isManaged

public boolean isManaged()
True is returned when generated with PreparedStatement.

戻り値:

getParameterCount

public int getParameterCount()
                      throws java.sql.SQLException
invoke sqlite3_bind_parameter_count() function.

戻り値:
parameter count
例外:
java.sql.SQLException
関連項目:
Number Of SQL Parameters

getParameterIndex

public int getParameterIndex(java.lang.String parameterName)
                      throws java.sql.SQLException
invoke sqlite3_bind_parameter_index() function.

パラメータ:
parameterName -
戻り値:
parameter index
例外:
java.sql.SQLException
関連項目:
Index Of A Parameter With A Given Name

getParameterName

public java.lang.String getParameterName(int parameterIndex)
                                  throws java.sql.SQLException
invoke sqlite3_bind_parameter_name() function.

パラメータ:
parameterIndex -
戻り値:
parameter name
例外:
java.sql.SQLException
関連項目:
Name Of A Host Parameter

getColumnCount

public int getColumnCount()
                   throws java.sql.SQLException
invoke sqlite3_column_count() function.

戻り値:
column count
例外:
java.sql.SQLException
関連項目:
Number Of Columns In A Result Set

getDataCount

public int getDataCount()
                 throws java.sql.SQLException
invoke sqlite3_data_count() function.
NOTE: Required to invoke the step() method beforehand.

戻り値:
data count
例外:
java.sql.SQLException
関連項目:
step(), Number of columns in a result set

getColumnLabel

public java.lang.String getColumnLabel(int columnIndex)
                                throws java.sql.SQLException
invoke sqlite3_column_name() function.

パラメータ:
columnIndex -
戻り値:
column label
例外:
java.sql.SQLException
関連項目:
Column Names In A Result Set

getColumnName

public java.lang.String getColumnName(int columnIndex)
                               throws java.sql.SQLException
invoke sqlite3_column_origin_name() function.

パラメータ:
columnIndex -
戻り値:
column name
例外:
java.sql.SQLException
関連項目:
Source Of Data In A Query Result

getColumnType

public int getColumnType(int columnIndex)
                  throws java.sql.SQLException
invoke sqlite3_column_type() function. NOTE: Required to invoke the step() method beforehand.

パラメータ:
columnIndex -
戻り値:
column type
例外:
java.sql.SQLException
関連項目:
step(), Results Values From A Query

getColumnTableName

public java.lang.String getColumnTableName(int columnIndex)
                                    throws java.sql.SQLException
invoke sqlite3_column_table_name() function.

パラメータ:
columnIndex -
戻り値:
table name
例外:
java.sql.SQLException
関連項目:
Source Of Data In A Query Result

getColumnTypeName

public java.lang.String getColumnTypeName(int columnIndex)
                                   throws java.sql.SQLException
invoke sqlite3_column_decltype() function.

パラメータ:
columnIndex -
戻り値:
column declare type name
例外:
java.sql.SQLException
関連項目:
Declared Datatype Of A Query Result

getColumnMetaData

public ColumnMetaData getColumnMetaData(java.lang.String dbName,
                                        java.lang.String tableName,
                                        java.lang.String columnName)
                                 throws java.sql.SQLException
invoke org.sqlite.Database#getColumnMetaData() method.

パラメータ:
dbName -
tableName -
columnName -
戻り値:
column meta data
例外:
java.sql.SQLException
関連項目:
Database.getColumnMetaData(String, String, String)

getString

public java.lang.String getString(int columnIndex)
                           throws java.sql.SQLException
invoke sqlite3_column_text() function.

パラメータ:
columnIndex -
戻り値:
例外:
java.sql.SQLException
関連項目:
Results Values From A Query

getInt

public int getInt(int columnIndex)
           throws java.sql.SQLException
invoke sqlite3_column_int() function.

パラメータ:
columnIndex -
戻り値:
例外:
java.sql.SQLException
関連項目:
Results Values From A Query

getLong

public long getLong(int columnIndex)
             throws java.sql.SQLException
invoke sqlite3_column_int64() function.

パラメータ:
columnIndex -
戻り値:
例外:
java.sql.SQLException
関連項目:
Results Values From A Query

getDouble

public double getDouble(int columnIndex)
                 throws java.sql.SQLException
invoke sqlite3_column_double() function.

パラメータ:
columnIndex -
戻り値:
例外:
java.sql.SQLException
関連項目:
Results Values From A Query

getBytes

public byte[] getBytes(int columnIndex)
                throws java.sql.SQLException
invoke sqlite3_column_blob() function.

パラメータ:
columnIndex -
戻り値:
例外:
java.sql.SQLException
関連項目:
Results Values From A Query

getBlob

public SWIGTYPE_p_void getBlob(int columnIndex)
                        throws java.sql.SQLException
invoke sqlite3_column_blob() function.

パラメータ:
columnIndex -
戻り値:
例外:
java.sql.SQLException
関連項目:
Results Values From A Query

getByteLength

public int getByteLength(int columnIndex)
                  throws java.sql.SQLException
invoke sqlite3_column_bytes() function.

パラメータ:
columnIndex -
戻り値:
例外:
java.sql.SQLException
関連項目:
Results Values From A Query

bindNull

public void bindNull(int parameterIndex)
              throws java.sql.SQLException
invoke sqlite3_bind_null() function.

パラメータ:
parameterIndex -
例外:
java.sql.SQLException
関連項目:
Binding Values To Prepared Statements

bindInt

public void bindInt(int parameterIndex,
                    int val)
             throws java.sql.SQLException
invoke sqlite3_bind_int() function.

パラメータ:
parameterIndex -
val -
例外:
java.sql.SQLException
関連項目:
Binding Values To Prepared Statements

bindLong

public void bindLong(int parameterIndex,
                     long val)
              throws java.sql.SQLException
invoke sqlite3_bind_int64() function.

パラメータ:
parameterIndex -
val -
例外:
java.sql.SQLException
関連項目:
Binding Values To Prepared Statements

bindDouble

public void bindDouble(int parameterIndex,
                       double val)
                throws java.sql.SQLException
invoke sqlite3_bind_double() function.

パラメータ:
parameterIndex -
val -
例外:
java.sql.SQLException
関連項目:
Binding Values To Prepared Statements

bindText

public void bindText(int parameterIndex,
                     java.lang.String val)
              throws java.sql.SQLException
invoke sqlite3_bind_text() function.

パラメータ:
parameterIndex -
val -
例外:
java.sql.SQLException
関連項目:
Binding Values To Prepared Statements

bindBytes

public void bindBytes(int parameterIndex,
                      byte[] val)
               throws java.sql.SQLException
invoke sqlite3_bind_blob() function.

パラメータ:
parameterIndex -
val -
例外:
java.sql.SQLException
関連項目:
Binding Values To Prepared Statements

bindBytes

public void bindBytes(int parameterIndex,
                      byte[] val,
                      int len)
               throws java.sql.SQLException
invoke sqlite3_bind_blob() function.

パラメータ:
parameterIndex -
val -
len -
例外:
java.sql.SQLException
関連項目:
Binding Values To Prepared Statements

clearBinding

public void clearBinding()
                  throws java.sql.SQLException
invoke sqlite3_clear_bindings() function.

例外:
java.sql.SQLException
関連項目:
Reset All Bindings On A Prepared Statement

reset

public void reset()
           throws java.sql.SQLException
invoke sqlite3_reset() function.

例外:
java.sql.SQLException
関連項目:
Reset A Prepared Statement Object

step

public int step()
         throws java.sql.SQLException
invoke sqlite3_step() function.

戻り値:
例外:
java.sql.SQLException
関連項目:
Evaluate An SQL Statement

execute

public int execute()
            throws java.sql.SQLException
invoke step() method.

戻り値:
例外:
java.sql.SQLException

isExpired

public boolean isExpired()
                  throws java.sql.SQLException
invoke sqlite3_expired() function.

戻り値:
例外:
java.sql.SQLException
関連項目:
Obsolete Functions

getDbHandle

public SWIGTYPE_p_sqlite3 getDbHandle()
                               throws java.sql.SQLException
invoke sqlite3_db_handle() function.

戻り値:
例外:
java.sql.SQLException
関連項目:
Find The Database Handle Of A Prepared Statement

producedResultSet

public boolean producedResultSet()
                          throws java.sql.SQLException
true if the return value of getColumnCount() is not 0.

戻り値:
例外:
java.sql.SQLException

isClosed

public boolean isClosed()

close

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

例外:
java.sql.SQLException
関連項目:
Destroy A Prepared Statement Object

finalize

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

validateStatementOpen

protected void validateStatementOpen()
                              throws java.sql.SQLException
例外:
java.sql.SQLException

validateColumnIndexRange

protected void validateColumnIndexRange(int columnIndex)
                                 throws java.sql.SQLException
パラメータ:
columnIndex -
例外:
java.sql.SQLException

getDatabase

public Database getDatabase()
                     throws java.sql.SQLException
戻り値:
Database
例外:
java.sql.SQLException