rawsql-ts
Version:
[beta]High-performance SQL parser and AST analyzer written in TypeScript. Provides fast parsing and advanced transformation capabilities.
18 lines (17 loc) • 620 B
TypeScript
import { SourceExpression } from "../models/Clause";
import { Lexeme } from "../models/Lexeme";
export declare class SourceExpressionParser {
/**
* Parse SQL string to SourceExpression (e.g. "table", "table as t", "schema.table t")
*/
static parse(query: string): SourceExpression;
static parseTableSourceFromLexemes(lexemes: Lexeme[], index: number): {
value: SourceExpression;
newIndex: number;
};
static parseFromLexeme(lexemes: Lexeme[], index: number): {
value: SourceExpression;
newIndex: number;
};
private static isTokenTypeAliasCandidate;
}