import type { AnySchema, AnyTable, Relation, TableColumnValues, TableInsertValues, TableUpdateValues, } from "../schema/create"; import type { Condition, ConditionBuilder } from "./condition-builder"; import type { ORMAdapter } from "./orm"; export type { Condition, ConditionBuilder } from "./condition-builder"; export { ConditionType } from "./condition-builder"; export { withQueryContext } from "./orm"; export type { CompiledJoin, ORMAdapter, SimplifiedCountOptions, SimplifyFindOptions, } from "./orm"; export type AnySelectClause = SelectClause; export type SelectClause = true | (keyof T["columns"])[]; export type TableToColumnValues = TableColumnValues; export type TableToInsertValues = TableInsertValues; export type TableToUpdateValues = TableUpdateValues; export type MainSelectResult< S extends SelectClause, T extends AnyTable, > = S extends true ? TableToColumnValues : S extends (keyof T["columns"])[] ? Pick, S[number]> : never; export type JoinBuilder = { [K in keyof T["relations"]]: T["relations"][K] extends Relation< infer Type, infer Target > ?