Expand description
TBD: Currently, sql::func
handles matching arguments to their respective
built-in functions (for most built-in functions, at least).
Macrosยง
- builtins ๐Constructs builtin function map.
- catalog_
name_ ๐only Functions using this macro should be transformed/planned away before reaching function selection code, but still need to be present in the catalog during planning. - impl_
def ๐ - params ๐Provides shorthand for converting
Vec<ScalarType>
intoVec<ParamType>
. - privilege_
fn ๐Generates an (OID, OID, TEXT) SQL implementation for has_X_privilege style functions.
Structsยง
- Tracks candidate implementations.
- Describes a single functionโs implementation.
- Describes how each implementation should be represented in the catalog.
- Builds an expression that evaluates a scalar function on the provided input expressions.
- Polymorphic
Solution ๐Represents a solution to a set of polymorphic constraints, expressed as theparams
of a function and the user-suppliedargs
.
Enumsยง
- A specifier for a function or an operator.
- Describes possible types of function parameters.
- Describes parameter types.
Staticsยง
- Correlates an operator with all of its implementations.
- Correlates a built-in function name to its implementations.
Functionsยง
- array_
to_ ๐string - coerce_
args_ ๐to_ types - current_
settings ๐ - digest ๐
- find_
match ๐Finds an exact match based on the arguments, or, if no exact match, finds the best match available. Patterned after PostgreSQLโs type conversion matching algorithm. - Resolves the operator to a set of function implementations.
- Selects the best implementation given the provided
args
using a process similar to PostgreSQLโs parser, and returns theScalarExpr
to invoke that function. - Backing implementation for sql_impl_func and sql_impl_cast. See those functions for details.
- sql_
impl_ ๐func - sql_
impl_ ๐table_ func