20#ifndef ORES_DATABASE_CONTEXT_FACTORY_HPP
21#define ORES_DATABASE_CONTEXT_FACTORY_HPP
25#include "ores.utility/log/make_logger.hpp"
26#include "ores.database/domain/context.hpp"
27#include "ores.database/domain/database_options.hpp"
29namespace ores::database {
36 inline static std::string_view logger_name =
37 "ores.utility.database.context_factory";
41 static auto instance = make_logger(logger_name);
46 struct configuration {
50 std::size_t pool_size;
52 std::size_t num_attempts;
54 std::size_t wait_time_in_seconds;
57 static context make_context(
const configuration& cfg);
61operator<<(std::ostream& s,
const context_factory::configuration& v);
Implements logging for ORE Studio.
Definition lifecycle_manager.hpp:30
Context for the operations on a postgres database.
Definition context.hpp:30
Configuration for database connection.
Definition database_options.hpp:33
Generates a new database context.
Definition context_factory.hpp:34