PageSourceSearch

https://www.mistql.com/assets/js/e5479144.546170ac.js

js mistql.com collected 2026-10-07 02:07:18 UTC 7,956 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmistql_docs=self.webpackChunkmistql_docs||[]).push([[7896],{8453:(e,r,t)=>{t.d(r,{R:()=>i,x:()=>c});var s=t(6540);const d={},n=s.createContext(d);function i(e){const r=s.useContext(n);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:i(e.components),s.createElement(n.Provider,{value:r},e.children)}},8894:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>c,default:()=>x,frontMatter:()=>i,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"reference/types","title":"Types","description":"MistQL has 8 core datatypes, many of which correspond to their JSON counterparts.","source":"@site/versioned_docs/version-0.4.6/reference/types.md","sourceDirName":"reference","slug":"/reference/types","permalink":"/docs/0.4.6/reference/types","draft":false,"unlisted":false,"editUrl":"https://github.com/evinism/mistql/edit/docs/versioned_docs/version-0.4.6/reference/types.md","tags":[],"version":"0.4.6","sidebarPosition":2,"frontMatter":{"sidebar_position":2},"sidebar":"tutorialSidebar","previous":{"title":"Reference Overview","permalink":"/docs/0.4.6/reference/overview"},"next":{"title":"Operators","permalink":"/docs/0.4.6/reference/operators"}}');var d=t(4848),n=t(8453);const i={sidebar_position:2},c="Types",l={},h=[{value:"Type Equality",id:"type-equality",level:2},{value:"Casting Tables",id:"casting-tables",level:2}];function o(e){const r={code:"code",h1:"h1",h2:"h2",header:"header",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(r.header,{children:(0,d.jsx)(r.h1,{id:"types",children:"Types"})}),"\n",(0,d.jsx)(r.p,{children:"MistQL has 8 core datatypes, many of which correspond to their JSON counterparts."}),"\n",(0,d.jsx)(r.p,{children:"External types are types that can be either provided or returned by a MistQL query. All other\ntypes are considered internal and cannot be provided to or returned from MistQL."}),"\n",(0,d.jsxs)(r.table,{children:[(0,d.jsx)(r.thead,{children:(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.th,{children:"Type"}),(0,d.jsx)(r.th,{children:"Primitive"}),(0,d.jsx)(r.th,{children:"External"}),(0,d.jsx)(r.th,{children:"Comment"})]})}),(0,d.jsxs)(r.tbody,{children:[(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"string"}),(0,d.jsx)(r.td,{children:"\u2714"}),(0,d.jsx)(r.td,{children:"\u2714"}),(0,d.jsx)(r.td,{})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"number"}),(0,d.jsx)(r.td,{children:"\u2714"}),(0,d.jsx)(r.td,{children:"\u2714"}),(0,d.jsx)(r.td,{children:"Double-precision float"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"boolean"}),(0,d.jsx)(r.td,{children:"\u2714"}),(0,d.jsx)(r.td,{children:"\u2714"}),(0,d.jsx)(r.td,{})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"null"}),(0,d.jsx)(r.td,{children:"\u2714"}),(0,d.jsx)(r.td,{children:"\u2714"}),(0,d.jsx)(r.td,{})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"object"}),(0,d.jsx)(r.td,{}),(0,d.jsx)(r.td,{children:"\u2714"}),(0,d.jsx)(r.td,{children:"Stringly typed keys"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"array"}),(0,d.jsx)(r.td,{}),(0,d.jsx)(r.td,{children:"\u2714"}),(0,d.jsx)(r.td,{children:"Can be nonhomogenous"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"function"}),(0,d.jsx)(r.td,{}),(0,d.jsx)(r.td,{}),(0,d.jsx)(r.td,{children:"Arity not part of type system"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"regex"}),(0,d.jsx)(r.td,{}),(0,d.jsx)(r.td,{}),(0,d.jsx)(r.td,{})]})]})]}),"\n",(0,d.jsx)(r.h2,{id:"type-equality",children:"Type Equality"}),"\n",(0,d.jsx)(r.p,{children:"Equality in MistQL is strict, meaning that if two variables have different\ndata types, they are considered unequal."}),"\n",(0,d.jsxs)(r.table,{children:[(0,d.jsx)(r.thead,{children:(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.th,{children:"Type"}),(0,d.jsx)(r.th,{children:"Equality"}),(0,d.jsx)(r.th,{children:"Truthiness"})]})}),(0,d.jsxs)(r.tbody,{children:[(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"string"}),(0,d.jsx)(r.td,{children:"exact"}),(0,d.jsxs)(r.td,{children:[(0,d.jsx)(r.code,{children:"false"})," if empty, ",(0,d.jsx)(r.code,{children:"true"})," otherwise"]})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"number"}),(0,d.jsx)(r.td,{children:"IEEE 754 compliant"}),(0,d.jsx)(r.td,{children:"IEEE 754 compliant"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"boolean"}),(0,d.jsx)(r.td,{children:"exact"}),(0,d.jsx)(r.td,{children:"Standard"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"null"}),(0,d.jsx)(r.td,{children:(0,d.jsx)(r.code,{children:"true"})}),(0,d.jsx)(r.td,{children:(0,d.jsx)(r.code,{children:"false"})})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"object"}),(0,d.jsx)(r.td,{children:"Deep equality"}),(0,d.jsxs)(r.td,{children:[(0,d.jsx)(r.code,{children:"false"})," if empty, ",(0,d.jsx)(r.code,{children:"true"})," otherwise"]})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"array"}),(0,d.jsx)(r.td,{children:"Deep equality"}),(0,d.jsxs)(r.td,{children:[(0,d.jsx)(r.code,{children:"false"})," if empty, ",(0,d.jsx)(r.code,{children:"true"})," otherwise"]})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"function"}),(0,d.jsx)(r.td,{children:"Referential"}),(0,d.jsx)(r.td,{children:(0,d.jsx)(r.code,{children:"true"})})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"regex"}),(0,d.jsx)(r.td,{children:"On source and flag"}),(0,d.jsx)(r.td,{children:(0,d.jsx)(r.code,{children:"true"})})]})]})]}),"\n",(0,d.jsx)(r.h2,{id:"casting-tables",children:"Casting Tables"}),"\n",(0,d.jsx)(r.p,{children:"MistQL defines casting from some types to other types"}),"\n",(0,d.jsxs)(r.table,{children:[(0,d.jsx)(r.thead,{children:(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.th,{children:"Type"}),(0,d.jsx)(r.th,{children:"Cast to Float"}),(0,d.jsx)(r.th,{children:"Cast To String"})]})}),(0,d.jsxs)(r.tbody,{children:[(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"string"}),(0,d.jsx)(r.td,{children:"Parsed as float, as per JSON standard."}),(0,d.jsx)(r.td,{children:"noop"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"number"}),(0,d.jsx)(r.td,{children:"noop"}),(0,d.jsxs)(r.td,{children:["As base 10 float. If number is an integer, no trailing digits or decimal. Exponential notation when not within non-inclusive range ",(0,d.jsx)(r.code,{children:"1e-7"})," to ",(0,d.jsx)(r.code,{children:"1e21"})]})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"boolean"}),(0,d.jsxs)(r.td,{children:["1 for ",(0,d.jsx)(r.code,{children:"true"}),", 0 for ",(0,d.jsx)(r.code,{children:"false"})]}),(0,d.jsxs)(r.td,{children:[(0,d.jsx)(r.code,{children:'"true"'})," for ",(0,d.jsx)(r.code,{children:"true"}),", ",(0,d.jsx)(r.code,{children:'"false"'})," for ",(0,d.jsx)(r.code,{children:"false"})]})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"null"}),(0,d.jsx)(r.td,{children:"0"}),(0,d.jsx)(r.td,{children:(0,d.jsx)(r.code,{children:'"null"'})})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"object"}),(0,d.jsx)(r.td,{children:"Throws error"}
1),(0,d.jsx)(r.td,{children:"Concise JSON, recursively converting items"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"array"}),(0,d.jsx)(r.td,{children:"Throws error"}),(0,d.jsx)(r.td,{children:"Concise JSON, recursively converting items"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"function"}),(0,d.jsx)(r.td,{children:"Throws error"}),(0,d.jsx)(r.td,{children:"Throws error"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:"regex"}),(0,d.jsx)(r.td,{children:"Throws error"}),(0,d.jsx)(r.td,{children:"Throws error"})]})]})]})]})}function x(e={}){const{wrapper:r}={...(0,n.R)(),...e.components};return r?(0,d.jsx)(r,{...e,children:(0,d.jsx)(o,{...e})}):o(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.