|
Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
|
Namespaces | |
| namespace | assertions |
| Query assertion helpers. | |
| namespace | fixtures |
| Test fixture helpers. | |
Classes | |
| class | backend_exception |
| Exception thrown by mock when simulating errors. More... | |
| class | backend_expectation |
| Single query expectation with configurable behavior for database_backend. More... | |
| class | backend_expectation_builder |
| Fluent builder for backend expectations. More... | |
| class | database_exception |
| Exception thrown by mock when simulating errors. More... | |
| class | expectation |
| Single query expectation with configurable behavior. More... | |
| class | expectation_builder |
| Fluent builder for expectations. More... | |
| class | mock_backend |
| Configurable mock for database_backend interface. More... | |
| class | mock_backend_builder |
| Builder for common mock configurations. More... | |
| class | mock_connection_pool |
| Mock connection pool for testing pool-related functionality. More... | |
| class | mock_database |
| Configurable mock for database_backend interface. More... | |
| class | mock_database_builder |
| Builder for common mock configurations. More... | |
| class | scoped_connection |
| RAII wrapper for pool connections. More... | |
| class | scoped_test_database |
| RAII wrapper for test database setup/teardown. More... | |
| class | test_timer |
| Simple timer for performance testing. More... | |
Enumerations | |
| enum class | backend_match_type { EXACT , PATTERN , ANY } |
| How to match query strings. More... | |
| enum class | match_type { EXACT , PATTERN , ANY } |
| How to match query strings. More... | |
Functions | |
| core::database_result | make_result (std::initializer_list< core::database_row > rows) |
| Helper function to create test data rows. | |
| core::database_row | make_row (std::initializer_list< std::pair< std::string, core::database_value > > fields) |
| Create a single row. | |
| template<typename T > | |
| core::database_value | make_value (const T &val) |
| Create a database_value from common types. | |
| core::database_value | make_null () |
| Create a NULL value. | |
| core::database_result | generate_test_data (size_t count, std::function< core::database_row(size_t index)> row_generator) |
| Generate test data for a table. | |
| core::database_result | generate_sequential_ids (size_t count, const std::string &id_column="id") |
| Generate sequential integer test data. | |
|
strong |
How to match query strings.
| Enumerator | |
|---|---|
| EXACT | Exact string match. |
| PATTERN | Regex pattern match. |
| ANY | Match any query. |
Definition at line 24 of file mock_backend_expectations.h.
|
strong |
How to match query strings.
| Enumerator | |
|---|---|
| EXACT | Exact string match. |
| PATTERN | Regex pattern match. |
| ANY | Match any query. |
Definition at line 24 of file mock_expectations.h.
|
inline |
Generate sequential integer test data.
| count | Number of rows |
| id_column | Name of the ID column |
Definition at line 136 of file database_test_utils.h.
References generate_test_data().

|
inline |
Generate test data for a table.
| count | Number of rows to generate |
| row_generator | Function to generate each row |
Definition at line 118 of file database_test_utils.h.
Referenced by generate_sequential_ids().

|
inline |
Create a NULL value.
Definition at line 54 of file database_test_utils.h.
|
inline |
Helper function to create test data rows.
Example:
Definition at line 28 of file database_test_utils.h.
Referenced by database::testing::fixtures::products_data(), and database::testing::fixtures::users_data().

|
inline |
Create a single row.
Definition at line 35 of file database_test_utils.h.
| core::database_value database::testing::make_value | ( | const T & | val | ) |
Create a database_value from common types.
Definition at line 47 of file database_test_utils.h.