Documentation
¶
Overview ¶
Package chsql is the ClickHouse SQL lexer that the query guard and the SQL wrappers share. It follows the token rules of the ClickHouse 26.3 lexer (src/Parsers/Lexer.cpp) for every state that can hide a quote, a comment or a keyword: quoted strings and identifiers with backslash escapes and doubled quotes, heredocs, Unicode quotes, nested block comments, line comments, UTF-8 whitespace and numbers with an exponent sign. Text that the server lexer turns into an error token fails Tokenize, so no caller scans past it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TrimTerminalSemicolon ¶
TrimTerminalSemicolon strips one terminal ';' and the whitespace around it, outside quotes and comments. It refuses a second statement and any text, a comment included, after the semicolon.