statement cache progress
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <chrono>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <optional>
|
||||
#include <thread>
|
||||
#include <unordered_map>
|
||||
|
||||
@@ -48,8 +49,14 @@ public:
|
||||
Connection* operator->() { return &connection_->second; }
|
||||
Connection& operator*() { return connection_->second; }
|
||||
|
||||
[[nodiscard]] size_t id() const { return connection_->first; }
|
||||
|
||||
[[nodiscard]] std::optional<size_t> id() const
|
||||
{
|
||||
if (connection_) {
|
||||
return connection_->first;
|
||||
} else {
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
[[nodiscard]] bool valid() const { return connection_ != nullptr; }
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user