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

Public Types | |
| using | context = ores::database::context |
Public Member Functions | |
| account_repository (context ctx) | |
| std::string | sql () |
| Returns the SQL created by sqlgen to construct the table. | |
| std::vector< domain::account > | read_latest (std::uint32_t offset, std::uint32_t limit) |
| Reads latest accounts with pagination support. | |
| std::uint32_t | get_total_account_count () |
| Gets the total count of active accounts. | |
| std::vector< domain::account > | read_latest_by_username (const std::string &username) |
| Reads the latest account by username. | |
| std::vector< domain::account > | read_latest_by_email (const std::string &email) |
| Reads the latest account by email. | |
| void | remove (const boost::uuids::uuid &account_id) |
| Deletes an account by closing its temporal validity. | |
| void | write (const domain::account &account) |
| Writes accounts to database. Expects the account set to have unique IDs. | |
| void | write (const std::vector< domain::account > &accounts) |
| std::vector< domain::account > | read_latest () |
| Reads latest accounts, possibly filtered by ID. | |
| std::vector< domain::account > | read_latest (const boost::uuids::uuid &id) |
| std::vector< domain::account > | read_all () |
| Reads all accounts, possibly filtered by ID. | |
| std::vector< domain::account > | read_all (const boost::uuids::uuid &id) |
Reads and writes accounts off of data storage.
| std::vector< domain::account > read_latest | ( | std::uint32_t | offset, |
| std::uint32_t | limit | ||
| ) |
Reads latest accounts with pagination support.
| offset | Number of records to skip |
| limit | Maximum number of records to return |
| std::uint32_t get_total_account_count | ( | ) |
Gets the total count of active accounts.

| void remove | ( | const boost::uuids::uuid & | account_id | ) |
Deletes an account by closing its temporal validity.
Sets the valid_to timestamp to now, effectively "deleting" the account from the current point in time onwards while preserving history.
