neosqlite.sql_utils module¶
- neosqlite.sql_utils.quote_identifier(identifier: str) str[source]¶
Safely quote a SQL identifier (like a table or column name). Only allows safe identifiers matching ^[A-Za-z_][A-Za-z0-9_]*$. For table names, use quote_table_name() instead.
- Parameters:
identifier (str) – The identifier to quote.
- Returns:
The identifier (validated to be safe).
- Return type:
str
- Raises:
ValueError – If the identifier contains unsafe characters.