|
ORE Studio 0.0.4
|
Service for publishing datasets to production tables. More...
#include <publication_service.hpp>

Public Types | |
| using | context = ores::database::context |
Public Member Functions | |
| publication_service (context ctx) | |
| Constructs a publication_service. | |
| std::vector< domain::publication_result > | publish (const std::vector< boost::uuids::uuid > &dataset_ids, domain::publication_mode mode, const std::string &published_by, bool resolve_dependencies=true) |
| Publishes one or more datasets to production tables. | |
| messaging::publish_bundle_response | publish_bundle (const std::string &bundle_code, domain::publication_mode mode, const std::string &published_by, bool atomic=true) |
| Publishes all datasets in a bundle. | |
| std::vector< domain::dataset > | resolve_publication_order (const std::vector< boost::uuids::uuid > &dataset_ids) |
| Resolves the publication order for datasets. | |
| std::vector< domain::publication > | get_publication_history (const boost::uuids::uuid &dataset_id) |
| Gets the publication history for a dataset. | |
| std::vector< domain::publication > | get_recent_publications (std::uint32_t limit=100) |
| Gets recent publication history across all datasets. | |
Service for publishing datasets to production tables.
This service handles the publication workflow:
The service can be used from both the binary protocol handler and HTTP endpoints.
|
explicit |
Constructs a publication_service.
| ctx | The database context for executing queries. |
| std::vector< domain::publication_result > publish | ( | const std::vector< boost::uuids::uuid > & | dataset_ids, |
| domain::publication_mode | mode, | ||
| const std::string & | published_by, | ||
| bool | resolve_dependencies = true |
||
| ) |
Publishes one or more datasets to production tables.
This is the main entry point for dataset publication. It:
| dataset_ids | The IDs of the datasets to publish. |
| mode | How to handle conflicts with existing data. |
| published_by | Username of the person initiating publication. |
| resolve_dependencies | If true, automatically include dependencies. |
| messaging::publish_bundle_response publish_bundle | ( | const std::string & | bundle_code, |
| domain::publication_mode | mode, | ||
| const std::string & | published_by, | ||
| bool | atomic = true |
||
| ) |
Publishes all datasets in a bundle.
Calls the SQL dq_bundles_publish_fn() which:
| bundle_code | The bundle to publish (e.g., 'base', 'solvaris') |
| mode | How to handle conflicts with existing data. |
| published_by | Username of the person initiating publication. |
| atomic | If true, first failure causes entire bundle to rollback. |
| std::vector< domain::dataset > resolve_publication_order | ( | const std::vector< boost::uuids::uuid > & | dataset_ids | ) |
Resolves the publication order for datasets.
Uses boost.graph to build a dependency graph and performs topological sort to determine the correct order. Dependencies are placed before the datasets that depend on them.
| dataset_ids | The IDs of the datasets to order. |

| std::vector< domain::publication > get_publication_history | ( | const boost::uuids::uuid & | dataset_id | ) |
Gets the publication history for a dataset.
| dataset_id | The ID of the dataset. |
| std::vector< domain::publication > get_recent_publications | ( | std::uint32_t | limit = 100 | ) |
Gets recent publication history across all datasets.
| limit | Maximum number of records to return. |