|
VSQLite++ 0.3
|
Tracks prepared statements by SQL text and hands them out on demand. More...
#include <statement_cache.hpp>

Classes | |
| struct | entry |
Public Member Functions | |
| statement_cache (statement_cache_config cfg={}) | |
| sqlite3_stmt * | acquire (sqlite3 *db, std::string_view sql) |
| void | release (std::string_view sql, sqlite3_stmt *stmt) |
| void | clear (sqlite3 *db) |
| void | reset (statement_cache_config cfg) |
| statement_cache_config | config () const noexcept |
Private Types | |
| using | lru_list = std::list<entry> |
| using | iterator = lru_list::iterator |
Private Attributes | |
| statement_cache_config | config_ |
| lru_list | lru_ |
| std::unordered_map< std::string, iterator > | map_ |
| std::mutex | mutex_ |
Tracks prepared statements by SQL text and hands them out on demand.
Definition at line 65 of file statement_cache.hpp.
|
private |
Definition at line 84 of file statement_cache.hpp.
|
private |
Definition at line 83 of file statement_cache.hpp.
|
explicit |
| sqlite3_stmt * sqlite::v2::statement_cache::acquire | ( | sqlite3 * | db, |
| std::string_view | sql ) |
| void sqlite::v2::statement_cache::clear | ( | sqlite3 * | db | ) |
|
inlinenoexcept |
Definition at line 73 of file statement_cache.hpp.
References config_.
| void sqlite::v2::statement_cache::release | ( | std::string_view | sql, |
| sqlite3_stmt * | stmt ) |
| void sqlite::v2::statement_cache::reset | ( | statement_cache_config | cfg | ) |
|
private |
Definition at line 86 of file statement_cache.hpp.
Referenced by config().
|
private |
Definition at line 87 of file statement_cache.hpp.
|
private |
Definition at line 88 of file statement_cache.hpp.
|
mutableprivate |
Definition at line 89 of file statement_cache.hpp.