pub fn validate_parameter_name(name: &str) -> Result<(), ExtensionError>Expand description
Validates a macro parameter name.
The rules of validate_function_name, except that the keywords refused
are DUCKDB_RESERVED_KEYWORDS and
DUCKDB_UNREFERENCEABLE_PARAMETER_KEYWORDS — the names a macro body
cannot refer to unquoted — rather than DUCKDB_UNCALLABLE_KEYWORDS. A
parameter named columns or if is fine; one named left is not.
§Errors
Returns ExtensionError describing the first rule violation found.
§Example
use quack_rs::validate::validate_parameter_name;
assert!(validate_parameter_name("threshold").is_ok());
assert!(validate_parameter_name("columns").is_ok());
assert!(validate_parameter_name("left").is_err());
assert!(validate_parameter_name("order").is_err());