20#ifndef ORES_DATABASE_CONTEXT_FACTORY_HPP
21#define ORES_DATABASE_CONTEXT_FACTORY_HPP
25#include "ores.logging/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 std::string service_account;
60 static context make_context(
const configuration& cfg);
64operator<<(std::ostream& s,
const context_factory::configuration& v);
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Context for the operations on a postgres database.
Definition context.hpp:47
Configuration for database connection.
Definition database_options.hpp:33
Generates a new database context.
Definition context_factory.hpp:34