UNPKG

@kuindji/sql-type-parser

Version:
25 lines 1.18 kB
/** * INSERT Query Module * * This module provides type-level parsing, validation, and schema matching * for SQL INSERT queries. * * @example * ```typescript * import type { ParseInsertSQL, InsertResult, ValidateInsertSQL } from './insert' * * // Parse INSERT query * type AST = ParseInsertSQL<"INSERT INTO users (id, name) VALUES (1, 'John')"> * * // Get result type (for RETURNING clause) * type Result = InsertResult<"INSERT INTO users (id) VALUES (1) RETURNING *", Schema> * * // Validate query * type Valid = ValidateInsertSQL<"INSERT INTO users (id) VALUES (1)", Schema> * ``` */ export type { ParseInsertSQL } from "./parser.js"; export type { SQLInsertQuery, InsertClause, InsertColumnList, InsertColumnRef, InsertValue, InsertValueRow, InsertValuesClause, InsertSelectClause, InsertSource, ReturningClause, OnConflictClause, ConflictTarget, ConflictAction, ConflictUpdateSet, } from "./ast.js"; export type { MatchInsertQuery, InsertResult, InsertInput, ValidateInsertResult, } from "./matcher.js"; export type { ValidateInsertSQL, ValidateInsertOptions, IsValidInsert, GetInsertTableColumns, } from "./validator.js"; //# sourceMappingURL=index.d.ts.map