rollun-ts-rql
Version:
RQL query object and serializer written in TypeScript
26 lines (25 loc) • 885 B
TypeScript
import AbstractNode from './nodes/AbstractNode';
import AbstractQueryNode from './nodes/AbstractQueryNode';
import Query from './Query';
import Limit from './nodes/Limit';
import Sort from './nodes/Sort';
import Select from './nodes/Select';
import GroupBy from './nodes/GroupBy';
export default class QueryBuilder {
protected query: Query;
constructor();
addNode(node: AbstractNode): this;
getQuery(): Query;
addSelect(select: Select): this;
addQuery(query: AbstractQueryNode): this;
addSort(sort: Sort): this;
addLimit(limit: Limit): this;
addGroupBy(node: GroupBy): this;
static create(): QueryBuilder;
from(node: AbstractNode | Query): this;
fromSelect(select: Select): this;
fromLimit(limit: Limit): this;
fromQuery(query: AbstractQueryNode): this;
fromGroupBy(qroupBy: GroupBy): this;
fromSort(sort: Sort): this;
}