nano-queries
Version:
Simple and powerful database-agnostic query builder (SQL & NoSQL)
17 lines (16 loc) • 683 B
TypeScript
import { Query } from '../core/Query';
import { IQuery, QueryParameter, QuerySegment, RawQueryParameter } from '../types';
export type SelectStatementOptions = QueryParameter[];
export declare class SelectStatement extends Query implements IQuery {
private readonly _select;
private readonly _from;
private readonly _limit;
private readonly _where;
constructor(...select: SelectStatementOptions);
select(...params: QueryParameter[]): this;
from(...params: QueryParameter[]): this;
offset(offset?: number): this;
limit(limit?: number): this;
where(param: RawQueryParameter, condition?: 'and' | 'or'): this;
getSegments(): QuerySegment[];
}