|
Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
|
Classes | |
| class | backend_base |
| CRTP template base class for database backends. More... | |
| class | backend_registrar |
| Helper class for automatic backend registration. More... | |
| class | backend_registry |
| Singleton registry for database backend plugins. More... | |
| struct | connection_config |
| Configuration for database connection. More... | |
| class | database_backend |
| Abstract base class for database backends. More... | |
Typedefs | |
| using | database_value = std::variant<std::string, int64_t, double, bool, std::nullptr_t> |
| using | database_row = std::map<std::string, database_value> |
| using | database_result = std::vector<database_row> |
| using | backend_factory_fn = std::unique_ptr<database_backend> (*)() |
| Factory function type for creating database backends. | |
Functions | |
| std::unique_ptr< database_backend > | create_backend (const std::string &name) |
| Convenience function for creating backends (static method style) | |
| bool | has_backend (const std::string &name) |
| Convenience function for checking backend availability. | |
| std::vector< std::string > | available_backends () |
| Convenience function for getting available backends. | |
| using database::core::backend_factory_fn = std::unique_ptr<database_backend> (*)() |
Factory function type for creating database backends.
This function signature is used by backend_registry to instantiate backends. Each backend implementation should provide a create() function matching this signature.
Definition at line 307 of file database_backend.h.
| using database::core::database_result = std::vector<database_row> |
Definition at line 41 of file database_backend.h.
| using database::core::database_row = std::map<std::string, database_value> |
Definition at line 40 of file database_backend.h.
| using database::core::database_value = std::variant<std::string, int64_t, double, bool, std::nullptr_t> |
Definition at line 39 of file database_backend.h.
|
inline |
Convenience function for getting available backends.
Definition at line 247 of file backend_registry.h.
References database::core::backend_registry::available_backends(), and database::core::backend_registry::instance().
Referenced by TEST_F(), and TEST_F().


|
inline |
Convenience function for creating backends (static method style)
| name | Backend name |
This is a convenience wrapper around backend_registry::instance().create() for more concise code.
Example:
Definition at line 228 of file backend_registry.h.
References database::core::backend_registry::create(), and database::core::backend_registry::instance().
Referenced by TEST_F().


|
inline |
Convenience function for checking backend availability.
| name | Backend name to check |
Definition at line 238 of file backend_registry.h.
References database::core::backend_registry::has_backend(), and database::core::backend_registry::instance().
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

