ores.variability.system_setting

Table of Contents

A system setting is a named configuration value the platform reads while it runs, such as system.bootstrap_mode or onboarding.party. The value is stored as text and data_type says how to read it, because one table carries every type rather than one table per type.

A setting is scoped to a tenant and a party. Tenant-wide settings live under the tenant's system party, and a party-specific setting such as onboarding.party lives under that party's own id. The pair is what makes a setting name unique: the same name may hold different values for two parties in one tenant, so a caller always reads within a scope.

The table is bitemporal like every other entity, so a setting's history is kept and a configuration change is auditable and reversible. The name is the natural key callers use; id is the surrogate the store keeps for foreign-key stability.

1. Flags

2. Columns

2.1. id

Surrogate identifier for the setting row.

2.2. name

Dotted setting name, for example system.bootstrap_mode. Callers ask for a setting by this name, within a tenant and party scope.

std::string("system.") + std::string(faker::word::noun())

2.3. party_id

Party that scopes this setting. Tenant-wide settings use the tenant's system party; a party-specific setting uses that party's own id. Together with name it makes one setting distinguishable from another of the same name.

A caller writing a tenant-wide setting states the nil uuid, because it has no party to name, and the database resolves the tenant's system party for it before the row lands. The column is never null, so the composite unique index separates one party's rows from another's.

2.4. value

The setting's value, always stored as text. data_type says how to read it.

std::string("true")

2.5. data_type

How to read value: boolean, integer, string or json. Stored beside the value because one table carries every type.

std::string("boolean")

2.6. description

What the setting controls, for an operator reading the list.

std::string("Setting that controls ") + std::string(faker::word::noun())

3. SQL

3.1. Flags

4. C++

4.1. Flags

4.2. Repository

4.3. Domain includes

#include <string>

4.4. Conventions

4.5. Table display

column header
name Name
value Value
data_type Type
description Description
modified_by Modified By
recorded_at Recorded At

4.6. Presentation

Callers address a setting by its name, not by the surrogate id the store keeps behind it, so every operation carries the name.

5. See also

Emacs 29.3 (Org mode 9.6.15)