|
ORE Studio 0.0.4
|
Reads and writes currencies off of data storage. More...
#include <currency_repository.hpp>

Public Types | |
| using | context = ores::database::context |
Public Member Functions | |
| std::string | sql () |
| Returns the SQL created by sqlgen to construct the table. | |
| std::vector< domain::currency > | read_latest (context ctx, std::uint32_t offset, std::uint32_t limit) |
| Reads latest currencies with pagination support. | |
| std::uint32_t | get_total_currency_count (context ctx) |
| Gets the total count of active currencies. | |
| void | remove (context ctx, const std::string &iso_code) |
| Deletes a currency by closing its temporal validity. | |
| void | write (context ctx, const domain::currency ¤cies) |
| Writes currencies to database. Expects the currency set to have unique ISO codes. | |
| void | write (context ctx, const std::vector< domain::currency > ¤cies) |
| std::vector< domain::currency > | read_latest (context ctx) |
| Reads latest currencies, possibly filtered by ISO code. | |
| std::vector< domain::currency > | read_latest (context ctx, const std::string &iso_code) |
| std::vector< domain::currency > | read_at_timepoint (context ctx, const std::string &as_of) |
| Reads currencies at the supplied time point, possibly filtered by ISO code. | |
| std::vector< domain::currency > | read_at_timepoint (context ctx, const std::string &as_of, const std::string &iso_code) |
| std::vector< domain::currency > | read_all (context ctx) |
| Reads all currencies, possibly filtered by ISO code. | |
| std::vector< domain::currency > | read_all (context ctx, const std::string &iso_code) |
Reads and writes currencies off of data storage.
| std::vector< domain::currency > read_latest | ( | context | ctx, |
| std::uint32_t | offset, | ||
| std::uint32_t | limit | ||
| ) |
Reads latest currencies with pagination support.
| ctx | Repository context with database connection |
| offset | Number of records to skip |
| limit | Maximum number of records to return |
| std::uint32_t get_total_currency_count | ( | context | ctx | ) |
Gets the total count of active currencies.
| ctx | Repository context with database connection |
| void remove | ( | context | ctx, |
| const std::string & | iso_code | ||
| ) |
Deletes a currency by closing its temporal validity.
Sets the valid_to timestamp to now, effectively "deleting" the currency from the current point in time onwards while preserving history.