Module functions

Module functions 

Source
Expand description

Smart function completions for SQL.

This module provides function completion items with full signatures, return types, and context-aware filtering based on clause type.

§Performance

Function completion items are pre-computed and cached at startup using LazyLock. The cache contains one CompletionItem per SQL function (450+). On each completion request, we filter and clone items from the cache, avoiding the cost of re-computing signatures and formatting strings.

Structs§

FunctionCompletionContext
Context for function completion filtering and scoring.

Functions§

function_return_type_display
Returns the return type display string for a function, if known.
function_to_completion_item
Converts a function signature to a completion item.
get_function_completions
Gets function completions filtered and scored by context.
is_aggregate
Returns true if the function is an aggregate function.
is_window
Returns true if the function is a window function.