Skip to main content

safe_data_product_name

Function safe_data_product_name 

Source
fn safe_data_product_name(name: &str) -> Result<String, McpRequestError>
Expand description

Parses a data product name and returns it safely quoted for SQL interpolation.

Uses the SQL parser to validate the name as an UnresolvedItemName, then formats it with FormatMode::Stable so every identifier part is double-quoted with proper escaping. This prevents SQL injection regardless of the input.