Expand description
The built-in function registry: names, arities, and identities.
Invariant: a function is recognised here or it does not exist. The binder resolves a name to one of these identities and refuses everything else with “no such function”, so an unknown name fails at prepare time rather than part-way through a scan, and the VM never dispatches on a string.
Arity is checked here too, because SQLite reports “wrong number of arguments to function abs()” from prepare rather than from execution.
Structs§
- External
Function - A function an application registered, as the binder needs to see it.
- Function
Entry - One row of
PRAGMA function_list. - Function
Flags - What a registered function promises about itself.
Enums§
- Aggregate
Func - An aggregate built-in.
- Call
Site - Which context a name is being resolved from.
- Json
Func - A JSON built-in.
- Math
Func - A math built-in.
- Scalar
Func - A scalar built-in.
- Time
Func - A date or time built-in.
- Window
Func - A window function that is not an aggregate.
Constants§
- DETERMINISTIC_
FLAG - The bit
function_listsets for a function that answers the same twice. - INNOCUOUS_
FLAG - The bit
function_listsets for a function a schema may safely call.
Functions§
- aggregate_
arity_ ok - Returns whether an argument count is legal for an aggregate.
- every_
function - Returns every built-in this build has, in the order
function_listreports. - is_
aggregate_ call - Returns whether a folded name may be an aggregate at this argument count.
- lookup_
aggregate - Returns the aggregate a folded name spells.
- lookup_
external - Returns the registration that answers a call, preferring an exact arity.
- lookup_
json - Returns the JSON function a folded name spells.
- lookup_
math - Returns the math function a folded name spells.
- lookup_
scalar - Returns the scalar function a folded name spells.
- lookup_
time - Returns the date or time function a folded name spells.
- lookup_
window - Returns the window function a folded name spells.
- minmax_
aggregate - Returns the aggregate a
min/maxcall resolves to at one argument. - needs_
a_ component - Returns what a name needs, when the name is one this build left out.
- scalar_
arity_ ok - Returns whether an argument count is legal for a scalar function.
- schema_
refusal - Returns why a schema may not call this function, or nothing when it may.