ThinSQLite++
A thin, safe and convenient modern C++ wrapper for SQLite API.
|
RAII wrapper that resets statement on destruction. More...
Public Member Functions | |
auto_reset () | |
Constructs an empty instance with no statement. | |
auto_reset (const std::unique_ptr< statement > &st) noexcept | |
Constructs an instance referring to a given statement. | |
auto_reset (statement *st) noexcept | |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
auto_reset (const auto_reset &)=delete | |
auto_reset & | operator= (const auto_reset &)=delete |
auto_reset (auto_reset &&src) noexcept | |
auto_reset & | operator= (auto_reset &&src) noexcept |
~auto_reset () noexcept | |
Resets the statement if present. | |
statement * | operator-> () const noexcept |
Access the stored statement. | |
RAII wrapper that resets statement on destruction.
This class allows you to restore the state of a statement after using it. This allows you to reuse the statement cleanly without having to worry about resetting it properly on different code paths.
Flags | auto_reset_flags specifying what kind of reset to perform on destruction |
|
inlinenoexcept |
Constructs an instance referring to a given statement.
The statement is being help by reference and must exist as long as this object is existing.