Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
Loading...
Searching...
No Matches
database_backend.h File Reference

Abstract interface for database backends. More...

#include "../database_types.h"
#include <kcenon/common/patterns/result.h>
#include <memory>
#include <string>
#include <vector>
#include <map>
#include <variant>
Include dependency graph for database_backend.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  database::core::connection_config
 Configuration for database connection. More...
 
class  database::core::database_backend
 Abstract base class for database backends. More...
 

Namespaces

namespace  database
 
namespace  database::core
 

Typedefs

using database::core::database_value = std::variant<std::string, int64_t, double, bool, std::nullptr_t>
 
using database::core::database_row = std::map<std::string, database_value>
 
using database::core::database_result = std::vector<database_row>
 
using database::core::backend_factory_fn = std::unique_ptr<database_backend> (*)()
 Factory function type for creating database backends.
 

Detailed Description

Abstract interface for database backends.

Defines the interface that all database backends must implement. This enables runtime selection of database implementation without conditional compilation, following the backend pattern successfully implemented in Sprint 4 for logger, monitoring, and thread adapters.

Design Goals:

  • Eliminate conditional compilation (#ifdef USE_POSTGRESQL, etc.)
  • Enable runtime backend selection
  • Support plugin architecture for extensibility
  • Maintain backward compatibility with existing database_base interface

Definition in file database_backend.h.