|
RADLib
RADical C++ application framework
|
Prepared SQLite statement with typed binding and row stepping. More...
#include <RADDatabase.h>
Public Member Functions | |
| RADSqlStatement () | |
| Creates an invalid statement. More... | |
| ~RADSqlStatement () | |
| Finalizes the statement. More... | |
| RADSqlStatement (const RADSqlStatement &)=delete | |
| Statement ownership is movable but not copyable. More... | |
| RADSqlStatement & | operator= (const RADSqlStatement &)=delete |
| Statement ownership is movable but not copyable. More... | |
| RADSqlStatement (RADSqlStatement &&other) noexcept | |
| Moves statement ownership. More... | |
| RADSqlStatement & | operator= (RADSqlStatement &&other) noexcept |
| Moves statement ownership. More... | |
| bool | isValid () const |
| Returns true when a statement was prepared successfully. More... | |
| std::string | lastError () const |
| Returns the last statement error. More... | |
| void | clearBindings () |
| Clears all current bindings. More... | |
| void | reset () |
| Resets statement execution state. More... | |
| bool | bindNull (int index) |
| Binds null at 1-based index. More... | |
| bool | bind (int index, int64_t value) |
| Binds integer at 1-based index. More... | |
| bool | bind (int index, double value) |
| Binds double at 1-based index. More... | |
| bool | bind (int index, const std::string &value) |
| Binds text at 1-based index. More... | |
| bool | bind (int index, const std::vector< uint8_t > &value) |
| Binds bytes at 1-based index. More... | |
| bool | bind (int index, const RADCore::RADVariant &value) |
| Binds a RADVariant at 1-based index. More... | |
| bool | step () |
| Advances one row; returns true when a row is available. More... | |
| bool | execute () |
| Executes until done for statements that do not return rows. More... | |
| int | columnCount () const |
| Returns number of columns in the current row. More... | |
| std::string | columnName (int column) const |
| Returns column name by zero-based index. More... | |
| RADCore::RADVariant | columnValue (int column) const |
| Returns column value by zero-based index. More... | |
Friends | |
| class | RADSqlDatabase |
Prepared SQLite statement with typed binding and row stepping.
| RADDatabase::RADSqlStatement::RADSqlStatement | ( | ) |
Creates an invalid statement.
| RADDatabase::RADSqlStatement::~RADSqlStatement | ( | ) |
Finalizes the statement.
|
delete |
Statement ownership is movable but not copyable.
|
noexcept |
Moves statement ownership.
| bool RADDatabase::RADSqlStatement::bind | ( | int | index, |
| const RADCore::RADVariant & | value | ||
| ) |
Binds a RADVariant at 1-based index.
| bool RADDatabase::RADSqlStatement::bind | ( | int | index, |
| const std::string & | value | ||
| ) |
Binds text at 1-based index.
| bool RADDatabase::RADSqlStatement::bind | ( | int | index, |
| const std::vector< uint8_t > & | value | ||
| ) |
Binds bytes at 1-based index.
| bool RADDatabase::RADSqlStatement::bind | ( | int | index, |
| double | value | ||
| ) |
Binds double at 1-based index.
| bool RADDatabase::RADSqlStatement::bind | ( | int | index, |
| int64_t | value | ||
| ) |
Binds integer at 1-based index.
| bool RADDatabase::RADSqlStatement::bindNull | ( | int | index | ) |
Binds null at 1-based index.
| void RADDatabase::RADSqlStatement::clearBindings | ( | ) |
Clears all current bindings.
| int RADDatabase::RADSqlStatement::columnCount | ( | ) | const |
Returns number of columns in the current row.
| std::string RADDatabase::RADSqlStatement::columnName | ( | int | column | ) | const |
Returns column name by zero-based index.
| RADCore::RADVariant RADDatabase::RADSqlStatement::columnValue | ( | int | column | ) | const |
Returns column value by zero-based index.
| bool RADDatabase::RADSqlStatement::execute | ( | ) |
Executes until done for statements that do not return rows.
| bool RADDatabase::RADSqlStatement::isValid | ( | ) | const |
Returns true when a statement was prepared successfully.
| std::string RADDatabase::RADSqlStatement::lastError | ( | ) | const |
Returns the last statement error.
|
delete |
Statement ownership is movable but not copyable.
|
noexcept |
Moves statement ownership.
| void RADDatabase::RADSqlStatement::reset | ( | ) |
Resets statement execution state.
| bool RADDatabase::RADSqlStatement::step | ( | ) |
Advances one row; returns true when a row is available.
|
friend |