20#ifndef ORES_DQ_SERVICE_DATASET_SERVICE_HPP
21#define ORES_DQ_SERVICE_DATASET_SERVICE_HPP
26#include <boost/uuid/uuid.hpp>
27#include "ores.logging/make_logger.hpp"
28#include "ores.database/domain/context.hpp"
29#include "ores.dq/domain/dataset.hpp"
30#include "ores.dq/domain/methodology.hpp"
31#include "ores.dq/repository/dataset_repository.hpp"
32#include "ores.dq/repository/methodology_repository.hpp"
34namespace ores::dq::service {
45 inline static std::string_view logger_name =
46 "ores.dq.service.dataset_service";
48 [[nodiscard]]
static auto& lg() {
50 static auto instance = make_logger(logger_name);
76 std::vector<domain::dataset>
87 std::optional<domain::dataset>
find_dataset(
const boost::uuids::uuid&
id);
109 std::vector<domain::dataset>
124 std::vector<domain::methodology>
135 std::optional<domain::methodology>
158 std::vector<domain::methodology>
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Context for the operations on a postgres database.
Definition context.hpp:30
Represents a data quality dataset with lineage tracking.
Definition dataset.hpp:36
Describes a methodology for data processing or transformation.
Definition methodology.hpp:33
Reads and writes datasets to data storage.
Definition dataset_repository.hpp:36
Reads and writes methodologies to data storage.
Definition methodology_repository.hpp:36
Service for managing datasets and methodologies.
Definition dataset_service.hpp:43
std::vector< domain::methodology > list_methodologies()
Lists all methodologies.
Definition dataset_service.cpp:87
std::vector< domain::dataset > get_dataset_history(const boost::uuids::uuid &id)
Gets the version history for a dataset.
Definition dataset_service.cpp:78
std::uint32_t get_methodology_count()
Gets the total count of active methodologies.
Definition dataset_service.cpp:99
std::uint32_t get_dataset_count()
Gets the total count of active datasets.
Definition dataset_service.cpp:48
std::vector< domain::dataset > list_datasets()
Lists all datasets.
Definition dataset_service.cpp:36
void remove_methodology(const boost::uuids::uuid &id)
Removes a methodology.
Definition dataset_service.cpp:122
void remove_dataset(const boost::uuids::uuid &id)
Removes a dataset.
Definition dataset_service.cpp:71
void save_dataset(const domain::dataset &dataset)
Saves a dataset (creates or updates).
Definition dataset_service.cpp:62
std::vector< domain::methodology > get_methodology_history(const boost::uuids::uuid &id)
Gets the version history for a methodology.
Definition dataset_service.cpp:129
void save_methodology(const domain::methodology &methodology)
Saves a methodology (creates or updates).
Definition dataset_service.cpp:113
std::optional< domain::dataset > find_dataset(const boost::uuids::uuid &id)
Finds a dataset by its ID.
Definition dataset_service.cpp:53
std::optional< domain::methodology > find_methodology(const boost::uuids::uuid &id)
Finds a methodology by its ID.
Definition dataset_service.cpp:104