FOSSredder 0.5.0
Loading...
Searching...
No Matches
SqliteExportLogRepository.h
Go to the documentation of this file.
1
6
7#pragma once
8
10
11#include <memory>
12#include <string>
13
14class SqliteDb;
15
18public:
23 explicit SqliteExportLogRepository(const std::string& dbPath);
24
30 explicit SqliteExportLogRepository(std::shared_ptr<SqliteDb> db);
31
36
41 void addExportLog(
42 const std::shared_ptr<core::application::exporting::ExportLog>& log)
43 override;
44
49 std::vector<std::shared_ptr<core::application::exporting::ExportLog>>
50 getExportLogs() const override;
51
57 std::optional<std::shared_ptr<core::application::exporting::ExportLog>>
58 getExportLogById(const std::string& id) const override;
59
64 void removeExportLog(const std::string& id) override;
65
70 void updateExportLog(
71 const std::shared_ptr<core::application::exporting::ExportLog>& log)
72 override;
73
78 void upsertExportLog(
79 const std::shared_ptr<core::application::exporting::ExportLog>& log)
80 override;
81
85 void clearExportLogs() override;
86
87private:
88 struct Impl;
89 std::unique_ptr<Impl> pimpl_;
90};
Repository port for core::application::exporting::ExportLog persistence operations.
void clearExportLogs() override
Remove all export log entries.
SqliteExportLogRepository(const std::string &dbPath)
Create an export log repository for the database at the given path.
std::vector< std::shared_ptr< core::application::exporting::ExportLog > > getExportLogs() const override
Retrieve all export log entries.
std::optional< std::shared_ptr< core::application::exporting::ExportLog > > getExportLogById(const std::string &id) const override
Retrieve an export log entry by identifier.
void addExportLog(const std::shared_ptr< core::application::exporting::ExportLog > &log) override
Insert a new export log entry.
void upsertExportLog(const std::shared_ptr< core::application::exporting::ExportLog > &log) override
Insert or update an export log entry.
~SqliteExportLogRepository() override
Destroy the repository.
void updateExportLog(const std::shared_ptr< core::application::exporting::ExportLog > &log) override
Update an existing export log entry.
void removeExportLog(const std::string &id) override
Remove an export log entry by identifier.