export interface IWhere { key: string; value: any; operator?: string; condition?: string; isStringFormat?: boolean; } export interface IWhereConfig { operator?: string; condition?: string; } export interface IJoin { type?: string; table: string; key: string; operation?: string; value: string; } export default interface IQueryBuilder { getQuery(): string; raw(query: string): Promise; parseResultQuery(result: any): any[]; table(tableName: string): IQueryBuilder; get(): Promise[]>; first(): Promise>; select(...args: string[]): IQueryBuilder; distinct(status: boolean): IQueryBuilder; whereConfig(config: IWhereConfig): IQueryBuilder; where(...args: IWhere[]): IQueryBuilder; whereSimple(wheres: Record): IQueryBuilder; returning(...args: string[]): IQueryBuilder; with(name: string, query: string, recursive?: boolean): IQueryBuilder; groupBy(...args: string[]): IQueryBuilder; orderBy(...args: string[]): IQueryBuilder; offset(count: number): IQueryBuilder; limit(count: number): IQueryBuilder; skip(count: number): IQueryBuilder; take(count: number): IQueryBuilder; join(table: string, key: string, operation: string, keyB: string, type?: string): IQueryBuilder; innerJoin(table: string, key: string, operation: string, value: string): IQueryBuilder; leftJoin(table: string, key: string, operation: string, value: string): IQueryBuilder; rightJoin(table: string, key: string, operation: string, value: string): IQueryBuilder; fullJoin(table: string, key: string, operation: string, value: string): IQueryBuilder; insert(items: (Record | Record[]), options?: Record): Promise; update(items: Record): Promise; delete(): Promise; logger(): any; }