pub fn check_identifier(raw_name: &str) -> Result<String, SqlError>Expand description
Validate a raw identifier token extracted from SQL.
- If
raw_nameis surrounded by double-quotes (standard SQL quoting), the quotes are stripped and the inner text is returned unchanged asOk(inner)— the user has opted in to the reserved word. - Otherwise, the token is normalised to upper case and compared against
RESERVED_KEYWORDS. A match returnsErr(SqlError::ReservedIdentifier { .. })with an actionable hint. - A clean identifier is returned as
Ok(name.to_lowercase())to match the existingparse_col_tokenbehaviour.