pub struct SchemaOnlyFunction { /* private fields */ }Expand description
A function that carries a schema but has no native implementation.
This is used to represent functions declared in inline catalogs that the server sends as part of capabilities negotiation. The client knows the function exists (and its declared return type) but cannot execute it.
Implementations§
Source§impl SchemaOnlyFunction
impl SchemaOnlyFunction
Sourcepub fn new(name: String, return_type: ReturnType) -> Self
pub fn new(name: String, return_type: ReturnType) -> Self
Create a new schema-only function from a runtime String name.
The name is leaked via Box::leak to produce the &'static str
required by FunctionImplementation::name. This leak is bounded:
inline catalogs are registered exactly once at startup (via
MessageProcessor::register_inline_catalog)
and never unloaded for the lifetime of the processor, so the leaked
memory is proportional to the (small, fixed) set of inline functions a
client advertises — it does not grow unboundedly.