Skip to content
Open Saka

Standard library

The standard library is the modules that come with SakaQL. Every module can use the prelude’s names without a prefix; write another module’s names after its name, as in str::length.

Module Contents
prelude The names that every module can use without a prefix: the basic Sets, such as num and str, functions of whole Bags, such as count and sum, character patterns, and the other modules of the standard library.
color Colors as numbers that pack red, green, and blue from 0 to 255 as r * 65536 + g * 256 + b, every one opaque, and the named colors of CSS Color 4.
num Numbers: constants, math, tests, integer ranges, and conversion to and from text, the same in every locale.
pos Positions that keep items in a chosen order, such as the rows of a list: a new position comes from its neighbors, and existing positions never change.
rand Random numbers for simulations, games, and similar uses.
re Search, split, and replace text with patterns.
reflect The database’s own declarations, such as its roles, properties, and Flows, as read-only roles to query.
str Text: length, search, slices, case, padding, trimming, and splitting, with literal strings rather than patterns.
uuid Universally unique identifiers (UUIDs): their versions and their text.
uuid::v7 Time-ordered UUIDs (version 7): make new ones and read the time they hold.