列
Translation status: 简体中文 reader-locale proof. Term names and code fences follow the zh-Hans pack; supporting prose may still be English.
Declares one typed column inside a schema body (experimental).
Aliases: column
Syntax: 列 <type> <name> (: <sourceName>)?
Category#
declaration
Related#
Examples#
radix/corpus/columna/columna.fab (canonical · keyword)#
Declares one typed column inside a schema body (experimental).
# =============================================================================
# 列 — Declares one typed column inside a 架构 body (experimental)
# =============================================================================
#
# What this teaches:
# • Column rows — each `列` takes a type and a public name, one row per line.
# • Source alias — `: sourceName` maps the public column to a differently named source column.
# • Nullable columns — a column that may be absent is typed `T ∪ none`.
#
# Common mistakes:
# • Putting two columns on one line — each `列` row starts on its own line.
#
# See also: 架构
# =============================================================================
# 列 — typed 架构 column
#
# GRAMMAR:
# schemaColumn :← '列' typeAnnotation IDENTIFIER (':' IDENTIFIER)?
#
# EXPECTED OUTPUT:
# columns declared
架构 Persona {
column string 名称
column int aetas : years
column string ∪ none electronica : email
}
main {
print "columns declared"
}Expected output:
columns declared