Skip to main content

Comments

CSDB stores comments as structured metadata instead of relying on YAML comments. This allows comments to survive parsing, validation, and round-tripping.

Database Comments

Database comments live in the csdb section.

comments:
database: Payroll database.

Table Comments

Table comments live in the table schema section.

comments:
table: Work session records.

Column Comments

comments:
columns:
end_time: Null means the session is still open.

Constraint Comments

comments:
constraints:
end_after_start: End time must not be earlier than start time.

Index Comments

comments:
indexes:
sessions_worker_id_idx: Speeds up worker-to-session lookups.

Relationship Comments

comments:
foreign_keys:
sessions_worker_fk: Each session belongs to one worker.

Computed Field Comments

comments:
computed_fields:
duration: Derived from end_time minus start_time.

Rules

  • Comment keys must reference existing schema items.
  • Comments may be plain text or Markdown text.
  • Comments must not change validation semantics.