クラス SQLiteCSLib.Inner.OSQLiteStmtWrap

SQLite3 データベースSTMTラッパー. [詳細]

SQLiteCSLib.Inner.OSQLiteStmtWrapのコラボレーション図
Collaboration graph
[凡例]

すべてのメンバ一覧

Public メソッド

 OSQLiteStmtWrap (OSQLiteDBWrap dbwrap)
 コンストラクタ
void Dispose ()
 破棄
OSQLiteDBWrap DbWrap ()
 ラッパーインスタンス取得
bool Execute (string sql)
 SQL単純実行.
bool Prepate (string sql)
 SQL実行予約.
ResultEnum Step ()
 予約(prepare)実行 カーソル実行
int data_count ()
 データ結果カウント ※stepの現在カウント
int column_count ()
 データ結果カラムカウント
DATATYPE getType (int icol)
 カラムタイプ取得
int getInt (int icol)
 整数型値取得
long getInt64 (int icol)
 長整数型値取得
double getDouble (int icol)
 浮動小数点値取得
string getText (int icol)
 文字列値取得
MemoryStream getBlob (int icol)
 BLOB値取得.
string getColumnName (int icol)
 カラム名取得
string getColumnTableName (int icol)
 カラムのテーブル名取得
string getColumnOriginalName (int icol)
 カラム元名称取得
string getColumnDecltype (int icol)
 カラム宣言情報取得
int getSize (int icol)
 BLOBサイズ取得.
bool Reset ()
 バインド変数リセット
bool bindBool (int icol, bool val)
 真偽値バインド
bool bindInt (int icol, int val)
 整数バインド
bool bindInt64 (int icol, long val)
 長整数バインド 64ビット整数
bool bindDouble (int icol, double val)
 浮動小数点バインド
bool bindDecimal (int icol, decimal val)
 実数バインド ※浮動小数点にダウンキャストする。
bool bindText (int icol, string val)
 文字列バインド
bool bindNull (int icol)
 NULLバインド.
bool bindBlob (int icol, MemoryStream val)
 Blobバインド.

Static Protected メソッド

static IntPtr osqlite3_stmt_new (IntPtr dbwrap)
static void osqlite3_stmt_delete (IntPtr instance)
static bool osqlite3_stmt_execute (IntPtr instance, string sql)
static bool osqlite3_stmt_prepare (IntPtr instance, string sql)
static int osqlite3_stmt_step (IntPtr instance)
static int osqlite3_stmt_data_count (IntPtr instance)
static int osqlite3_stmt_column_count (IntPtr instance)
static int osqlite3_stmt_getType (IntPtr instance, int icol)
static int osqlite3_stmt_getInt (IntPtr instance, int icol)
static long osqlite3_stmt_getInt64 (IntPtr instance, int icol)
static double osqlite3_stmt_getDouble (IntPtr instance, int icol)
static IntPtr osqlite3_stmt_getText (IntPtr instance, int icol)
static IntPtr osqlite3_stmt_getBlob (IntPtr instance, int icol, ref int valsize)
static IntPtr osqlite3_stmt_getColumnName (IntPtr instance, int icol)
static IntPtr osqlite3_stmt_getColumnTableName (IntPtr instance, int icol)
static IntPtr osqlite3_stmt_getColumnOriginalName (IntPtr instance, int icol)
static IntPtr osqlite3_stmt_getColumnDecltype (IntPtr instance, int icol)
static int osqlite3_stmt_getSize (IntPtr instance, int icol)
static bool osqlite3_stmt_reset (IntPtr instance)
static bool osqlite3_stmt_bindBool (IntPtr instance, int icol, bool val)
static bool osqlite3_stmt_bindInt (IntPtr instance, int icol, int val)
static bool osqlite3_stmt_bindInt64 (IntPtr instance, int icol, long val)
static bool osqlite3_stmt_bindDouble (IntPtr instance, int icol, double val)
static bool osqlite3_stmt_bindDecimal (IntPtr instance, int icol, decimal val)
static bool osqlite3_stmt_bindText (IntPtr instance, int icol, string val)
static bool osqlite3_stmt_bindNull (IntPtr instance, int icol)
static bool osqlite3_stmt_bindBlob (IntPtr instance, int icol, IntPtr val, int valsize)
static IntPtr AllocHGlobal (int isize)
static void FreeHGlobal (IntPtr pMem)

