Renderingen-US

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#

declaration

Examples#

radix/corpus/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