Alternate e697dbe9c5997e35395fe158628dd8c5209481da
for Visual Studio 2022 and Windows 11.
読み取り中…
検索中…
一致する文字列を見つけられません
alt::db::Statement クラス

SqLite3操作クラス(Statement) [詳解]

#include <Statement.h>

alt::db::Statement の継承関係図
alt::db::Core

公開メンバ関数

 Statement ()
 コンストラクタ
 
virtual ~Statement ()
 デストラクタ
 
bool Bind (int position)
 パラメータのバインド処理
 
bool Bind (int position, double value)
 パラメータのバインド処理
 
bool Bind (int position, int value)
 パラメータのバインド処理
 
bool Bind (int position, LPCSTR value)
 パラメータのバインド処理
 
bool Bind (int position, LPCWSTR value)
 パラメータのバインド処理
 
bool Bind (int position, sqlite3_int64 value)
 パラメータのバインド処理
 
bool Execute ()
 ステートメント実行
 
bool Finalize ()
 終了処理
 
LPCTSTR GetColumnName (int position)
 カラム名の取得
 
int GetColumns ()
 カラム数の取得
 
LPCTSTR GetColumnType (int position)
 カラムタイプの取得
 
double GetDoubleValue (int position)
 行データの取得
 
sqlite3_int64 GetInt64Value (int position)
 行データの取得
 
int GetIntValue (int position)
 行データの取得
 
LPCTSTR GetString16Value (int position)
 行データの取得
 
LPCSTR GetStringValue (int position)
 行データの取得
 
bool Prepare (Engine engine, LPCTSTR lpctszSQL)
 SQLステートメントの準備
 
bool ResetBind ()
 バインドのリセット
 
- 基底クラス alt::db::Core に属する継承公開メンバ関数
 Core ()
 コンストラクタ
 
virtual ~Core ()
 デストラクタ
 

限定公開変数類

sqlite3_stmt_statement
 ステートメント
 
- 基底クラス alt::db::Core に属する継承限定公開変数類
int _lastError
 SQLite3関数エラー値
 

その他の継承メンバ

- 基底クラス alt::db::Core に属する継承限定公開メンバ関数
bool getResponse ()
 各関数の戻り値判定共通
 

詳解

SqLite3操作クラス(Statement)

Statement.h19 行目に定義があります。

構築子と解体子

◆ Statement()

alt::db::Statement::Statement ( )
inline

コンストラクタ

Statement.h23 行目に定義があります。

参照先 _statement.

◆ ~Statement()

virtual alt::db::Statement::~Statement ( )
inlinevirtual

デストラクタ

Statement.h30 行目に定義があります。

参照先 _statement, Finalize().

関数詳解

◆ Bind() [1/6]

bool alt::db::Statement::Bind ( int  position)
inline

パラメータのバインド処理

引数
[in]position列番号
戻り値
実行結果
戻り値
true成功
false失敗
覚え書き
カラムにnullptrを設定します

Statement.h54 行目に定義があります。

参照先 alt::db::Core::_lastError, _statement, alt::db::Core::getResponse(), sqlite3_bind_null().

参照元 DBLibraryTest::TEST_CLASS().

◆ Bind() [2/6]

bool alt::db::Statement::Bind ( int  position,
double  value 
)
inline

パラメータのバインド処理

引数
[in]position列番号
[in]valuedouble値
戻り値
実行結果
戻り値
true成功
false失敗

Statement.h90 行目に定義があります。

参照先 alt::db::Core::_lastError, _statement, alt::db::Core::getResponse(), sqlite3_bind_double().

◆ Bind() [3/6]

bool alt::db::Statement::Bind ( int  position,
int  value 
)
inline

パラメータのバインド処理

引数
[in]position列番号
[in]valueint値
戻り値
実行結果
戻り値
true成功
false失敗

Statement.h66 行目に定義があります。

参照先 alt::db::Core::_lastError, _statement, alt::db::Core::getResponse(), sqlite3_bind_int().

◆ Bind() [4/6]

bool alt::db::Statement::Bind ( int  position,
LPCSTR  value 
)
inline

パラメータのバインド処理

引数
[in]position列番号
[in]valueLPCSTR値
戻り値
実行結果
戻り値
true成功
false失敗

Statement.h102 行目に定義があります。

参照先 alt::db::Core::_lastError, _statement, alt::db::Core::getResponse(), sqlite3_bind_text().

◆ Bind() [5/6]

bool alt::db::Statement::Bind ( int  position,
LPCWSTR  value 
)
inline

パラメータのバインド処理

引数
[in]position列番号
[in]valueLPCWSTR値
戻り値
実行結果
戻り値
true成功
false失敗

Statement.h114 行目に定義があります。

参照先 alt::db::Core::_lastError, _statement, alt::db::Core::getResponse(), sqlite3_bind_text16().

