snack-query-builder
Version:
Query generator for SQL
29 lines (28 loc) • 1.48 kB
TypeScript
import { Aggregation } from './aggregation.enum';
import { SnackQueryBuilder } from './snack-query-builder';
export declare class ConditionalQueryBuilder<T> {
protected $conditions: string[];
protected $queryBuilder: SnackQueryBuilder;
protected constructor(qb: SnackQueryBuilder);
isNull(agg: Aggregation, field: string): T;
isNotNull(agg: Aggregation, field: string): T;
notEqualThan(agg: Aggregation, field: string, value: any): T;
equalThan(agg: Aggregation, field: string, value: any): T;
greaterThan(agg: Aggregation, field: string, value: any): T;
lowerThan(agg: Aggregation, field: string, value: any): T;
greaterOrEqualThan(agg: Aggregation, field: string, value: any): T;
lowerOrEqualThan(agg: Aggregation, field: string, value: any): T;
between(agg: Aggregation, field: string, value: any, value2: any): T;
startsWith(agg: Aggregation, field: string, value: any): T;
endsWith(agg: Aggregation, field: string, value: any): T;
contains(agg: Aggregation, field: string, value: any): T;
in(agg: Aggregation, field: string, ...values: any[]): T;
openParentheses(agg: Aggregation): T;
closeParentheses(): T;
isToday(agg: Aggregation, field: string): T;
isEmpty(agg: Aggregation, field: string): T;
isNotEmpty(agg: Aggregation, field: string): T;
toString(): string;
protected aggregation(agg: Aggregation): string;
protected checkParenthesesBalanced(input: string): boolean;
}