Skip to main content

is_valid_sql_identifier

Function is_valid_sql_identifier 

Source
pub fn is_valid_sql_identifier(name: &str) -> bool
Expand description

Check whether name is a strict SQL identifier matching ^[A-Za-z_][A-Za-z0-9_]*$ (must be non-empty).

Identifiers interpolated into SQL that cannot be parameterized (savepoints, schema names, text-search configs) should be validated against this whitelist before use.