Expand description
SurrealQL’s pure function library.
Every function here answers from its arguments alone. That is what lets the crate sit below the executor: the executor’s generated builtins call downward into these, and the planner can fold a call to one of them at plan time because there is nothing to consult.
Functions that need the engine to answer — a record read, a socket, a script, a user closure — live above this crate, beside the service each one needs. Both halves register into the same function registry, so a query cannot tell where a function came from.
This crate is an internal implementation detail of SurrealDB. Its API is unstable and changes without notice.
Modules§
- args
- array
- bytes
- count
- crypto
- The
crypto::*function family. - duration
- fuel
- The fuel a running program spends, and how a function walking a collection spends it.
- geo
- The
geo::*functions.geo::area,geo::bearing,geo::centroidandgeo::distanceneed thegeofeature; without it they are absent andsurrealdb-coreanswers a call with an error naming the feature. The hash and validity functions need no geometry algorithms. - interval
- The
interval::*functions: construction, the PostgreSQL-style field extractors, and the normalisingjustify_*family. - math
- not
- object
- operate
- SurrealQL’s operators.
- parse
- rand
- set
- string
- time
- time_
kinds - The
time::*functions that acceptdate,timeandtimestampbesidedatetime. - type
- util
- Shared helpers the families reach for.
- vector