Protected 変数

IntPtr m_impl = IntPtr.Zero
 内部インスタンス

説明

SQLite3 データベースSTMTラッパー.

OSQLiteStmtWrap.cs10 行で定義されています。


コンストラクタとデストラクタ

SQLiteCSLib.Inner.OSQLiteStmtWrap.OSQLiteStmtWrap ( OSQLiteDBWrap  dbwrap  ) 

コンストラクタ

OSQLiteStmtWrap.cs25 行で定義されています。

00026                 {
00027                         m_dbwrap = dbwrap;
00028                         m_impl = osqlite3_stmt_new( dbwrap.internaldb() );
00029                 }


メソッド

bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindBlob ( int  icol,
MemoryStream  val 
)

Blobバインド.

引数:
icol カラム位置(0起点)
val BLOB(メモリストリーム)
戻り値:
成功可否

OSQLiteStmtWrap.cs341 行で定義されています。

00342                 {
00343                         //※ 精度をダウンコンバートしている
00344                         int iValLen = (int)val.Length;
00345                         val.Seek( 0, SeekOrigin.Begin );
00346 
00347                         byte[] bBin = new byte[iValLen];
00348                         val.Read( bBin, 0, iValLen );
00349 
00350                         IntPtr pBin = IntPtr.Zero;
00351                         try
00352                         {
00353                                 //アンマネージメモリ確保
00354 #if MOBILEPC
00355                                 pBin = AllocHGlobal( iValLen );
00356 #else
00357                                 pBin = Marshal.AllocHGlobal( iValLen );
00358 #endif
00359                                 //マネージからアンマネージへコピー
00360                                 Marshal.Copy( bBin, 0, pBin, iValLen );
00361 
00362                                 return osqlite3_stmt_bindBlob( m_impl, icol, pBin, iValLen );
00363                         }
00364                         finally
00365                         {
00366                                 if( pBin != IntPtr.Zero )
00367                                 {
00368 #if MOBILEPC
00369                                         FreeHGlobal(pBin);
00370 #else
00371                                         Marshal.FreeHGlobal(pBin);
00372 #endif
00373                                 }
00374                         }
00375                 }

bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindBool ( int  icol,
bool  val 
)

真偽値バインド

引数:
icol カラム位置(0起点)
val 真偽型
戻り値:
成功可否

OSQLiteStmtWrap.cs251 行で定義されています。

00252                 {
00253                         return osqlite3_stmt_bindBool( m_impl, icol, val );
00254                 }

bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindDecimal ( int  icol,
decimal  val 
)

実数バインド ※浮動小数点にダウンキャストする。

引数:
icol カラム位置(0起点)
val 実数型
戻り値:
成功可否

OSQLiteStmtWrap.cs305 行で定義されています。

00306                 {
00307 #if MOBILEPC
00308                         return osqlite3_stmt_bindDecimal( m_impl, icol, ref val );
00309 #else
00310                         return osqlite3_stmt_bindDecimal( m_impl, icol, val );
00311 #endif
00312                 }

bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindDouble ( int  icol,
double  val 
)

浮動小数点バインド

引数:
icol カラム位置(0起点)
val 浮動小数点型
戻り値:
成功可否

OSQLiteStmtWrap.cs289 行で定義されています。

00290                 {
00291 #if MOBILEPC
00292                         return osqlite3_stmt_bindDouble( m_impl, icol, ref val );
00293 #else
00294                         return osqlite3_stmt_bindDouble( m_impl, icol, val );
00295 #endif
00296                 }

bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindInt ( int  icol,
int  val 
)

整数バインド

引数:
icol カラム位置(0起点)
val 整数型
戻り値:
成功可否

OSQLiteStmtWrap.cs262 行で定義されています。

00263                 {
00264                         return osqlite3_stmt_bindInt( m_impl, icol, val );
00265                 }

bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindInt64 ( int  icol,
long  val 
)

長整数バインド 64ビット整数

引数:
icol カラム位置(0起点)
val 長整数型
戻り値:
成功可否

OSQLiteStmtWrap.cs274 行で定義されています。

00275                 {
00276 #if MOBILEPC
00277                         return osqlite3_stmt_bindInt64( m_impl, icol, ref val );
00278 #else
00279                         return osqlite3_stmt_bindInt64( m_impl, icol, val );
00280 #endif
00281                 }

bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindNull ( int  icol  ) 

NULLバインド.

引数:
icol カラム位置(0起点)
戻り値:
成功可否

OSQLiteStmtWrap.cs330 行で定義されています。

00331                 {
00332                         return osqlite3_stmt_bindNull( m_impl, icol );
00333                 }

bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindText ( int  icol,
string  val 
)

文字列バインド

引数:
icol カラム位置(0起点)
val 文字列
戻り値:
成功可否

OSQLiteStmtWrap.cs320 行で定義されています。

00321                 {
00322                         return osqlite3_stmt_bindText( m_impl, icol, val );
00323                 }

int SQLiteCSLib.Inner.OSQLiteStmtWrap.column_count (  ) 

データ結果カラムカウント

戻り値:
データ結果カラム数

OSQLiteStmtWrap.cs105 行で定義されています。

00106                 {
00107                         return osqlite3_stmt_data_count( m_impl );
00108                 }

int SQLiteCSLib.Inner.OSQLiteStmtWrap.data_count (  ) 

データ結果カウント ※stepの現在カウント

戻り値:
データ結果数

OSQLiteStmtWrap.cs96 行で定義されています。

00097                 {
00098                         return osqlite3_stmt_data_count( m_impl );
00099                 }

OSQLiteDBWrap SQLiteCSLib.Inner.OSQLiteStmtWrap.DbWrap (  ) 

ラッパーインスタンス取得

戻り値:
データベースラッパー

OSQLiteStmtWrap.cs55 行で定義されています。

00056                 {
00057                         return m_dbwrap;
00058                 }

void SQLiteCSLib.Inner.OSQLiteStmtWrap.Dispose (  ) 

破棄

OSQLiteStmtWrap.cs42 行で定義されています。

00043                 {
00044                         if( m_impl != IntPtr.Zero )
00045                         {
00046                                 osqlite3_stmt_delete( m_impl );
00047                                 m_impl = IntPtr.Zero;
00048                         }
00049                 }

bool SQLiteCSLib.Inner.OSQLiteStmtWrap.Execute ( string  sql  ) 

SQL単純実行.

引数:
sql SQL文字列
戻り値:
成功可否

OSQLiteStmtWrap.cs65 行で定義されています。

00066                 {
00067                         return osqlite3_stmt_execute( m_impl, sql );
00068                 }

MemoryStream SQLiteCSLib.Inner.OSQLiteStmtWrap.getBlob ( int  icol  ) 

BLOB値取得.

引数:
icol カラム位置(0起点)
戻り値:
BLOB値(メモリストリーム)

OSQLiteStmtWrap.cs177 行で定義されています。

00178                 {
00179                         int iLen = 0;
00180                         IntPtr pBin = osqlite3_stmt_getBlob( m_impl, icol, ref iLen );
00181                         byte[] bBin = new byte[iLen];
00182                         Marshal.Copy( pBin, bBin, 0, iLen );
00183                         return new MemoryStream(bBin);
00184                 }

string SQLiteCSLib.Inner.OSQLiteStmtWrap.getColumnDecltype ( int  icol  ) 

カラム宣言情報取得

引数:
icol カラム位置(0起点)
戻り値:
宣言情報

OSQLiteStmtWrap.cs221 行で定義されています。

00222                 {
00223                         return StringFromC.String( osqlite3_stmt_getColumnDecltype( m_impl, icol ) );
00224                 }

string SQLiteCSLib.Inner.OSQLiteStmtWrap.getColumnName ( int  icol  ) 

カラム名取得

引数:
icol カラム位置(0起点)
戻り値:
カラム名

OSQLiteStmtWrap.cs191 行で定義されています。

00192                 {
00193                         return StringFromC.String( osqlite3_stmt_getColumnName( m_impl, icol ) );
00194                 }

string SQLiteCSLib.Inner.OSQLiteStmtWrap.getColumnOriginalName ( int  icol  ) 

カラム元名称取得

引数:
icol カラム位置(0起点)
戻り値:
元名称

OSQLiteStmtWrap.cs211 行で定義されています。

00212                 {
00213                         return StringFromC.String( osqlite3_stmt_getColumnOriginalName( m_impl, icol ) );
00214                 }

string SQLiteCSLib.Inner.OSQLiteStmtWrap.getColumnTableName ( int  icol  ) 

カラムのテーブル名取得

