UNPKG

json-to-sql-parser

Version:

A TypeScript library that converts JSON-based query specifications into safe SQL queries

17 lines 724 B
import { Dialect } from "../constants/dialects"; import type { SelectQuery } from "../schemas"; import type { Config, ConfigWithForeignKeys } from "../types"; type ParsedSelectQuery = { select: string[]; from: string; where?: string; joins: string[]; orderBy: string[]; limit?: number; offset?: number; }; export declare function parseSelectQuery(selectQuery: SelectQuery, baseConfig: Config | ConfigWithForeignKeys): ParsedSelectQuery; export declare function compileSelectQuery(query: ParsedSelectQuery, dialect: Dialect): string; export declare function buildSelectQuery(selectQuery: SelectQuery, config: Config | ConfigWithForeignKeys): string; export {}; //# sourceMappingURL=select.d.ts.map