FOSSredder 0.5.0
Loading...
Searching...
No Matches
SqliteExportLogRepository Class Reference

#include <SqliteExportLogRepository.h>

Inheritance diagram for SqliteExportLogRepository:
Collaboration diagram for SqliteExportLogRepository:

Classes

struct  Impl

Public Member Functions

 SqliteExportLogRepository (const std::string &dbPath)
 Create an export log repository for the database at the given path.
 SqliteExportLogRepository (std::shared_ptr< SqliteDb > db)
 Create an export log repository using an existing database handle wrapper.
 ~SqliteExportLogRepository () override
 Destroy the repository.
void addExportLog (const std::shared_ptr< core::application::exporting::ExportLog > &log) override
 Insert a new export log entry.
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 removeExportLog (const std::string &id) override
 Remove an export log entry by identifier.
void updateExportLog (const std::shared_ptr< core::application::exporting::ExportLog > &log) override
 Update an existing export log entry.
void upsertExportLog (const std::shared_ptr< core::application::exporting::ExportLog > &log) override
 Insert or update an export log entry.
void clearExportLogs () override
 Remove all export log entries.
Public Member Functions inherited from core::ports::repositories::IExportLogRepository
virtual ~IExportLogRepository ()=default
 Destroy the export log repository interface.

Detailed Description

Definition at line 16 of file SqliteExportLogRepository.h.

Constructor & Destructor Documentation

◆ SqliteExportLogRepository() [1/2]

SqliteExportLogRepository::SqliteExportLogRepository ( const std::string & dbPath)
explicit

Create an export log repository for the database at the given path.

Parameters
dbPathSQLite database path.

Definition at line 104 of file SqliteExportLogRepository.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SqliteExportLogRepository() [2/2]

SqliteExportLogRepository::SqliteExportLogRepository ( std::shared_ptr< SqliteDb > db)
explicit

Create an export log repository using an existing database handle wrapper.

Parameters
dbShared SQLite database wrapper.

Definition at line 107 of file SqliteExportLogRepository.cpp.

◆ ~SqliteExportLogRepository()

SqliteExportLogRepository::~SqliteExportLogRepository ( )
overridedefault

Destroy the repository.

Member Function Documentation

◆ addExportLog()

void SqliteExportLogRepository::addExportLog ( const std::shared_ptr< core::application::exporting::ExportLog > & log)
overridevirtual

Insert a new export log entry.

Parameters
logExport log to add.

Implements core::ports::repositories::IExportLogRepository.

Definition at line 117 of file SqliteExportLogRepository.cpp.

◆ clearExportLogs()

void SqliteExportLogRepository::clearExportLogs ( )
overridevirtual

Remove all export log entries.

Implements core::ports::repositories::IExportLogRepository.

Definition at line 247 of file SqliteExportLogRepository.cpp.

Here is the call graph for this function:

◆ getExportLogById()

std::optional< std::shared_ptr< core::application::exporting::ExportLog > > SqliteExportLogRepository::getExportLogById ( const std::string & id) const
overridevirtual

Retrieve an export log entry by identifier.

Parameters
idExport log identifier.
Returns
Export log with the requested identifier, if found.

Implements core::ports::repositories::IExportLogRepository.

Definition at line 169 of file SqliteExportLogRepository.cpp.

Here is the call graph for this function:

◆ getExportLogs()

std::vector< std::shared_ptr< core::application::exporting::ExportLog > > SqliteExportLogRepository::getExportLogs ( ) const
overridevirtual

Retrieve all export log entries.

Returns
All stored export logs.

Implements core::ports::repositories::IExportLogRepository.

Definition at line 136 of file SqliteExportLogRepository.cpp.

Here is the call graph for this function:

◆ removeExportLog()

void SqliteExportLogRepository::removeExportLog ( const std::string & id)
overridevirtual

Remove an export log entry by identifier.

Parameters
idExport log identifier.

Implements core::ports::repositories::IExportLogRepository.

Definition at line 201 of file SqliteExportLogRepository.cpp.

Here is the call graph for this function:

◆ updateExportLog()

void SqliteExportLogRepository::updateExportLog ( const std::shared_ptr< core::application::exporting::ExportLog > & log)
overridevirtual

Update an existing export log entry.

Parameters
logExport log to update.

Implements core::ports::repositories::IExportLogRepository.

Definition at line 211 of file SqliteExportLogRepository.cpp.

◆ upsertExportLog()

void SqliteExportLogRepository::upsertExportLog ( const std::shared_ptr< core::application::exporting::ExportLog > & log)
overridevirtual

Insert or update an export log entry.

Parameters
logExport log to upsert.

Implements core::ports::repositories::IExportLogRepository.

Definition at line 229 of file SqliteExportLogRepository.cpp.


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