Documentation
¶
Overview ¶
Package sqlscan tokenizes raw SQL fragments into verbatim text and placeholders. It knows string literals, quoted identifiers, comments and PostgreSQL dollar quotes per dialect, and imports nothing from the momo root package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tok ¶
Tok is one token of a scanned fragment.
func Scan ¶
Scan splits sql into verbatim text and placeholders. A '?' or '@name' inside a string literal, quoted identifier, comment or PostgreSQL dollar-quoted string is text, as are the PostgreSQL operators ?| ?& @? @@ and @>. "??" yields a literal '?'. A native $n outside those is a Dollar token on every dialect, so the caller can bind it on PostgreSQL and reject it elsewhere.