Skip to main content
Version: 0.4.10


MistQL has 8 core datatypes, many of which correspond to their JSON counterparts.

External types are types that can be either provided or returned by a MistQL query. All other types are considered internal and cannot be provided to or returned from MistQL.

stringโœ”โœ”Series of unicode codepoints
numberโœ”โœ”Doubles, without NaN or infinity
objectโœ”Stringly typed keys
arrayโœ”Can be nonhomogenous
functionArity not part of type system

Type Equality#

Equality in MistQL is strict, meaning that if two variables have different data types, they are considered unequal.

stringexactfalse if empty, true otherwise
numberIEEE 754 compliantIEEE 754 compliant
objectDeep equalityfalse if empty, true otherwise
arrayDeep equalityfalse if empty, true otherwise
regexOn source and flagtrue

Casting Tables#

MistQL defines casting from some types to other types

TypeCast to FloatCast To String
stringParsed as float, as per JSON standard.noop
numbernoopAs base 10 float. If number is an integer, no trailing digits or decimal. Exponential notation when not within non-inclusive range 1e-7 to 1e21
boolean1 for true, 0 for false"true" for true, "false" for false
objectThrows errorConcise JSON, recursively converting items
arrayThrows errorConcise JSON, recursively converting items
functionThrows errorThrows error
regexThrows errorThrows error