NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
sqlite_store.h
Go to the documentation of this file.
1
5#pragma once
6
8
9#include <memory>
10#include <string>
11#include <string_view>
12
13namespace neograph::program {
14
22class NEOGRAPH_PROGRAM_API SQLiteProgramStore final : public SyncProgramStore {
23public:
24 explicit SQLiteProgramStore(std::string database_path);
26 SQLiteProgramStore& operator=(SQLiteProgramStore&&) noexcept;
28 SQLiteProgramStore& operator=(const SQLiteProgramStore&) = delete;
29 ~SQLiteProgramStore() override;
30
31 void publish_admitted_sync(const ProgramBundle& bundle, const ProgramVersion& version) override;
32 std::optional<ProgramBundle> get_bundle_sync(std::string_view id) const override;
33 std::optional<ProgramVersion> get_version_sync(std::string_view id) const override;
34 std::optional<ProgramBundle> get_bundle_sync(std::string_view owner_scope,
35 std::string_view id) const override;
36 std::optional<ProgramVersion> get_version_sync(std::string_view owner_scope,
37 std::string_view id) const override;
38 std::optional<ProgramActivation>
39 get_activation_sync(std::string_view owner_scope) const override;
40 std::optional<ProgramActivationBinding>
41 get_active_binding_sync(std::string_view owner_scope) const override;
42 ProgramActivationResult compare_activate_sync(std::string_view owner_scope,
43 std::uint64_t expected_generation,
44 std::string_view version_id,
45 std::string_view policy_snapshot_hash) override;
46 std::vector<ProgramVersion> list_versions_sync(std::string_view owner_scope) const override;
47 ProgramRetentionReport collect_garbage_sync(
48 std::string_view owner_scope,
49 const std::vector<std::string>& pinned_version_ids) override;
50
51private:
52 struct Impl;
53 std::unique_ptr<Impl> impl_;
54};
55
56} // namespace neograph::program
ProgramActivationResult
Result of an atomic owner-scoped activation compare-and-swap.
Definition activation.h:20
Transactional SQLite implementation of ProgramStore.
Base of a ProgramStore whose backend is synchronous: the in-memory store, SQLite and PostgreSQL.
Definition store.h:123
Atomic storage of admitted Program bundles and versions.
Counts immutable records removed by reference-aware collection.
Definition activation.h:68