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

#include <SqliteImportLogRepository.h>

Inheritance diagram for SqliteImportLogRepository:
Collaboration diagram for SqliteImportLogRepository:

Classes

struct  Impl

Public Member Functions

 SqliteImportLogRepository (const std::string &dbPath)
 Create an import log repository for the database at the given path.
 SqliteImportLogRepository (std::shared_ptr< SqliteDb > db)
 Create an import log repository using an existing database handle wrapper.
 ~SqliteImportLogRepository () override
 Destroy the repository.
void addImportLog (const std::shared_ptr< core::application::importing::ImportLog > &log) override
 Insert a new import log entry.
std::vector< std::shared_ptr< core::application::importing::ImportLog > > getImportLogs () const override
 Retrieve all import log entries.
std::optional< std::shared_ptr< core::application::importing::ImportLog > > getImportLogById (const std::string &id) const override
 Retrieve an import log entry by identifier.
void removeImportLog (const std::string &id) override
 Remove an import log entry by identifier.
void updateImportLog (const std::shared_ptr< core::application::importing::ImportLog > &log) override
 Update an existing import log entry.
void upsertImportLog (const std::shared_ptr< core::application::importing::ImportLog > &log) override
 Insert or update an import log entry.
void clearImportLogs () override
 Remove all import log entries.
Public Member Functions inherited from core::ports::repositories::IImportLogRepository
virtual ~IImportLogRepository ()=default
 Destroy the import log repository interface.

Detailed Description

Definition at line 16 of file SqliteImportLogRepository.h.

Constructor & Destructor Documentation

◆ SqliteImportLogRepository() [1/2]

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

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

Parameters
dbPathSQLite database path.

Definition at line 112 of file SqliteImportLogRepository.cpp.

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

◆ SqliteImportLogRepository() [2/2]

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

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

Parameters
dbShared SQLite database wrapper.

Definition at line 115 of file SqliteImportLogRepository.cpp.

◆ ~SqliteImportLogRepository()

SqliteImportLogRepository::~SqliteImportLogRepository ( )
overridedefault

Destroy the repository.

Member Function Documentation

◆ addImportLog()

void SqliteImportLogRepository::addImportLog ( const std::shared_ptr< core::application::importing::ImportLog > & log)
overridevirtual

Insert a new import log entry.

Parameters
logImport log to add.

Implements core::ports::repositories::IImportLogRepository.

Definition at line 125 of file SqliteImportLogRepository.cpp.

◆ clearImportLogs()

void SqliteImportLogRepository::clearImportLogs ( )
overridevirtual

Remove all import log entries.

Implements core::ports::repositories::IImportLogRepository.

Definition at line 231 of file SqliteImportLogRepository.cpp.

Here is the call graph for this function:

◆ getImportLogById()

std::optional< std::shared_ptr< core::application::importing::ImportLog > > SqliteImportLogRepository::getImportLogById ( const std::string & id) const
overridevirtual

Retrieve an import log entry by identifier.

Parameters
idImport log identifier.
Returns
Import log with the requested identifier, if found.

Implements core::ports::repositories::IImportLogRepository.

Definition at line 169 of file SqliteImportLogRepository.cpp.

Here is the call graph for this function:

◆ getImportLogs()

std::vector< std::shared_ptr< core::application::importing::ImportLog > > SqliteImportLogRepository::getImportLogs ( ) const
overridevirtual

Retrieve all import log entries.

Returns
All stored import logs.

Implements core::ports::repositories::IImportLogRepository.

Definition at line 138 of file SqliteImportLogRepository.cpp.

Here is the call graph for this function:

◆ removeImportLog()

void SqliteImportLogRepository::removeImportLog ( const std::string & id)
overridevirtual

Remove an import log entry by identifier.

Parameters
idImport log identifier.

Implements core::ports::repositories::IImportLogRepository.

Definition at line 197 of file SqliteImportLogRepository.cpp.

Here is the call graph for this function:

◆ updateImportLog()

void SqliteImportLogRepository::updateImportLog ( const std::shared_ptr< core::application::importing::ImportLog > & log)
overridevirtual

Update an existing import log entry.

Parameters
logImport log to update.

Implements core::ports::repositories::IImportLogRepository.

Definition at line 207 of file SqliteImportLogRepository.cpp.

◆ upsertImportLog()

void SqliteImportLogRepository::upsertImportLog ( const std::shared_ptr< core::application::importing::ImportLog > & log)
overridevirtual

Insert or update an import log entry.

Parameters
logImport log to upsert.

Implements core::ports::repositories::IImportLogRepository.

Definition at line 219 of file SqliteImportLogRepository.cpp.


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