Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
Loading...
Searching...
No Matches
database::concepts::ConnectionWrapper Concept Reference

A type that wraps a database connection. More...

#include <concepts.h>

Concept definition

template<typename T>
concept database::concepts::ConnectionWrapper = requires(T t) {
{ t.get() } -> std::convertible_to<database_base*>;
{ t.is_valid() } -> std::convertible_to<bool>;
}
A type that wraps a database connection.
Definition concepts.h:301

Detailed Description

A type that wraps a database connection.

Example usage:

template<ConnectionWrapper W>
void use_connection(W& wrapper) {
auto* conn = wrapper.get();
conn->execute("SELECT 1");
}

Definition at line 301 of file concepts.h.