rawsql-ts
Version:
[beta]High-performance SQL parser and AST analyzer written in TypeScript. Provides fast parsing and advanced transformation capabilities.
23 lines (22 loc) • 894 B
TypeScript
import { SqlComponent } from "./SqlComponent";
import { SelectQuery } from "./SelectQuery";
import { InsertClause, ReturningClause, WithClause } from "./Clause";
export declare class InsertQuery extends SqlComponent {
static kind: symbol;
withClause: WithClause | null;
insertClause: InsertClause;
selectQuery: SelectQuery | null;
returningClause: ReturningClause | null;
/**
* @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: {
withClause?: WithClause | null;
insertClause: InsertClause;
selectQuery?: SelectQuery | null;
returning?: ReturningClause | null;
});
}