UNPKG

queryforge

Version:

A powerful, type-safe SQL query builder for Node.js with support for MySQL, PostgreSQL, and SQLite. Features fluent API, transaction management, and connection pooling.

18 lines (17 loc) 525 B
export type DatabaseType = 'mysql' | 'postgresql' | 'sqlite'; export type WhereCondition = { column: string; operator: '=' | '>' | '<' | '>=' | '<=' | 'LIKE' | 'IN' | 'NOT IN' | 'IS NULL' | 'IS NOT NULL'; value?: any; logic: 'AND' | 'OR'; }; export type JoinCondition = { table: string; type: 'INNER' | 'LEFT' | 'RIGHT' | 'FULL'; on: { leftColumn: string; operator: '=' | '>' | '<' | '>=' | '<='; rightColumn: string; }; }; export type OrderDirection = 'ASC' | 'DESC';