import Command from '../Command'; export declare abstract class SelectBase extends Command { constructor(table: string); toSQL(): string; _add(...columns: string[]): this; add(...columns: string[]): this; _where(sql: string, ...args: any[]): this; /** Add a WHERE statement to be AND-merged with any other WHERE statements. sql Any SQL expression that evaluates to a truth value. It may contain multiple "?" placeholders -- as many ?'s as there are items in the args array. args SQL parameters to accompany the given SQL expression [optional] See also: Select#_whereEqual(...) */ where(sql: string, ...args: any[]): this; _whereEqual(hash: { [index: string]: any; }): this; /** This functions just like calling where() several times with simple ('column = ?', value) pairs. Be careful with this one! only the hash's values will be escaped, so SQL injection is totally possible with the keys. */ whereEqual(hash: { [index: string]: any; }): this; _whereIn(column: string, list: any[]): this; /** Though ugly, apparently this is just how it works: https://github.com/brianc/node-postgres/issues/431 Ends up with something like 'x IN($arg1, $arg2, $arg3)' and then {arg1: 'a', arg2: 'b', arg3: 'c'} in the properties Thus, each item in list is escaped (but column is not) An easier way is to use something like x = ANY($someArray) */ whereIn(column: string, list: any[]): this; _groupBy(...columns: string[]): this; /** Vulnerable to SQL injection! */ groupBy(...columns: string[]): this; _orderBy(...columns: string[]): this; /** Vulnerable to SQL injection! */ orderBy(...columns: string[]): this; _offset(offset: number): this; offset(offset: number): this; _limit(limit: number): this; limit(limit: number): this; } export default class Select extends SelectBase { } export declare class SelectOne extends SelectBase { constructor(table: string); }