rawsql-ts
Version:
High-performance SQL parser and AST analyzer written in TypeScript. Provides fast parsing and advanced transformation capabilities.
20 lines • 899 B
JavaScript
// Represents an INSERT query in SQL.
// Supports single/multi-row VALUES and INSERT ... SELECT.
import { SqlComponent } from "./SqlComponent";
export class InsertQuery extends SqlComponent {
/**
* @param params.insertClause InsertClause instance (target table and columns)
* @param params.selectQuery SELECT/VALUES query (required)
* @param params.returning Optional RETURNING clause
*/
constructor(params) {
var _a, _b, _c;
super();
this.insertClause = params.insertClause;
this.selectQuery = (_a = params.selectQuery) !== null && _a !== void 0 ? _a : null;
this.onConflictClause = (_b = params.onConflict) !== null && _b !== void 0 ? _b : null;
this.returningClause = (_c = params.returning) !== null && _c !== void 0 ? _c : null;
}
}
InsertQuery.kind = Symbol("InsertQuery");
//# sourceMappingURL=InsertQuery.js.map