引数:
icol カラム位置(0起点)
戻り値:
テーブル名

OSQLiteStmtWrap.cs201 行で定義されています。

00202                 {
00203                         return StringFromC.String( osqlite3_stmt_getColumnTableName( m_impl, icol ) );
00204                 }

double SQLiteCSLib.Inner.OSQLiteStmtWrap.getDouble ( int  icol  ) 

浮動小数点値取得

引数:
icol カラム位置(0起点)
戻り値:
浮動小数点値

OSQLiteStmtWrap.cs151 行で定義されています。

00152                 {
00153 #if MOBILEPC
00154                         double dVal = 0.0;
00155                         osqlite3_stmt_getDouble( m_impl, icol, ref dVal );
00156                         return dVal;
00157 #else
00158                         return osqlite3_stmt_getDouble( m_impl, icol );
00159 #endif
00160                 }

int SQLiteCSLib.Inner.OSQLiteStmtWrap.getInt ( int  icol  ) 

整数型値取得

引数:
icol カラム位置(0起点)
戻り値:
整数値

OSQLiteStmtWrap.cs125 行で定義されています。

00126                 {
00127                         return osqlite3_stmt_getInt( m_impl, icol );
00128                 }

long SQLiteCSLib.Inner.OSQLiteStmtWrap.getInt64 ( int  icol  ) 

長整数型値取得

引数:
icol カラム位置(0起点)
戻り値:
長整数型値

OSQLiteStmtWrap.cs135 行で定義されています。

00136                 {
00137 #if MOBILEPC
00138                         long lVal = 0;
00139                         osqlite3_stmt_getInt64( m_impl, icol, ref lVal );
00140                         return lVal;
00141 #else
00142                         return osqlite3_stmt_getInt64( m_impl, icol );
00143 #endif
00144                 }

int SQLiteCSLib.Inner.OSQLiteStmtWrap.getSize ( int  icol  ) 

BLOBサイズ取得.

引数:
icol カラム位置(0起点)
戻り値:
BLOBサイズ

OSQLiteStmtWrap.cs231 行で定義されています。

00232                 {
00233                         return osqlite3_stmt_getSize( m_impl, icol );
00234                 }

string SQLiteCSLib.Inner.OSQLiteStmtWrap.getText ( int  icol  ) 

文字列値取得

引数:
icol カラム位置(0起点)
戻り値:
文字列値

OSQLiteStmtWrap.cs167 行で定義されています。

00168                 {
00169                         return StringFromC.String( osqlite3_stmt_getText( m_impl, icol ) );
00170                 }

DATATYPE SQLiteCSLib.Inner.OSQLiteStmtWrap.getType ( int  icol  ) 

カラムタイプ取得

引数:
icol カラム位置(0起点)
戻り値:
データ型

OSQLiteStmtWrap.cs115 行で定義されています。

00116                 {
00117                         return (DATATYPE)osqlite3_stmt_getType( m_impl, icol );
00118                 }

bool SQLiteCSLib.Inner.OSQLiteStmtWrap.Prepate ( string  sql  ) 

SQL実行予約.

引数:
sql SQL文字列
戻り値:
成功可否

OSQLiteStmtWrap.cs75 行で定義されています。

00076                 {
00077                         return osqlite3_stmt_prepare( m_impl, sql );
00078                 }

bool SQLiteCSLib.Inner.OSQLiteStmtWrap.Reset (  ) 

バインド変数リセット

戻り値:
成功可否

OSQLiteStmtWrap.cs240 行で定義されています。

00241                 {
00242                         return osqlite3_stmt_reset( m_impl );
00243                 }

ResultEnum SQLiteCSLib.Inner.OSQLiteStmtWrap.Step (  ) 

予約(prepare)実行 カーソル実行

戻り値:
エラーコード

OSQLiteStmtWrap.cs85 行で定義されています。

00086                 {
00087                         return (ResultEnum)osqlite3_stmt_step( m_impl );
00088 
00089                 }


変数

IntPtr SQLiteCSLib.Inner.OSQLiteStmtWrap.m_impl = IntPtr.Zero [protected]

内部インスタンス

OSQLiteStmtWrap.cs15 行で定義されています。


このクラスの説明は次のファイルから生成されました:

SQLite3 Wrap ADO For .Net1.1 or Compact Frameworkに対してSun Nov 15 13:03:10 2009に生成されました。  doxygen 1.6.1