Renderingen-US

Experimental through version 1. Version 0 was alpha. This is the first language release: the interface is relatively stable, not frozen. Nothing is promised stable until version 2.

schema

Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.

Declares an application-owned relational heading (experimental).

Aliases: relational heading

Syntax: schema <Name> { column <type> <name> ... }

Category#

type

Examples#

radix/corpus/reference/keyword/schema/schema.fab (canonical · keyword)#

Declares an application-owned relational heading (experimental).

# =============================================================================
# schema — Declares an application-owned relational heading (experimental)
# =============================================================================
#
# What this teaches:
#   • Relational headings — `schema Name { ... }` names the columns an application reads from a database result.
#   • Declaration only — a schema carries column metadata, not a runtime value, so a program that declares one still runs unchanged.
#
# Common mistakes:
#   • Giving a schema methods or `implements` — a schema is a heading, not a class; both are rejected at parse time.
#
# See also: column, class
# =============================================================================

# schema — relational heading declaration
#
# GRAMMAR:
#   schemaDecl :← 'schema' IDENTIFIER '{' (schemaColumn (NEWLINE schemaColumn)*)? '}'
#
# EXPECTED OUTPUT:
#   schema declared

schema Persona {
    column string name
    column int aetas
}

main {
    print "schema declared"
}

Expected output:

schema declared