Files
Basalt2/node_modules/shiki/samples/tasl.sample
Robert Jelic 31787b0e9b Fix
2025-02-16 18:04:24 +01:00

26 lines
510 B
Plaintext

# This is a tasl schema!
namespace s http://schema.org/
# classes are like tables, except they
# can be arbitrary algebraic data types,
# not just columns of primitives.
class s:Person :: {
s:name -> string
s:email -> ? uri
s:spouse -> ? * s:Person
s:gender -> [
s:Male
s:Female
s:value <- string
]
}
# references are a primitive type that
# point to other classes in the schema,
# just like foreign keys.
class s:Book :: {
s:name -> string
s:isbn -> uri
s:author -> * s:Person
}