ores.synthetic.folder

Table of Contents

A generic, self-referencing hierarchy node. The Market Simulator tree is drawn directly from these rows rather than parsed out of a feed's source_name string: one root folder per party ("Synthetic"), with market_data_generation_config collections, asset-class folders (e.g. "FX"), and instrument-type folders (e.g. "FX Rates") nested beneath it. fx_spot_generation_config rows reference their immediate parent folder via folder_id. kind distinguishes what a given row represents; = collection_id= is populated only for kind = 'collection' rows, linking back to the market_data_generation_config it represents (that entity remains the source of truth for name/description/enabled/dataset_id; this row's own name is kept in sync for uniform hierarchy display).

Having real, queryable folder rows (rather than string-parsing) lets any caller – the shell, or a future UI – resolve "everything under this folder" the same way, via the generated hierarchy function, instead of each reimplementing the tree-walk itself.

1. Flags

2. Columns

2.1. id

Surrogate UUID uniquely identifying this folder node.

2.2. party_id

Owning party (legal entity) this folder belongs to. Not a natural key: a party has many folders (one root, several collections, and their asset-class/instrument-type children), so no uniqueness is enforced beyond the surrogate id.

ctx.generate_uuid()

2.3. parent_id

Parent folder, for the tree hierarchy. Null for the root folder.

std::nullopt

2.4. name

Display name of this folder (e.g. "Synthetic", "Basic", "FX", "FX Rates").

std::string(faker::word::noun())

2.5. kind

What this folder represents: "root", "collection", "asset_class", or "instrument_type".

std::string("root")

2.6. collection_id

For kind = 'collection' rows only: the market_data_generation_config this folder represents. Null for every other kind.

std::nullopt

3. SQL

3.1. Flags

3.2. Checks

expression
"name" <> ''
"kind" in ('root', 'collection', 'asset_class', 'instrument_type')

4. Foreign keys

4.1. parent_id

4.2. collection_id

5. Validation function

6. C++

6.1. Flags

6.2. Repository

The installation's system collections, their feeds and the provider catalogue ship under the system tenant, and every tenant reads them, which :system_tenant_visible: true states on the repository. The row-level security policy still decides which system rows a tenant sees and who may write them.

6.3. Domain includes

#include <boost/uuid/uuid.hpp>
#include <optional>
#include <string>

6.4. Entity includes

#include <optional>
#include <string>

6.5. Table display

column header
name Name
kind Kind
modified_by Modified By
version Version

6.6. Conventions

Emacs 29.3 (Org mode 9.6.15)