import { type PgTable } from 'drizzle-orm/pg-core';
import type { QueryJoin, QueryJoinType, QueryOp } from '../../typings/routing/crud';
export type JoinTableMap = Record<string, PgTable>;
/** 解析联表别名（必填，不可为 a） */
export declare function resolveJoinAlias(join: QueryJoin, index: number): string;
/** 主表 a + 各 join 的 drizzle alias 表 */
export declare function buildJoinTables(main: PgTable, op: QueryOp): JoinTableMap;
export declare function resolveJoinOn(join: QueryJoin, index: number, tables: JoinTableMap): import("drizzle-orm").SQL<unknown>;
export declare function joinTypeOf(join: QueryJoin, index?: number): QueryJoinType;
