#include <database.h>
|
| virtual void | bind (int column, const std::vector< uint8_t > &blob)=0 |
| virtual void | bind (int column, const uint8_t *data, size_t len)=0 |
| virtual void | bind (int column, size_t i)=0 |
| virtual void | bind (int column, std::chrono::system_clock::time_point time)=0 |
| virtual void | bind (int column, std::string_view str)=0 |
| virtual void | bind_null (int column)=0 |
| virtual std::span< const uint8_t > | get_blob (int column)=0 |
| virtual size_t | get_size_t (int column)=0 |
| virtual std::optional< std::string > | get_str (int column)=0 |
| virtual size_t | spin ()=0 |
| virtual bool | step ()=0 |
| virtual | ~Statement ()=default |
A prepared SQL statement
Definition at line 65 of file database.h.
◆ ~Statement()
| virtual Botan::SQL_Database::Statement::~Statement |
( |
| ) |
|
|
virtualdefault |
◆ bind() [1/5]
| virtual void Botan::SQL_Database::Statement::bind |
( |
int | column, |
|
|
const std::vector< uint8_t > & | blob ) |
|
pure virtual |
Bind a blob to a statement parameter
- Parameters
-
| column | the 1-based index of the parameter |
| blob | the value to bind |
◆ bind() [2/5]
| virtual void Botan::SQL_Database::Statement::bind |
( |
int | column, |
|
|
const uint8_t * | data, |
|
|
size_t | len ) |
|
pure virtual |
Bind a blob to a statement parameter
- Parameters
-
| column | the 1-based index of the parameter |
| data | the value to bind |
| len | length of data in bytes |
◆ bind() [3/5]
| virtual void Botan::SQL_Database::Statement::bind |
( |
int | column, |
|
|
size_t | i ) |
|
pure virtual |
Bind an integer to a statement parameter
- Parameters
-
| column | the 1-based index of the parameter |
| i | the value to bind |
◆ bind() [4/5]
| virtual void Botan::SQL_Database::Statement::bind |
( |
int | column, |
|
|
std::chrono::system_clock::time_point | time ) |
|
pure virtual |
Bind a timestamp to a statement parameter
- Parameters
-
| column | the 1-based index of the parameter |
| time | the value to bind |
◆ bind() [5/5]
| virtual void Botan::SQL_Database::Statement::bind |
( |
int | column, |
|
|
std::string_view | str ) |
|
pure virtual |
Bind a string to a statement parameter
- Parameters
-
| column | the 1-based index of the parameter |
| str | the value to bind |
◆ bind_null()
| virtual void Botan::SQL_Database::Statement::bind_null |
( |
int | column | ) |
|
|
pure virtual |
Bind SQL NULL to a statement parameter
- Parameters
-
| column | the 1-based index of the parameter |
◆ get_blob()
| virtual std::span< const uint8_t > Botan::SQL_Database::Statement::get_blob |
( |
int | column | ) |
|
|
pure virtual |
Read a blob from the current result row
- Parameters
-
| column | the 0-based index of the column |
- Returns
- the blob value, valid until the next call to step
◆ get_size_t()
| virtual size_t Botan::SQL_Database::Statement::get_size_t |
( |
int | column | ) |
|
|
pure virtual |
Read an integer from the current result row
- Parameters
-
| column | the 0-based index of the column |
- Returns
- the integer value
◆ get_str()
| virtual std::optional< std::string > Botan::SQL_Database::Statement::get_str |
( |
int | column | ) |
|
|
pure virtual |
Read a string from the current result row
- Parameters
-
| column | the 0-based index of the column |
- Returns
- the string value, or nullopt if the column value was NULL
◆ spin()
| virtual size_t Botan::SQL_Database::Statement::spin |
( |
| ) |
|
|
pure virtual |
Run the statement to completion
- Returns
- the number of result rows which were stepped over
◆ step()
| virtual bool Botan::SQL_Database::Statement::step |
( |
| ) |
|
|
pure virtual |
Advance to the next result row
- Returns
- true if a row is available, false once the results are exhausted
The documentation for this class was generated from the following file: