Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
Loading...
Searching...
No Matches
database::integrated::database_config Struct Reference

Database-specific configuration. More...

#include <configuration.h>

Collaboration diagram for database::integrated::database_config:
Collaboration graph

Public Attributes

backend_type type { backend_type::postgres }
 Database backend type.
 
std::string connection_string { "host=localhost port=5432 dbname=postgres" }
 Connection string (format depends on backend)
 
bool enable_ssl { false }
 Enable SSL/TLS for database connections.
 
std::string ssl_cert_path {}
 Path to SSL certificate file.
 
std::string ssl_key_path {}
 Path to SSL key file.
 
bool enable_prepared_statements { true }
 Enable prepared statement caching.
 
bool enable_query_cache { false }
 Enable query result caching.
 
std::size_t query_cache_size { 100 * 1024 * 1024 }
 Maximum size of query cache in bytes.
 
std::string username {}
 Database username.
 
std::string password {}
 Database password (stored in memory - consider using secrets management)
 

Detailed Description

Database-specific configuration.

Contains connection details and database-specific settings.

Examples
/home/runner/work/database_system/database_system/database/integrated/core/configuration.h.

Definition at line 217 of file configuration.h.

Member Data Documentation

◆ connection_string

std::string database::integrated::database_config::connection_string { "host=localhost port=5432 dbname=postgres" }

Connection string (format depends on backend)

Examples
/home/runner/work/database_system/database_system/database/integrated/core/configuration.h.

Definition at line 223 of file configuration.h.

223{ "host=localhost port=5432 dbname=postgres" };

Referenced by test_default_values(), test_struct_semantics(), and test_zero_config().

◆ enable_prepared_statements

bool database::integrated::database_config::enable_prepared_statements { true }

Enable prepared statement caching.

Examples
/home/runner/work/database_system/database_system/database/integrated/core/configuration.h.

Definition at line 235 of file configuration.h.

235{ true };

Referenced by test_default_values().

◆ enable_query_cache

bool database::integrated::database_config::enable_query_cache { false }

Enable query result caching.

Examples
/home/runner/work/database_system/database_system/database/integrated/core/configuration.h.

Definition at line 238 of file configuration.h.

238{ false };

◆ enable_ssl

bool database::integrated::database_config::enable_ssl { false }

Enable SSL/TLS for database connections.

Examples
/home/runner/work/database_system/database_system/database/integrated/core/configuration.h.

Definition at line 226 of file configuration.h.

226{ false };

Referenced by test_default_values().

◆ password

std::string database::integrated::database_config::password {}

Database password (stored in memory - consider using secrets management)

Examples
/home/runner/work/database_system/database_system/database/integrated/core/configuration.h.

Definition at line 247 of file configuration.h.

247{};

◆ query_cache_size

std::size_t database::integrated::database_config::query_cache_size { 100 * 1024 * 1024 }

Maximum size of query cache in bytes.

Examples
/home/runner/work/database_system/database_system/database/integrated/core/configuration.h.

Definition at line 241 of file configuration.h.

241{ 100 * 1024 * 1024 }; // 100 MB

◆ ssl_cert_path

std::string database::integrated::database_config::ssl_cert_path {}

Path to SSL certificate file.

Examples
/home/runner/work/database_system/database_system/database/integrated/core/configuration.h.

Definition at line 229 of file configuration.h.

229{};

◆ ssl_key_path

std::string database::integrated::database_config::ssl_key_path {}

◆ type

◆ username

std::string database::integrated::database_config::username {}

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