ores.trading.trade_envelope
Table of Contents
One row per trade whose document stated an envelope, keyed to the trade.
The envelope is the block a document wraps around a trade. It names a counterparty, a netting set, a list of portfolios and a list of further fields the document states in its own vocabulary. The schema states all four as optional and the last as open content.
The trade row already carries a counterparty and a netting set, but those are the trade's own attributes and the trade states them unconditionally. The envelope is the document's statement and may omit either. A row here holds what the document said, so a reader distinguishes an omitted member from a stated one.
A scalar member needs no flag of its own: a null column says the document omitted it and an empty string says the document stated it empty. The two list members are not like that, because an omitted list and a stated empty list both write no child row. Each therefore carries a flag on this row that says the document stated it.
1. Flags
2. Columns
2.1. trade_id
UUID of the trade this envelope wraps.
2.2. counter_party
Counterparty name the document stated.
The name is kept as the document spelled it rather than resolved to a counterparty row, so export re-emits the document's own text.
2.3. netting_set_id
Netting set identifier the document stated.
2.4. has_portfolio_ids
True when the document stated a portfolio list, empty or not.
Without this flag an omitted list and a stated empty list would both write no child row and export would not know which to emit.
true
2.5. has_additional_fields
True when the document stated an additional-fields list, empty or not.
true
3. SQL
3.1. Flags
4. C++
4.1. Flags
4.2. Repository
4.3. Domain includes
#include <optional> #include <string> #include <boost/uuid/uuid.hpp>
4.4. Conventions
4.5. Table display
| column | header |
|---|---|
| counter_party | Counterparty |
| netting_set_id | Netting Set |
| modified_by | Modified By |
| version | Version |
4.6. Custom repository methods
5. See also
- ores.trading — component group overview.