relx 0.1.0
A Modern C++23 Type-Safe SQL Query Builder
Loading...
Searching...
No Matches
relx::connection::PostgreSQLConnectionParams Struct Reference

Basic parameters for a PostgreSQL connection. More...

#include <relx/connection/connection.hpp>

Public Member Functions

std::string to_connection_string () const
 Convert parameters to a PostgreSQL connection string.
 

Public Attributes

std::string host = "localhost"
 
uint16_t port = 5432
 
std::string dbname
 
std::string user
 
std::string password
 
std::string application_name
 
int connect_timeout = 30
 
std::string ssl_mode
 
std::string ssl_cert
 
std::string ssl_key
 
std::string ssl_root_cert
 

Detailed Description

Basic parameters for a PostgreSQL connection.

Definition at line 40 of file connection.hpp.

Member Function Documentation

◆ to_connection_string()

std::string relx::connection::PostgreSQLConnectionParams::to_connection_string ( ) const
inline

Convert parameters to a PostgreSQL connection string.

Returns
Connection string in libpq format (e.g., "host=localhost port=5432 dbname=mydb...")

Definition at line 57 of file connection.hpp.

Member Data Documentation

◆ application_name

std::string relx::connection::PostgreSQLConnectionParams::application_name

Definition at line 46 of file connection.hpp.

◆ connect_timeout

int relx::connection::PostgreSQLConnectionParams::connect_timeout = 30

Definition at line 47 of file connection.hpp.

◆ dbname

std::string relx::connection::PostgreSQLConnectionParams::dbname

Definition at line 43 of file connection.hpp.

◆ host

std::string relx::connection::PostgreSQLConnectionParams::host = "localhost"

Definition at line 41 of file connection.hpp.

◆ password

std::string relx::connection::PostgreSQLConnectionParams::password

Definition at line 45 of file connection.hpp.

◆ port

uint16_t relx::connection::PostgreSQLConnectionParams::port = 5432

Definition at line 42 of file connection.hpp.

◆ ssl_cert

std::string relx::connection::PostgreSQLConnectionParams::ssl_cert

Definition at line 51 of file connection.hpp.

◆ ssl_key

std::string relx::connection::PostgreSQLConnectionParams::ssl_key

Definition at line 52 of file connection.hpp.

◆ ssl_mode

std::string relx::connection::PostgreSQLConnectionParams::ssl_mode

Definition at line 50 of file connection.hpp.

◆ ssl_root_cert

std::string relx::connection::PostgreSQLConnectionParams::ssl_root_cert

Definition at line 53 of file connection.hpp.

◆ user

std::string relx::connection::PostgreSQLConnectionParams::user

Definition at line 44 of file connection.hpp.


The documentation for this struct was generated from the following file: