catalog

package
v0.2.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package catalog is the storefront's reference data: the tables whose rows the application reads and never writes, declared beside the tables themselves.

The module compiles it and nothing imports it: what reads it is Ptah, which parses the annotations out of the source. It lives under demo/ rather than testdata/ because a reader publishes it by typing the path, and the path is part of what the demonstration shows.

The declaration on countries is gone; the table and its rows are not.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Country

type Country struct {
	//ptah:schema:field name="code" type="VARCHAR(2)" primary="true"
	Code string

	//ptah:schema:field name="name" type="VARCHAR(64)" not_null="true"
	Name string

	//ptah:schema:field name="region_code" type="VARCHAR(8)" not_null="true" foreign="regions(code)" foreign_key_name="fk_countries_region"
	RegionCode string
}

This revision drops the row declaration on countries and keeps the table. Ending management is not deleting rows: what the operator stops doing is reconciling them, and what it leaves behind is exactly what was there.

type Region

type Region struct {
	//ptah:schema:field name="code" type="VARCHAR(8)" primary="true"
	Code string

	//ptah:schema:field name="name" type="VARCHAR(64)" not_null="true"
	Name string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL