- All Known Implementing Classes:
ArrayType,ScalarType,StructType
The type of a value in relix — a scalar, a nested struct, or an array.
This is the root of the (small) type system that lets relix represent and query nested data natively. The three shapes are:
ScalarType—NUMBER,STRING,BOOLEAN, andANY.ANYdoubles as the dynamic document type for schema-on-read sources: a value of typeANYmay hold a scalar, a struct, or an array, resolved at runtime.StructType— an ordered set of named, typed fields (a row is a struct; aSchemais, conceptually, the top-level struct).ArrayType— an ordered collection of elements of a single type.
The flat relational model is the special case where every field is a
ScalarType. The hierarchy is sealed, so consumers can pattern-match it
exhaustively.
-
Method Summary
-
Method Details
-
display
String display()A short, human-readable, structurally-recursive description of this type — e.g."number","struct{id: number, tags: array<string>}","array<number>".- Returns:
- the display string; never null or blank
-
code
String code()A compact, structurally-recursive type code used in the IR report and in machine-readable (JSON) output. Scalars are one letter (Number,String,Boolean,?=any); an array is[elem]and a struct is{field:code,…}— e.g.[N],{id:N,tags:[S]}.- Returns:
- the compact type code; never null or blank
-