rawsql-ts
Version:
High-performance SQL parser and AST analyzer written in TypeScript. Provides fast parsing and advanced transformation capabilities.
23 lines (22 loc) • 820 B
TypeScript
import { CommonTable } from "../models/Clause";
import { Lexeme } from "../models/Lexeme";
export declare class CommonTableParser {
static parse(query: string): CommonTable;
static parseFromLexeme(lexemes: Lexeme[], index: number): {
value: CommonTable;
newIndex: number;
trailingComments: string[] | null;
};
private static collectPrecedingComments;
private static collectWithTokenComments;
private static collectTokenComments;
private static addPositionedComment;
private static parseAsKeyword;
private static parseMaterializedFlag;
private static parseInnerQuery;
private static parseCteQuery;
private static applyCteHeaderComments;
private static isSelectQuery;
private static getCommandAfterWith;
private static extractComments;
}