UNPKG

rawsql-ts

Version:

[beta]High-performance SQL parser and AST analyzer written in TypeScript. Provides fast parsing and advanced transformation capabilities.

26 lines (25 loc) 573 B
export declare enum TokenType { None = 0, Literal = 1, Operator = 2, OpenParen = 4, CloseParen = 8, Comma = 16, Dot = 32, Identifier = 64, Command = 128,// select, from, where as, on, array etc Parameter = 256, OpenBracket = 512, CloseBracket = 1024, Function = 2048,// next token is open paren StringSpecifier = 4096,// next token is string literal Type = 8192 } /** * Represents a lexical token in SQL parsing */ export interface Lexeme { type: number; value: string; comments: string[] | null; }