Skip to main content

first_sql_word

Function first_sql_word 

Source
pub fn first_sql_word(sql: &str) -> Option<&str>
Expand description

Return the first SQL keyword/word in sql, skipping leading whitespace, line comments, and block comments. Returns None if the input is empty or contains only whitespace/comments.

The returned slice is a sub-slice of sql in its original case.