SQLite3 データベースSTMTラッパー. [詳細]
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.cs の 10 行で定義されています。
SQLiteCSLib.Inner.OSQLiteStmtWrap.OSQLiteStmtWrap | ( | OSQLiteDBWrap | dbwrap | ) |
コンストラクタ
OSQLiteStmtWrap.cs の 25 行で定義されています。
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.cs の 341 行で定義されています。
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.cs の 251 行で定義されています。
00252 { 00253 return osqlite3_stmt_bindBool( m_impl, icol, val ); 00254 }
bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindDecimal | ( | int | icol, | |
decimal | val | |||
) |
bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindDouble | ( | int | icol, | |
double | val | |||
) |
bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindInt | ( | int | icol, | |
int | val | |||
) |
整数バインド
icol | カラム位置(0起点) | |
val | 整数型 |
OSQLiteStmtWrap.cs の 262 行で定義されています。
00263 { 00264 return osqlite3_stmt_bindInt( m_impl, icol, val ); 00265 }
bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindInt64 | ( | int | icol, | |
long | val | |||
) |
bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindNull | ( | int | icol | ) |
NULLバインド.
icol | カラム位置(0起点) |
OSQLiteStmtWrap.cs の 330 行で定義されています。
00331 { 00332 return osqlite3_stmt_bindNull( m_impl, icol ); 00333 }
bool SQLiteCSLib.Inner.OSQLiteStmtWrap.bindText | ( | int | icol, | |
string | val | |||
) |
文字列バインド
icol | カラム位置(0起点) | |
val | 文字列 |
OSQLiteStmtWrap.cs の 320 行で定義されています。
00321 { 00322 return osqlite3_stmt_bindText( m_impl, icol, val ); 00323 }
int SQLiteCSLib.Inner.OSQLiteStmtWrap.column_count | ( | ) |
データ結果カラムカウント
OSQLiteStmtWrap.cs の 105 行で定義されています。
00106 { 00107 return osqlite3_stmt_data_count( m_impl ); 00108 }
int SQLiteCSLib.Inner.OSQLiteStmtWrap.data_count | ( | ) |
データ結果カウント ※stepの現在カウント
OSQLiteStmtWrap.cs の 96 行で定義されています。
00097 { 00098 return osqlite3_stmt_data_count( m_impl ); 00099 }
OSQLiteDBWrap SQLiteCSLib.Inner.OSQLiteStmtWrap.DbWrap | ( | ) |
void SQLiteCSLib.Inner.OSQLiteStmtWrap.Dispose | ( | ) |
破棄
OSQLiteStmtWrap.cs の 42 行で定義されています。
bool SQLiteCSLib.Inner.OSQLiteStmtWrap.Execute | ( | string | sql | ) |
SQL単純実行.
sql | SQL文字列 |
OSQLiteStmtWrap.cs の 65 行で定義されています。
00066 { 00067 return osqlite3_stmt_execute( m_impl, sql ); 00068 }
MemoryStream SQLiteCSLib.Inner.OSQLiteStmtWrap.getBlob | ( | int | icol | ) |
BLOB値取得.
icol | カラム位置(0起点) |
OSQLiteStmtWrap.cs の 177 行で定義されています。
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.cs の 221 行で定義されています。
00222 { 00223 return StringFromC.String( osqlite3_stmt_getColumnDecltype( m_impl, icol ) ); 00224 }
string SQLiteCSLib.Inner.OSQLiteStmtWrap.getColumnName | ( | int | icol | ) |
カラム名取得
icol | カラム位置(0起点) |
OSQLiteStmtWrap.cs の 191 行で定義されています。
00192 { 00193 return StringFromC.String( osqlite3_stmt_getColumnName( m_impl, icol ) ); 00194 }
string SQLiteCSLib.Inner.OSQLiteStmtWrap.getColumnOriginalName | ( | int | icol | ) |
カラム元名称取得
icol | カラム位置(0起点) |
OSQLiteStmtWrap.cs の 211 行で定義されています。
00212 { 00213 return StringFromC.String( osqlite3_stmt_getColumnOriginalName( m_impl, icol ) ); 00214 }
string SQLiteCSLib.Inner.OSQLiteStmtWrap.getColumnTableName | ( | int | icol | ) |
カラムのテーブル名取得
icol | カラム位置(0起点) |
OSQLiteStmtWrap.cs の 201 行で定義されています。
00202 { 00203 return StringFromC.String( osqlite3_stmt_getColumnTableName( m_impl, icol ) ); 00204 }
double SQLiteCSLib.Inner.OSQLiteStmtWrap.getDouble | ( | int | icol | ) |
int SQLiteCSLib.Inner.OSQLiteStmtWrap.getInt | ( | int | icol | ) |
整数型値取得
icol | カラム位置(0起点) |
OSQLiteStmtWrap.cs の 125 行で定義されています。
00126 { 00127 return osqlite3_stmt_getInt( m_impl, icol ); 00128 }
long SQLiteCSLib.Inner.OSQLiteStmtWrap.getInt64 | ( | int | icol | ) |
int SQLiteCSLib.Inner.OSQLiteStmtWrap.getSize | ( | int | icol | ) |
BLOBサイズ取得.
icol | カラム位置(0起点) |
OSQLiteStmtWrap.cs の 231 行で定義されています。
00232 { 00233 return osqlite3_stmt_getSize( m_impl, icol ); 00234 }
string SQLiteCSLib.Inner.OSQLiteStmtWrap.getText | ( | int | icol | ) |
文字列値取得
icol | カラム位置(0起点) |
OSQLiteStmtWrap.cs の 167 行で定義されています。
00168 { 00169 return StringFromC.String( osqlite3_stmt_getText( m_impl, icol ) ); 00170 }
DATATYPE SQLiteCSLib.Inner.OSQLiteStmtWrap.getType | ( | int | icol | ) |
カラムタイプ取得
icol | カラム位置(0起点) |
OSQLiteStmtWrap.cs の 115 行で定義されています。
00116 { 00117 return (DATATYPE)osqlite3_stmt_getType( m_impl, icol ); 00118 }
bool SQLiteCSLib.Inner.OSQLiteStmtWrap.Prepate | ( | string | sql | ) |
SQL実行予約.
sql | SQL文字列 |
OSQLiteStmtWrap.cs の 75 行で定義されています。
00076 { 00077 return osqlite3_stmt_prepare( m_impl, sql ); 00078 }
bool SQLiteCSLib.Inner.OSQLiteStmtWrap.Reset | ( | ) |
バインド変数リセット
OSQLiteStmtWrap.cs の 240 行で定義されています。
00241 { 00242 return osqlite3_stmt_reset( m_impl ); 00243 }
ResultEnum SQLiteCSLib.Inner.OSQLiteStmtWrap.Step | ( | ) |
予約(prepare)実行 カーソル実行
OSQLiteStmtWrap.cs の 85 行で定義されています。
00086 { 00087 return (ResultEnum)osqlite3_stmt_step( m_impl ); 00088 00089 }
IntPtr SQLiteCSLib.Inner.OSQLiteStmtWrap.m_impl = IntPtr.Zero [protected] |
内部インスタンス
OSQLiteStmtWrap.cs の 15 行で定義されています。