import { IContainsTable, ISqlAdapter } from "@trong-orm/sql"; import { IBaseToken, TokenType } from "../types"; import { IConditionValue } from "./binary"; import { ISelectStatement } from "./statements/select"; declare type IJoinOperator = { joinType: "CROSS"; } | ({ isNatural: boolean; } & ({ joinType: "LEFT" | "RIGHT" | "FULL"; isOuter: boolean; } | { joinType: "INNER"; } | {})); export interface IJoinExpr extends IBaseToken { _operator?: IJoinOperator; _toJoin: IContainsTable | IBaseToken | { toSelect: IBaseToken; alias: string; }; _on?: IConditionValue; } declare type IToJoinArg = IBaseToken | ISqlAdapter | IContainsTable | string | { [key: string]: ISqlAdapter | ISelectStatement | string; }; export interface IJoinState { _joinValues: IJoinExpr[]; withoutJoin: typeof withoutJoin; join: typeof join; joinCross: typeof joinCross; joinNatural: typeof joinNatural; joinLeft: typeof joinLeft; joinLeftOuter: typeof joinLeftOuter; joinLeftNatural: typeof joinLeftNatural; joinLeftNaturalOuter: typeof joinLeftNaturalOuter; joinRight: typeof joinRight; joinRightOuter: typeof joinRightOuter; joinRightNatural: typeof joinRightNatural; joinRightNaturalOuter: typeof joinRightNaturalOuter; joinFull: typeof joinFull; joinFullOuter: typeof joinFullOuter; joinFullNatural: typeof joinFullNatural; joinFullNaturalOuter: typeof joinFullNaturalOuter; joinInner: typeof joinInner; joinInnerNatural: typeof joinInnerNatural; } export declare function join(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinCross(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinNatural(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinLeftNatural(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinRightNatural(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinFullNatural(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinLeftNaturalOuter(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinRightNaturalOuter(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinFullNaturalOuter(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinInnerNatural(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinLeft(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinRight(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinFull(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinLeftOuter(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinRightOuter(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinFullOuter(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function joinInner(this: T, toJoin: IToJoinArg, on?: IConditionValue): T; export declare function withoutJoin(this: T): T; export {};