aboutsummaryrefslogtreecommitdiff
path: root/src/data.hpp
diff options
context:
space:
mode:
authorMetroWind <chris.corsair@gmail.com>2025-09-12 14:41:42 -0700
committerMetroWind <chris.corsair@gmail.com>2025-09-12 14:41:42 -0700
commiteedd1c6b6a612daeb0e4e154bc0200df6826aa1d (patch)
tree88f9d49e8bb6bca54b058a1b3763c1e86e8f68a8 /src/data.hpp
parentc33272456bf969aa47bca432ef302530aa2cf752 (diff)
Implement items() and addLink() in data source.
Diffstat (limited to 'src/data.hpp')
-rw-r--r--src/data.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/data.hpp b/src/data.hpp
index dc64e6f..006f1f2 100644
--- a/src/data.hpp
+++ b/src/data.hpp
@@ -43,7 +43,8 @@ public:
43 // help with database migration. 43 // help with database migration.
44 virtual mw::E<int64_t> getSchemaVersion() const = 0; 44 virtual mw::E<int64_t> getSchemaVersion() const = 0;
45 45
46 virtual std::vector<LinkItem> items(std::optional<int64_t> parent) = 0; 46 virtual mw::E<std::vector<LinkItem>> items(std::optional<int64_t> parent) = 0;
47 virtual mw::E<int64_t> addLink(LinkItem&& link) = 0;
47 48
48protected: 49protected:
49 virtual mw::E<void> setSchemaVersion(int64_t v) const = 0; 50 virtual mw::E<void> setSchemaVersion(int64_t v) const = 0;
@@ -62,6 +63,9 @@ public:
62 63
63 mw::E<int64_t> getSchemaVersion() const override; 64 mw::E<int64_t> getSchemaVersion() const override;
64 65
66 mw::E<std::vector<LinkItem>> items(std::optional<int64_t> parent) override;
67 mw::E<int64_t> addLink(LinkItem&& link) override;
68
65 // Do not use. 69 // Do not use.
66 DataSourceSQLite() = default; 70 DataSourceSQLite() = default;
67 71