Cleanup user and brewery generation exception logic

This commit is contained in:
Aaron Po
2026-06-21 23:09:29 -04:00
parent ad97b0ea6c
commit 3f978f4de4
9 changed files with 114 additions and 86 deletions

View File

@@ -110,9 +110,9 @@ class BiergartenPipelineOrchestrator {
void LogResults() const;
/// @brief Stores generated brewery data.
std::vector<GeneratedBrewery> generated_breweries_;
std::vector<BreweryRecord> generated_breweries_;
/// @brief Stores generated user data.
std::vector<GeneratedUser> generated_users_;
std::vector<UserRecord> generated_users_;
};
#endif // BIERGARTEN_PIPELINE_INCLUDES_BIERGARTEN_DATA_GENERATOR_H_

View File

@@ -74,7 +74,7 @@ struct EnrichedCity {
/**
* @brief Helper struct to store generated brewery data.
*/
struct GeneratedBrewery {
struct BreweryRecord {
Location location;
BreweryResult brewery;
};
@@ -86,7 +86,7 @@ struct GeneratedBrewery {
* the orchestrator (never LLM-authored) so a downstream auth-account seeding
* consumer can register real accounts from the pipeline's SQLite export.
*/
struct GeneratedUser {
struct UserRecord {
Location location;
UserResult user;
std::string email{};

View File

@@ -53,17 +53,6 @@ struct Location {
double longitude{};
};
/**
* @brief Non-owning brewery location input.
*/
struct BreweryLocation {
/// @brief City name.
std::string_view city_name;
/// @brief Country name.
std::string_view country_name;
};
// ============================================================================
// Name / Persona Models
// ============================================================================

View File

@@ -33,14 +33,14 @@ class IExportService {
*
* @param brewery Generated brewery payload to store.
*/
virtual uint64_t ProcessRecord(const GeneratedBrewery& brewery) = 0;
virtual uint64_t ProcessRecord(const BreweryRecord& brewery) = 0;
/**
* @brief Persists one generated user record.
*
* @param user Generated user payload to store.
*/
virtual uint64_t ProcessRecord(const GeneratedUser& user) = 0;
virtual uint64_t ProcessRecord(const UserRecord& user) = 0;
/// @brief Finalizes the export destination.
virtual void Finalize() = 0;

View File

@@ -30,8 +30,8 @@ class SqliteExportService final : public IExportService {
SqliteExportService& operator=(SqliteExportService&&) = delete;
void Initialize() override;
uint64_t ProcessRecord(const GeneratedBrewery& brewery) override;
uint64_t ProcessRecord(const GeneratedUser& user) override;
uint64_t ProcessRecord(const BreweryRecord& brewery) override;
uint64_t ProcessRecord(const UserRecord& user) override;
void Finalize() override;
private: