|
FOSSredder 0.5.0
|
#include <SqliteTransactionRepository.h>


Classes | |
| struct | Impl |
Public Member Functions | |
| SqliteTransactionRepository (const std::string &dbPath) | |
| Create a transaction repository for the database at the given path. | |
| SqliteTransactionRepository (const std::string &dbPath, std::shared_ptr< core::ports::diagnostics::IErrorReporter > errorReporter) | |
| Create a transaction repository for the database at the given path. | |
| SqliteTransactionRepository (std::shared_ptr< SqliteDb > db) | |
| Create a transaction repository using an existing database handle wrapper. | |
| SqliteTransactionRepository (std::shared_ptr< SqliteDb > db, std::shared_ptr< core::ports::diagnostics::IErrorReporter > errorReporter) | |
| Create a transaction repository using an existing database handle wrapper. | |
| ~SqliteTransactionRepository () override | |
| Destroy the repository. | |
| void | addTransaction (const std::shared_ptr< core::domain::Transaction > &transaction) override |
| Insert a new transaction. | |
| std::vector< std::shared_ptr< core::domain::Transaction > > | getTransactions () const override |
| Retrieve all transactions. | |
| std::optional< std::shared_ptr< core::domain::Transaction > > | getTransactionById (const std::string &id) const override |
| Retrieve a transaction by identifier. | |
| void | removeTransaction (const std::string &id) override |
| Remove a transaction by identifier. | |
| void | updateTransaction (const std::shared_ptr< core::domain::Transaction > &transaction) override |
| Update an existing transaction. | |
| void | upsertTransaction (const std::shared_ptr< core::domain::Transaction > &transaction) override |
| Insert or update a transaction. | |
| void | clearTransactions () override |
| Remove all transactions. | |
| std::vector< std::shared_ptr< core::domain::Transaction > > | getTransactionsForContract (const std::string &contractId) const override |
| Retrieve transactions associated with a given contract. | |
| void | assignTransactionsToContract (const std::string &contractId, const std::vector< std::string > &transactionIds) override |
| Assign transactions to a contract. | |
| Public Member Functions inherited from core::ports::repositories::ITransactionRepository | |
| virtual | ~ITransactionRepository ()=default |
| Destroy the transaction repository interface. | |
Definition at line 16 of file SqliteTransactionRepository.h.
|
explicit |
Create a transaction repository for the database at the given path.
| dbPath | SQLite database path. |
Definition at line 19 of file SqliteTransactionRepository.cpp.


| SqliteTransactionRepository::SqliteTransactionRepository | ( | const std::string & | dbPath, |
| std::shared_ptr< core::ports::diagnostics::IErrorReporter > | errorReporter ) |
Create a transaction repository for the database at the given path.
| dbPath | SQLite database path. |
| errorReporter | Error reporter used by the repository. |
Definition at line 24 of file SqliteTransactionRepository.cpp.

|
explicit |
Create a transaction repository using an existing database handle wrapper.
| db | Shared SQLite database wrapper. |
Definition at line 30 of file SqliteTransactionRepository.cpp.

| SqliteTransactionRepository::SqliteTransactionRepository | ( | std::shared_ptr< SqliteDb > | db, |
| std::shared_ptr< core::ports::diagnostics::IErrorReporter > | errorReporter ) |
Create a transaction repository using an existing database handle wrapper.
| db | Shared SQLite database wrapper. |
| errorReporter | Error reporter used by the repository. |
Definition at line 34 of file SqliteTransactionRepository.cpp.
|
overridedefault |
Destroy the repository.
|
overridevirtual |
Insert a new transaction.
| transaction | Transaction to add. |
Implements core::ports::repositories::ITransactionRepository.
Definition at line 116 of file SqliteTransactionRepository.cpp.

|
overridevirtual |
Assign transactions to a contract.
| contractId | Contract identifier. |
| transactionIds | Transaction identifiers to assign. |
Implements core::ports::repositories::ITransactionRepository.
Definition at line 275 of file SqliteTransactionRepository.cpp.

|
overridevirtual |
Remove all transactions.
Implements core::ports::repositories::ITransactionRepository.
Definition at line 252 of file SqliteTransactionRepository.cpp.
|
overridevirtual |
Retrieve a transaction by identifier.
| id | Transaction identifier. |
Implements core::ports::repositories::ITransactionRepository.
Definition at line 157 of file SqliteTransactionRepository.cpp.

|
overridevirtual |
Retrieve all transactions.
Implements core::ports::repositories::ITransactionRepository.
Definition at line 145 of file SqliteTransactionRepository.cpp.

|
overridevirtual |
Retrieve transactions associated with a given contract.
| contractId | Contract identifier. |
Implements core::ports::repositories::ITransactionRepository.
Definition at line 262 of file SqliteTransactionRepository.cpp.

|
overridevirtual |
Remove a transaction by identifier.
| id | Transaction identifier. |
Implements core::ports::repositories::ITransactionRepository.
Definition at line 170 of file SqliteTransactionRepository.cpp.

|
overridevirtual |
Update an existing transaction.
| transaction | Transaction to update. |
Implements core::ports::repositories::ITransactionRepository.
Definition at line 182 of file SqliteTransactionRepository.cpp.

|
overridevirtual |
Insert or update a transaction.
| transaction | Transaction to upsert. |
Implements core::ports::repositories::ITransactionRepository.
Definition at line 211 of file SqliteTransactionRepository.cpp.
