Tokenize SQL into a token stream.
The SQL string to tokenize
The dialect to use for tokenization
The token stream
const result = tokenize("SELECT a, b FROM t", Dialect.PostgreSQL);if (result.success) { for (const token of result.tokens!) { console.log(token.tokenType, token.text, token.span); }} Copy
const result = tokenize("SELECT a, b FROM t", Dialect.PostgreSQL);if (result.success) { for (const token of result.tokens!) { console.log(token.tokenType, token.text, token.span); }}
Tokenize SQL into a token stream.