UNPKG

rawsql-ts

Version:

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

25 lines 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InsertQuery = void 0; // Represents an INSERT query in SQL. // Supports single/multi-row VALUES and INSERT ... SELECT. const SqlComponent_1 = require("./SqlComponent"); class InsertQuery extends SqlComponent_1.SqlComponent { /** * @param params.insertClause InsertClause instance (target table and columns) * @param params.selectQuery SELECT/VALUES query (required) * @param params.withClause Optional WITH clause scoped to the INSERT statement * @param params.returning Optional RETURNING clause */ constructor(params) { var _a, _b, _c; super(); this.withClause = (_a = params.withClause) !== null && _a !== void 0 ? _a : null; this.insertClause = params.insertClause; this.selectQuery = (_b = params.selectQuery) !== null && _b !== void 0 ? _b : null; this.returningClause = (_c = params.returning) !== null && _c !== void 0 ? _c : null; } } exports.InsertQuery = InsertQuery; InsertQuery.kind = Symbol("InsertQuery"); //# sourceMappingURL=InsertQuery.js.map