Skip to main content

Crate surrealdb_runtime

Crate surrealdb_runtime 

Source
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::centroid and geo::distance need the geo feature; without it they are absent and surrealdb-core answers 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 normalising justify_* family.
math
not
object
operate
SurrealQL’s operators.
parse
rand
set
string
time
time_kinds
The time::* functions that accept date, time and timestamp beside datetime.
type
util
Shared helpers the families reach for.
vector