import { Expression, Select } from "squel"; import { IsotopeOptions } from ".."; /** * Isotope SQL query builder * * Under the hood the squel query builder is used, but methods are proxied to * accommodate for the limited feature set supported by SimpleDB. * * @template T - Data type */ export declare class IsotopeSelect { protected options: IsotopeOptions; protected query: Select; /** * Initialize a SQL query expression builder * * @param options - Options * @param query - Squel instance */ constructor(options: IsotopeOptions, query?: Select); /** * Add WHERE clause * * Monkey-patch where() method if strings are formatted as JSON * * @param condition - Condition expression * @param args - Additional arguments for parameter substitution * * @return Instance */ where(condition: string | Expression, ...args: any[]): this; /** * Add ORDER BY clause * * @param field - Sort field * @param direction - Sort direction * * @return Instance */ order(field: string, direction?: "asc" | "desc"): this; /** * Add LIMIT clause * * @param count - Number of records * * @return Instance */ limit(count: number): this; /** * Create a string representation of the SQL query * * @return SQL query string */ toString(): string; }