Types
SuperSQL has a comprehensive types system that adheres to the super-structured data model comprising primitive types, complex types, sum types, named types, the null type, and first-class errors and types.
The syntax of individual literal values as well as types follows the SUP format in that any legal SUP value is also a valid SuperSQL literal.
Likewise, any SUP type is also valid type syntax, which may be used in cast expressions or type declarations.
Note that the type decorators in SUP utilize a double colon (::)
syntax that is compatible with cast expressions.
Arguments to functions and operators are all dynamically typed, yet certain functions expect certain specific types or classes of data types. The following names for these categories of types are used in throughout the documentation:
any- any SuperSQL data typefloat- any floating point typeint- any signed or unsigned integer typenumber- eitherfloatorintrecord- any record typeset- any set typemap- any map typefunction- a function reference of lambda expression
To be clear, none of these categorical names are actual types and may not be used in a SuperSQL query. They are simply used to document expected type categories.
Note
In a future version of SuperSQL, user-defined function and operator declarations will include optional type signatures and these names representing type categories may be included in the language for that purpose.