UNPKG

rawsql-ts

Version:

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

17 lines 757 B
import { UpdateClause } from "../models/Clause"; import { SourceExpressionParser } from "./SourceExpressionParser"; /** * Parses the target of an UPDATE statement (table or source expression with optional alias). */ export class UpdateClauseParser { /** * Parse from lexeme array (returns UpdateClause and new index) * This method parses a table or a table with alias using SourceExpressionParser. */ static parseFromLexeme(lexemes, index) { // Parse table or table with alias using SourceExpressionParser const result = SourceExpressionParser.parseFromLexeme(lexemes, index); return { value: new UpdateClause(result.value), newIndex: result.newIndex }; } } //# sourceMappingURL=UpdateClauseParser.js.map