import { ColumnRef } from "../../core/column-ref"; import { ExpressionOrColumn, ParamType } from "../../core/utils"; import { LambdaExpression } from "lambda-expression"; import { ProjectionBuilder } from "../projection-builder"; import { OrderBy } from "../../core/enums/order-by"; import { UnionType } from "../../core/union-type"; import { QueryCompiled } from "../../core/query-compiled"; import { WhereBuilder } from "../where-builder"; import { SqlCompilable } from "../sql-compilable"; export interface QueryBuilderBaseContract> { alias: string; tablename: string; clone(): TQuery; ref(expression: ExpressionOrColumn): ColumnRef; hasAlias(alias: string): boolean; getAlias(tKey: (new () => any) | string): string; from(query: QueryCompiled[] | SqlCompilable): TQuery; createWhere(): WhereBuilder; where(whereCallback: (where: WhereBuilder) => void): TQuery; whereExp(expression: LambdaExpression): TQuery; projection(projectionCallback: (projection: ProjectionBuilder) => void): TQuery; select(...expressions: Array>): TQuery; orderBy(expression: ExpressionOrColumn, order?: OrderBy): TQuery; asc(expression: ExpressionOrColumn): TQuery; desc(expression: ExpressionOrColumn): TQuery; groupBy(expression: ExpressionOrColumn): TQuery; union(query: QueryCompiled[] | SqlCompilable, type?: UnionType): TQuery; unionAll(query: QueryCompiled[] | SqlCompilable): TQuery; /** * ignore query filters in query * use in the beginning of a query so that the posterior joins are applied */ ignoreQueryFilters(): TQuery; setParamsQueryFilter(params: { [s: string]: ParamType; }): TQuery; compileTable(): string; }