ores.refdata.calendar_event

Table of Contents

One row per dated diary entry on a calendar: a central-bank meeting, a scheduled data release, or an open-ended other event. One table for all event kinds – never a table per calendar or per type (settled 2026-08-09, story Decision D1; see Calendar Events). The diary_entry_type column classifies the entry via the open-ended diary_entry_type vocabulary (holiday, central_bank_meeting, data_release, other). Holidays themselves keep their existing machinery (calendar_rules, calendar_exceptions, calendar_date) – the holiday type stays in the vocabulary so the whole classification lives in one place, even though its physical home is elsewhere.

Template/Instance: an event row is an instance; its template is the (calendar, diary_entry_type, name) triple. A worked case: the FOMC's eight regularly scheduled meetings per year are entered as a short run of central_bank_meeting instances on the US.FOMC calendar, transcribed from the Fed's published calendar with source'federalreserve.gov'. Formulaic recurrence generation is deferred; =calendar_rules's grammar can later feed a template link if a consumer needs it.

Flags

Columns

id

UUID uniquely identifying this event row.

Surrogate key – a calendar can have many events, so there is no single natural key column.

calendar_code

The calendar this event belongs to.

References ores_refdata_calendars_tbl.code (soft FK).

std::string("TARGET")

event_date

The specific date this event occurs on.

One event of a given diary_entry_type per (calendar, date) pair.

std::chrono::year_month_day{std::chrono::floor<std::chrono::days>(ctx.past_timepoint())}

diary_entry_type

What kind of entry this is: holiday, central_bank_meeting, data_release, or other (open-ended).

References ores_refdata_diary_entry_types_tbl.code (soft FK).

std::string("holiday")

name

Human-readable event name (e.g. "FOMC meeting").

Part of the row's template triple, (calendar, diary_entry_type, name), not of its unique identity: two instances of one template differ by event_date, not by name.

std::string("Test event")

description

Free-text note about the event (e.g. the decision time, or a link to the statement).

Purely informational; never interpreted by the resolution engine.

std::string("Test event description")

source

Provenance of this row's date, when transcribed from a published source (e.g. federalreserve.gov).

Null for locally-authored events with no external source.

std::string("federalreserve.gov")

SQL

Flags

Foreign keys

calendar_code

diary_entry_type

Insert trigger

Validations

column validation_function

C++

Flags

Repository

Domain includes

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

Entity includes

#include <optional>
#include <string>
#include "sqlgen/Timestamp.hpp"
#include "sqlgen/PrimaryKey.hpp"

Conventions

Table display

column header
calendar_code Calendar
event_date Date
diary_entry_type Diary Entry
name Name
source Source
modified_by Modified By
version Version

Qt

Detail fields

field label widget type is_key is_required immutable placeholder combo_fetch_fn combo_fetch_include combo_allow_blank combo_domain_type combo_display_field combo_code_field combo_tooltip_field combo_sort_field combo_watcher_name combo_label
id Id idEdit line_edit true true   Calendar event id                    
calendar_code Calendar calendarCombo dynamic_combo   true true   fetch_calendars ores.qt/LookupFetcher.hpp   refdata::domain::calendar name code code version calendarEventCalendarWatcher calendars
event_date Date eventDateEdit line_edit   true true YYYY-MM-DD                    
diary_entry_type Diary Entry diaryEntryTypeCombo dynamic_combo   true true   fetch_diary_entry_types ores.qt/LookupFetcher.hpp   refdata::domain::diary_entry_type name code code display_order calendarEventDiaryWatcher diary entry types
name Name nameEdit line_edit   true   Enter event name                    
description Description descriptionEdit text_edit       Optional note                    
source Source sourceEdit line_edit       Provenance, e.g. federalreserve.gov                    

Columns (Qt model)

enum_name field header type width hidden_by_default
CalendarCode calendar_code Calendar string 100  
EventDate event_date Date date 100  
DiaryEntryType diary_entry_type Diary Entry string 140  
Name name Name string auto  
Description description Description string auto true
Source source Source string 120 true
Version version Version int 70  
ModifiedBy modified_by Modified By string auto  

Paste blocks

See also

Emacs 29.3 (Org mode 9.6.15)