ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
publish_bundle_request Struct Referencefinal

Request to publish all datasets in a bundle. More...

#include <publish_bundle_protocol.hpp>

Collaboration diagram for publish_bundle_request:
Collaboration graph

Public Member Functions

std::vector< std::byte > serialize () const
 Serialize request to bytes.
 

Static Public Member Functions

static std::expected< publish_bundle_request, ores::utility::serialization::error_code > deserialize (std::span< const std::byte > data)
 Deserialize request from bytes.
 

Public Attributes

std::string bundle_code
 Code of the bundle to publish (e.g., 'base', 'solvaris').
 
domain::publication_mode mode = domain::publication_mode::upsert
 Publication mode.
 
std::string published_by
 Username of person initiating publication.
 
bool atomic = true
 If true, first failure causes entire bundle to rollback.
 

Detailed Description

Request to publish all datasets in a bundle.

This request triggers the bundle publication workflow which:

  1. Publishes all datasets in the bundle in display_order
  2. Optionally uses atomic mode (all-or-nothing semantics)
  3. Records publication history for auditing

Member Function Documentation

◆ serialize()

std::vector< std::byte > serialize ( ) const

Serialize request to bytes.

Format:

  • 2 bytes: bundle_code length
  • N bytes: bundle_code (UTF-8)
  • 1 byte: mode
  • 2 bytes: published_by length
  • N bytes: published_by (UTF-8)
  • 1 byte: atomic

Member Data Documentation

◆ mode

domain::publication_mode mode = domain::publication_mode::upsert

Publication mode.

Controls how existing data is handled:

  • upsert: Insert new, update existing
  • insert_only: Insert new, skip existing
  • replace_all: Delete all, then insert

◆ atomic

bool atomic = true

If true, first failure causes entire bundle to rollback.

In atomic mode, all datasets succeed or all fail together. Defaults to true for safer behavior.