NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::program::PostgreSQLProgramTransitionStore Class Referencefinal

Durable owner-scoped ProgramTransitionStore backed by PostgreSQL. More...

#include <postgres_transition_store.h>

Inheritance diagram for neograph::program::PostgreSQLProgramTransitionStore:
[legend]
Collaboration diagram for neograph::program::PostgreSQLProgramTransitionStore:
[legend]

Public Member Functions

std::string process_coordination_key () const override
 Process-local namespace used to coordinate wrappers over one backend.
 
- Public Member Functions inherited from neograph::program::SyncProgramTransitionStore
asio::awaitable< ProgramTransitionPublishResult > compare_publish (std::string_view owner_scope, std::string_view expected_journal_head, ProgramTransitionPublication publication) final
 Atomically publishes the run snapshot, journal head, events, effect outbox, and JavaScript command appends.
 
asio::awaitable< ProgramTransitionPublishResult > compare_publish_execution (std::string_view owner_scope, std::string_view expected_journal_head, ProgramTransitionPublication publication, std::optional< ProgramExecutionLease > expected_lease, std::optional< ProgramExecutionLease > next_lease) final
 Atomically publishes and acquires, releases, or replaces a dispatch lease.
 
asio::awaitable< ProgramTransitionPublishResult > compare_publish_graph_safe_point (std::string_view owner_scope, std::string_view expected_journal_head, ProgramTransitionPublication publication, const ProgramGraphSafePointEvidence &evidence, const GraphMigrationCapsule &capsule, const ProgramExecutionLease &execution_lease) final
 Host-only peer for a running source checkpoint; evidence is never serialized.
 
bool completes_at_once () const noexcept
 True when every awaitable operation completes at once on the calling thread, not on a pool thread.
 
asio::awaitable< std::optional< ProgramRunRecord > > load (std::string_view owner_scope, std::string_view run_id) const final
 Wrong-owner lookups are indistinguishable from absence.
 
asio::awaitable< std::vector< ProgramChildSynthesisRecord > > load_child_syntheses (std::string_view owner_scope, std::string_view run_id) const final
 Current synthesis heads.
 
asio::awaitable< std::optional< ProgramCommandPublicationHead > > load_command_publication_head (std::string_view owner_scope, std::string_view run_id) const final
 Read one coherent run/journal head and the last command append.
 
asio::awaitable< std::vector< ProgramContextPublication > > load_context_publications (std::string_view owner_scope, std::string_view run_id, std::uint64_t after_sequence=0) const final
 Durable provider-context evidence, ordered by ContextEpoch sequence.
 
asio::awaitable< ProgramEffectiveRuntimeState > load_effective_runtime_state (std::string_view owner_scope, std::string_view run_id) const final
 Target-local state plus source-origin hook heads authorized by its generation.
 
asio::awaitable< std::optional< ProgramExecutionLease > > load_execution_lease (std::string_view owner_scope, std::string_view run_id) const final
 Current backend-global root Core dispatch owner, when one is active.
 
asio::awaitable< std::optional< ProgramRunGeneration > > load_generation (std::string_view owner_scope, std::string_view lineage_id, std::uint64_t generation) const final
 One immutable topology generation retained by ordinal.
 
asio::awaitable< std::optional< ProgramTransitionPublication > > load_generation_initial_publication (std::string_view owner_scope, std::string_view lineage_id, std::uint64_t generation) const final
 Exact immutable publication that created one topology generation.
 
asio::awaitable< std::optional< GraphMigrationCapsule > > load_graph_migration_capsule (std::string_view owner_scope, std::string_view source_run_id, std::string_view source_lineage_head_id) const final
 Immutable source hold captured atomically with one graph safe point.
 
asio::awaitable< std::vector< HookOutboxEntry > > load_hook_outbox_entries (std::string_view owner_scope, std::string_view run_id) const final
 Current durable heads, including pending and reconciliation-required hooks.
 
asio::awaitable< std::vector< ProgramJavaScriptCommandJournalEntry > > load_javascript_commands (std::string_view owner_scope, std::string_view run_id, std::uint64_t after_sequence=0) const final
 Durable yielded-command journal, ordered by append sequence.
 
asio::awaitable< std::optional< ProgramRunLineage > > load_lineage (std::string_view owner_scope, std::string_view lineage_id) const final
 Current immutable lineage head, when the run uses generation accounting.
 
asio::awaitable< std::optional< ProgramRunLineage > > load_lineage_head (std::string_view owner_scope, std::string_view lineage_id, std::string_view head_id) const final
 One immutable historical lineage head addressed by its content identity.
 
asio::awaitable< std::optional< MigrationPlan > > load_migration_plan (std::string_view owner_scope, std::string_view run_id) const final
 Durable migration proof published with a fork, if this run is a fork.
 
asio::awaitable< std::optional< ProgramRunLineage > > load_run_lineage (std::string_view owner_scope, std::string_view run_id) const final
 Current lineage head associated with one run generation.
 
asio::awaitable< std::optional< ProgramRunPublicationHead > > load_run_publication_head (std::string_view owner_scope, std::string_view run_id) const final
 Read one coherent record/journal pair without requiring JavaScript support.
 

Protected Member Functions

bool offloads () const noexcept override
 libpq blocks for long: an awaited operation runs on a thread of the bounded pool (#556).
 

Detailed Description

Durable owner-scoped ProgramTransitionStore backed by PostgreSQL.

Every publication executes in one PostgreSQL transaction and locks the affected run/lineage heads before validating their compare-and-swap state. Exact retries are idempotent and a failed validation or SQL operation leaves every prior head, log, generation, capsule, and lease unchanged.

Definition at line 23 of file postgres_transition_store.h.


The documentation for this class was generated from the following file: