/// import { z } from "zod"; import SQL from "./tag.js"; import { MaybeArray, Namespace } from "./utils.js"; export declare const WhereBoolean: z.ZodUnion<[z.ZodBoolean, z.ZodNull, z.ZodObject<{ equals: z.ZodOptional>; not: z.ZodOptional>; }, "strip", z.ZodTypeAny, { equals?: boolean | null | undefined; not?: boolean | null | undefined; }, { equals?: boolean | null | undefined; not?: boolean | null | undefined; }>]>; export declare type WhereBoolean = boolean | null | { equals?: boolean | null; not?: boolean | null; }; export declare function formatWhereBoolean(column: SQL.Template, where: WhereBoolean): SQL.Template; declare const WhereScalar: (t: T) => z.ZodObject<{ equals: z.ZodOptional>; not: z.ZodOptional>; gt: z.ZodOptional; lt: z.ZodOptional; gte: z.ZodOptional; lte: z.ZodOptional; in: z.ZodOptional>; notIn: z.ZodOptional>; }, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<{ equals: T["_output"] | null | undefined; not: T["_output"] | null | undefined; gt: T["_output"] | undefined; lt: T["_output"] | undefined; gte: T["_output"] | undefined; lte: T["_output"] | undefined; in: T["_output"][] | undefined; notIn: T["_output"][] | undefined; }>]: z.objectUtil.addQuestionMarks<{ equals: T["_output"] | null | undefined; not: T["_output"] | null | undefined; gt: T["_output"] | undefined; lt: T["_output"] | undefined; gte: T["_output"] | undefined; lte: T["_output"] | undefined; in: T["_output"][] | undefined; notIn: T["_output"][] | undefined; }>[k_1]; }, { [k_3 in keyof z.objectUtil.addQuestionMarks<{ equals: T["_input"] | null | undefined; not: T["_input"] | null | undefined; gt: T["_input"] | undefined; lt: T["_input"] | undefined; gte: T["_input"] | undefined; lte: T["_input"] | undefined; in: T["_input"][] | undefined; notIn: T["_input"][] | undefined; }>]: z.objectUtil.addQuestionMarks<{ equals: T["_input"] | null | undefined; not: T["_input"] | null | undefined; gt: T["_input"] | undefined; lt: T["_input"] | undefined; gte: T["_input"] | undefined; lte: T["_input"] | undefined; in: T["_input"][] | undefined; notIn: T["_input"][] | undefined; }>[k_3]; }>; declare type WhereScalar = { equals?: T | null; not?: T | null; gt?: T; lt?: T; gte?: T; lte?: T; in?: T[]; notIn?: T[]; }; export declare const WhereBlob: z.ZodUnion<[z.ZodType, z.ZodNull, z.ZodObject<{ equals: z.ZodOptional>>; not: z.ZodOptional>>; gt: z.ZodOptional>; lt: z.ZodOptional>; gte: z.ZodOptional>; lte: z.ZodOptional>; in: z.ZodOptional, "many">>; notIn: z.ZodOptional, "many">>; }, "strip", z.ZodTypeAny, { equals?: Buffer | null | undefined; not?: Buffer | null | undefined; gt?: Buffer | undefined; lt?: Buffer | undefined; gte?: Buffer | undefined; lte?: Buffer | undefined; in?: Buffer[] | undefined; notIn?: Buffer[] | undefined; }, { equals?: Buffer | null | undefined; not?: Buffer | null | undefined; gt?: Buffer | undefined; lt?: Buffer | undefined; gte?: Buffer | undefined; lte?: Buffer | undefined; in?: Buffer[] | undefined; notIn?: Buffer[] | undefined; }>]>; export declare type WhereBlob = Buffer | null | WhereScalar; export declare function formatWhereBlob(column: SQL.Template, where: WhereBlob): SQL.Template; export declare const WhereString: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodObject>; not: z.ZodOptional>; gt: z.ZodOptional; lt: z.ZodOptional; gte: z.ZodOptional; lte: z.ZodOptional; in: z.ZodOptional>; notIn: z.ZodOptional>; }, { like: z.ZodOptional; }>, "strip", z.ZodTypeAny, { equals?: string | null | undefined; not?: string | null | undefined; gt?: string | undefined; lt?: string | undefined; gte?: string | undefined; lte?: string | undefined; in?: string[] | undefined; notIn?: string[] | undefined; like?: string | undefined; }, { equals?: string | null | undefined; not?: string | null | undefined; gt?: string | undefined; lt?: string | undefined; gte?: string | undefined; lte?: string | undefined; in?: string[] | undefined; notIn?: string[] | undefined; like?: string | undefined; }>]>; export declare type WhereString = string | null | (WhereScalar & { like?: string; }); export declare function formatWhereString(column: SQL.Template, where: WhereString): SQL.Template; export declare const WhereNumber: z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodNull, z.ZodObject<{ equals: z.ZodOptional>>; not: z.ZodOptional>>; gt: z.ZodOptional>; lt: z.ZodOptional>; gte: z.ZodOptional>; lte: z.ZodOptional>; in: z.ZodOptional, "many">>; notIn: z.ZodOptional, "many">>; }, "strip", z.ZodTypeAny, { equals?: number | bigint | null | undefined; not?: number | bigint | null | undefined; gt?: number | bigint | undefined; lt?: number | bigint | undefined; gte?: number | bigint | undefined; lte?: number | bigint | undefined; in?: (number | bigint)[] | undefined; notIn?: (number | bigint)[] | undefined; }, { equals?: number | bigint | null | undefined; not?: number | bigint | null | undefined; gt?: number | bigint | undefined; lt?: number | bigint | undefined; gte?: number | bigint | undefined; lte?: number | bigint | undefined; in?: (number | bigint)[] | undefined; notIn?: (number | bigint)[] | undefined; }>]>; export declare type WhereNumber = number | bigint | null | WhereScalar; export declare function formatWhereNumber(column: SQL.Template, where: WhereNumber): SQL.Template; export declare const WhereDate: z.ZodUnion<[z.ZodDate, z.ZodNull, z.ZodObject<{ equals: z.ZodOptional>; not: z.ZodOptional>; gt: z.ZodOptional; lt: z.ZodOptional; gte: z.ZodOptional; lte: z.ZodOptional; in: z.ZodOptional>; notIn: z.ZodOptional>; }, "strip", z.ZodTypeAny, { equals?: Date | null | undefined; not?: Date | null | undefined; gt?: Date | undefined; lt?: Date | undefined; gte?: Date | undefined; lte?: Date | undefined; in?: Date[] | undefined; notIn?: Date[] | undefined; }, { equals?: Date | null | undefined; not?: Date | null | undefined; gt?: Date | undefined; lt?: Date | undefined; gte?: Date | undefined; lte?: Date | undefined; in?: Date[] | undefined; notIn?: Date[] | undefined; }>]>; export declare type WhereDate = Date | null | WhereScalar; export declare function formatWhereDate(column: SQL.Template, where: WhereDate): SQL.Template; export declare const WhereUuid: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodObject<{ equals: z.ZodOptional>; not: z.ZodOptional>; gt: z.ZodOptional; lt: z.ZodOptional; gte: z.ZodOptional; lte: z.ZodOptional; in: z.ZodOptional>; notIn: z.ZodOptional>; }, "strip", z.ZodTypeAny, { equals?: string | null | undefined; not?: string | null | undefined; gt?: string | undefined; lt?: string | undefined; gte?: string | undefined; lte?: string | undefined; in?: string[] | undefined; notIn?: string[] | undefined; }, { equals?: string | null | undefined; not?: string | null | undefined; gt?: string | undefined; lt?: string | undefined; gte?: string | undefined; lte?: string | undefined; in?: string[] | undefined; notIn?: string[] | undefined; }>]>; export declare type WhereUuid = string | null | WhereScalar; export declare function formatWhereUuid(column: SQL.Template, where: WhereUuid): SQL.Template; export declare type WhereChainable> = { AND?: MaybeArray; OR?: MaybeArray; NOT?: MaybeArray; }; export declare function makeWhereChainable>(makeWhereComponent: (nsr: Namespace.Result, component: T) => SQL.Template[]): (nsr: Namespace.Result, where: T | undefined) => SQL.Template; export declare type WhereOneRelated = { /** The related model satisfies these constraints. */ is?: T; /** The related model does not exist or does not satisfy these constraints. */ isNot?: T; }; export declare const WhereOneRelated: >(t: T) => z.ZodObject<{ is: z.ZodOptional; isNot: z.ZodOptional; }, "strict", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<{ is: T["_output"] | undefined; isNot: T["_output"] | undefined; }>]: z.objectUtil.addQuestionMarks<{ is: T["_output"] | undefined; isNot: T["_output"] | undefined; }>[k]; }, { [k_1 in keyof z.objectUtil.addQuestionMarks<{ is: T["_input"] | undefined; isNot: T["_input"] | undefined; }>]: z.objectUtil.addQuestionMarks<{ is: T["_input"] | undefined; isNot: T["_input"] | undefined; }>[k_1]; }>; export declare function formatWhereOne({ alias, ns }: Namespace.Result, localKey: SQL.Template, foreignTable: SQL.Template, foreignColumn: SQL.Template, clause: WhereOneRelated, formatWhere: (nsr: Namespace.Result, component: T) => SQL.Template): SQL.Template; export declare type WhereManyRelated = { /** There exists one or more related models which satisfy this constraint. */ some?: T; /** There do not exist any related models which satisfy this constraint. */ none?: T; }; export declare const WhereManyRelated: >(t: T) => z.ZodObject<{ some: z.ZodOptional; none: z.ZodOptional; }, "strict", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<{ some: T["_output"] | undefined; none: T["_output"] | undefined; }>]: z.objectUtil.addQuestionMarks<{ some: T["_output"] | undefined; none: T["_output"] | undefined; }>[k]; }, { [k_1 in keyof z.objectUtil.addQuestionMarks<{ some: T["_input"] | undefined; none: T["_input"] | undefined; }>]: z.objectUtil.addQuestionMarks<{ some: T["_input"] | undefined; none: T["_input"] | undefined; }>[k_1]; }>; export declare function formatWhereMany({ alias, ns }: Namespace.Result, localKey: SQL.Template, foreignTable: SQL.Template, foreignColumn: SQL.Template, clause: WhereManyRelated, formatWhere: (nsr: Namespace.Result, component: T) => SQL.Template): SQL.Template; export {};