import { DialectBase, DialectKind, IDialectBase } from '.' import { Condition } from '../../condition' import { KeyVal, TableInfo, ValueOf } from '../../types' export interface IDialectOrderByAlias extends IDialectBase { orderBy( order: { [key in keyof Partial]: { [P in keyof Partial>]: 'ASC' | 'DESC' } } & { self?: { [P in keyof M]?: 'ASC' | 'DESC' } } ): IDialectLimitAliasOffset } export interface IDialectWhereAlias extends IDialectBase { where( fields: ( left: { [key in keyof Q]: Condition> } & { self: Condition }, right: { [key in keyof Q]: ValueOf } & { self: M } ) => TResult ): IDialectOrderByAlias & IDialectLimitAliasOffset } export interface IDialectLimitAliasOffset extends IDialectBase { limit(limit: number, offset?: number): IDialectBase } export declare class ReadAliasDialect extends DialectBase implements IDialectOrderByAlias, IDialectWhereAlias, IDialectLimitAliasOffset { constructor( info: TableInfo, sql: string, kind: DialectKind, aliases: KeyVal>, map: any ) limit(limit: number, offset?: number): IDialectBase orderBy( order: { [key in keyof Partial]: { [P in keyof Partial>]: 'ASC' | 'DESC' } } & { self?: { [P in keyof M]?: 'ASC' | 'DESC' } } ): IDialectLimitAliasOffset where( fields: ( left: { [key in keyof Q]: Condition> } & { self: Condition }, right: { [key in keyof Q]: ValueOf } & { self: M } ) => TResult ): IDialectOrderByAlias & IDialectLimitAliasOffset }