20#ifndef ORES_IAM_SERVICE_DATABASE_NAME_SERVICE_HPP
21#define ORES_IAM_SERVICE_DATABASE_NAME_SERVICE_HPP
25#include "ores.logging/make_logger.hpp"
26#include "ores.database/domain/context.hpp"
55 inline static std::string_view logger_name =
56 "ores.iam.service.database_name_service";
58 [[nodiscard]]
static auto& lg() {
60 static auto instance = make_logger(logger_name);
106 const std::vector<std::string>& existing_names = {},
107 int max_attempts = 10);
125 [[nodiscard]] std::string execute_scalar_string_query(
const std::string& sql);
Service layer for the IAM module.
Definition account_service.hpp:34
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Context for the operations on a postgres database.
Definition context.hpp:30
Service for generating whimsical database names.
Definition database_name_service.hpp:53
std::string generate_unique_database_name(const std::vector< std::string > &existing_names={}, int max_attempts=10)
Generates a unique database name not in the provided list.
Definition database_name_service.cpp:98
std::string generate_whimsical_name()
Generates a whimsical name without prefix.
Definition database_name_service.cpp:79
std::string generate_database_name(bool with_suffix=false)
Generates a database name with the 'ores_' prefix.
Definition database_name_service.cpp:91
std::string generate_unique_database_name_from_server()
Generates a unique database name by checking the server.
Definition database_name_service.cpp:108