import type { NewQuery, NewQueryJoin } from "./QueryBuilder"; import { type SelectItemValidated } from "./QueryBuilder"; import type { ViewHandler } from "../ViewHandler/ViewHandler"; import { type PGIdentifier } from "../DboBuilder"; type Args = { q1: NewQuery; q2: NewQueryJoin; selectParamsGroupBy: boolean; }; /** * Rename all join columns to prevent name clash */ export declare const getJoinCol: (colName: string) => { alias: string; rootSelect: string; }; export declare const JSON_AGG_FIELD_NAME = "prostgles_json_agg_result_field"; /** * Used for LIMIT and for sorting */ export declare const NESTED_ROWID_FIELD_NAME = "prostgles_rowid_field"; type GetJoinQueryResult = { resultAlias: PGIdentifier; firstJoinTableJoinFields: string[]; isOrJoin: boolean; type: "cte"; joinLines: string[]; cteLines: string[]; }; /** Returns join query. All inner join tables will be prefixed with path index unless it's the final target table which is aliased using the q2 tableAlias LEFT JOIN ( SELECT [target table select + join fields] FROM first_join/target_table JOIN ..next_joins ON ... JOIN target_table ) target_table ON ...condition */ export declare const getJoinQuery: (viewHandler: ViewHandler, { q1, q2 }: Args) => GetJoinQueryResult; export type SelectItemNested = SelectItemValidated & { query: string; isJoinCol: boolean; }; export {}; //# sourceMappingURL=getJoinQuery.d.ts.map