VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
OpenConnection.hpp
Go to the documentation of this file.
1#pragma once
2
7
8namespace VoltMod
9{
10
11/** The driver @p config names, or why it cannot connect. */
13
14bool IsOpen(const AnyConnection& connection);
15
16/** Opens a @p driver connection into @p connection. Throws what the driver throws, whose text can
17 * hold the password. */
18void OpenConnection(AnyConnection& connection, Driver driver, const DatabaseConfig& config);
19
20} // namespace VoltMod
bool IsOpen(const AnyConnection &connection)
std::variant< std::monostate, PostgresConnection, MariaDbConnection, SqliteConnection > AnyConnection
std::expected< T, Error > Result
Definition Result.hpp:64
Result< Driver > CheckConfig(const DatabaseConfig &config)
void OpenConnection(AnyConnection &connection, Driver driver, const DatabaseConfig &config)
Connection parameters for every supported backend.