ores.refdata.currency_group
Table of Contents
Reference data defining desk-style currency groupings. Unlike
currency.market_tier (single-valued primary liquidity tier), a
currency can belong to any number of groups simultaneously via
ores.refdata.currency_currency_group_junction (e.g. NOK: G11 and
SCANDIES and COMMODITY). Seeded with G11, SCANDIES, ANTIPODEANS,
COMMODITY, ASIANS, LATAMS — extensible by inserting a row, no schema
change needed for a new group.
1. Flags
2. Columns
2.1. code
Unique currency group code.
Examples: 'G11', 'SCANDIES', 'ANTIPODEANS', 'COMMODITY', 'ASIANS', 'LATAMS'.
2.2. name
Human-readable name for the currency group.
std::string(faker::word::adjective()) + " Group"
2.3. description
Detailed description of the currency group.
std::string(faker::lorem::sentence())
2.4. display_order
Order for UI display purposes.
faker::number::integer(1, 100)
3. SQL
3.1. Flags
3.2. Extra drops
drop function if exists ores_refdata_validate_currency_group_fn;
4. Validation function
5. Insert trigger
5.1. Validations
| column | validation_function |
|---|---|
| change_reason_code | ores_dq_validate_change_reason_fn |
6. C++
6.1. Flags
6.2. Repository
6.3. Domain includes
#include <chrono> #include <string>
6.4. Entity includes
#include <string> #include "sqlgen/Timestamp.hpp"
6.5. Conventions
6.6. Table display
| column | header |
|---|---|
| code | Code |
| name | Name |
| description | Description |
| display_order | Order |
| modified_by | Modified By |
| version | Version |
6.7. Presentation
6.7.1. Columns
| enum_name | field | header | type | width |
|---|---|---|---|---|
| Code | code | Code | string | 150 |
| Name | name | Name | string | 200 |
| Description | description | Description | string | 300 |
| DisplayOrder | display_order | Order | int | 80 |
| Version | version | Version | int | 80 |
| ModifiedBy | modified_by | Modified By | string | 120 |
| RecordedAt | recorded_at | Recorded At | timestamp | 150 |
6.8. Custom repository methods
7. See also
- ores.refdata — component group overview.
- Currency pair support in reference data — parent story.