◆ Bind() [6/6]

bool alt::db::Statement::Bind ( int  position,
sqlite3_int64  value 
)
inline

パラメータのバインド処理

引数
[in]position列番号
[in]valuesqlite3_int64値
戻り値
実行結果
戻り値
true成功
false失敗

Statement.h78 行目に定義があります。

参照先 alt::db::Core::_lastError, _statement, alt::db::Core::getResponse(), sqlite3_bind_int64().

◆ Execute()

bool alt::db::Statement::Execute ( )
inline

ステートメント実行

todo:
blob, blob64
戻り値
実行結果
戻り値
true成功
false失敗

Statement.h126 行目に定義があります。

参照先 alt::db::Core::_lastError, _statement, alt::db::Core::getResponse(), sqlite3_step().

参照元 DBLibraryTest::TEST_CLASS().

◆ Finalize()

bool alt::db::Statement::Finalize ( )
inline

終了処理

戻り値
実行結果
戻り値
true成功
false失敗

Statement.h211 行目に定義があります。

参照先 alt::db::Core::_lastError, _statement, alt::db::Core::getResponse(), sqlite3_finalize().

参照元 ~Statement(), DBLibraryTest::TEST_CLASS().

◆ GetColumnName()

LPCTSTR alt::db::Statement::GetColumnName ( int  position)
inline

カラム名の取得

戻り値
カラム名

Statement.h155 行目に定義があります。

参照先 _statement, sqlite3_column_name16().

参照元 DBLibraryTest::TEST_CLASS().

◆ GetColumns()

int alt::db::Statement::GetColumns ( )
inline

カラム数の取得

戻り値
カラム数

Statement.h148 行目に定義があります。

参照先 _statement.

参照元 DBLibraryTest::TEST_CLASS().

◆ GetColumnType()

LPCTSTR alt::db::Statement::GetColumnType ( int  position)
inline

カラムタイプの取得

戻り値
カラムタイプ

Statement.h162 行目に定義があります。

参照先 _statement, sqlite3_column_decltype16().

参照元 DBLibraryTest::TEST_CLASS().

◆ GetDoubleValue()

double alt::db::Statement::GetDoubleValue ( int  position)
inline

行データの取得

引数
[in]positionカラム位置
戻り値
カラム値(double)

Statement.h186 行目に定義があります。

参照先 _statement.

◆ GetInt64Value()

sqlite3_int64 alt::db::Statement::GetInt64Value ( int  position)
inline

行データの取得

引数
[in]positionカラム位置
戻り値
カラム値(sqlite3_int64)

Statement.h178 行目に定義があります。

参照先 _statement.

◆ GetIntValue()

int alt::db::Statement::GetIntValue ( int  position)
inline

行データの取得

引数
[in]positionカラム位置
戻り値
カラム値(int)

Statement.h170 行目に定義があります。

参照先 _statement.

参照元 DBLibraryTest::TEST_CLASS().

◆ GetString16Value()

LPCTSTR alt::db::Statement::GetString16Value ( int  position)
inline

行データの取得

引数
[in]positionカラム位置
戻り値
カラム値(LPCTSTR)

Statement.h202 行目に定義があります。

参照先 _statement, sqlite3_column_text16().

参照元 DBLibraryTest::TEST_CLASS().

◆ GetStringValue()

LPCSTR alt::db::Statement::GetStringValue ( int  position)
inline

行データの取得

引数
[in]positionカラム位置
戻り値
カラム値(LPCSTR)

Statement.h194 行目に定義があります。

参照先 _statement, sqlite3_column_text().

参照元 DBLibraryTest::TEST_CLASS().

◆ Prepare()

bool alt::db::Statement::Prepare ( Engine  engine,
LPCTSTR  lpctszSQL 
)
inline

SQLステートメントの準備

引数
[in]engineEngineインスタンス
[in]lpctszSQLSQLステートメント
戻り値
実行結果
戻り値
true成功
false失敗
todo:
Engine→Engine&へ

Statement.h42 行目に定義があります。

参照先 alt::db::Core::_lastError, _statement, alt::db::Engine::GetEngine(), alt::db::Core::getResponse(), sqlite3_prepare16().

参照元 DBLibraryTest::TEST_CLASS().

◆ ResetBind()

bool alt::db::Statement::ResetBind ( )
inline

バインドのリセット

戻り値
実行結果
戻り値
true成功
false失敗

Statement.h136 行目に定義があります。

参照先 alt::db::Core::_lastError, _statement, alt::db::Core::getResponse(), sqlite3_clear_bindings(), sqlite3_reset().

参照元 DBLibraryTest::TEST_CLASS().

メンバ詳解

◆ _statement

sqlite3_stmt* alt::db::Statement::_statement
protected

このクラス詳解は次のファイルから抽出されました: