渲染zh-Hans

架构

Translation status: 简体中文 reader-locale proof. Term names and code fences follow the zh-Hans pack; supporting prose may still be English.

Declares an application-owned relational heading (experimental).

Aliases: relational heading

Syntax: 架构 <Name> { 列 <type> <name> ... }

Category#

declaration

Examples#

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

Declares an application-owned relational heading (experimental).

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

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

架构 Persona {
    column string 名称
    column int aetas
}

main {
    print "schema declared"
}

Expected output:

schema declared