57namespace neograph::graph {
79 std::optional<Checkpoint>
load_latest(
const std::string& thread_id)
override;
80 std::optional<Checkpoint>
load_by_id(
const std::string&
id)
override;
81 std::vector<Checkpoint>
list(
const std::string& thread_id,
82 int limit = 100)
override;
86 const std::string& parent_checkpoint_id,
89 const std::string& thread_id,
90 const std::string& parent_checkpoint_id)
override;
92 const std::string& parent_checkpoint_id)
override;
105 void ensure_schema();
106 void exec_ddl(
const char* sql);
110 sqlite3* db_ =
nullptr;
111 std::mutex db_mutex_;
NEOGRAPH_API export/import macro for shared-library builds.
Checkpoint system for graph execution state persistence and time-travel.
Abstract interface for checkpoint persistence backends.
Persistent CheckpointStore backed by a SQLite database file.
void save(const Checkpoint &cp) override
Save a checkpoint.
void delete_thread(const std::string &thread_id) override
Delete all checkpoints for a thread.
std::vector< Checkpoint > list(const std::string &thread_id, int limit=100) override
List checkpoints for a thread, ordered by timestamp (newest first).
std::optional< Checkpoint > load_by_id(const std::string &id) override
Load a checkpoint by its unique ID.
SqliteCheckpointStore(const std::string &db_path)
void put_writes(const std::string &thread_id, const std::string &parent_checkpoint_id, const PendingWrite &write) override
Record a successful node execution within an in-progress super-step.
void drop_schema()
Drop all neograph_* tables and recreate them.
std::vector< PendingWrite > get_writes(const std::string &thread_id, const std::string &parent_checkpoint_id) override
Load all pending writes attached to a parent checkpoint.
void clear_writes(const std::string &thread_id, const std::string &parent_checkpoint_id) override
Discard pending writes for a parent checkpoint once its successor super-step has been fully committed...
size_t blob_count()
Number of distinct channel-value blobs currently held.
std::optional< Checkpoint > load_latest(const std::string &thread_id) override
Load the most recent checkpoint for a thread.
Serialized snapshot of graph execution state at a single super-step.
Successful node writes recorded within an in-progress super-step.