import { IRelationDescriptor, ISelectQueryBuilder, RelationType } from './interfaces.js'; import type { WhereBuilder } from './builders.js'; import { WhereFunction } from './types.js'; /** * Strategy that builds the EXISTS / NOT EXISTS clause for one relation type. * * Resolved via `Array.ofType(ExistsRelationHandler)` and dispatched by `rel.Type` from * `WhereBuilder.buildExistsClause`. Implementations either: * - mutate the outer builder directly and return `undefined` (eg. {@link RelationType.One} * adds `WHERE FK IS NOT NULL` plus a right-join, no EXISTS sub-query is generated), or * - return a correlated sub-query that the caller wraps in EXISTS/NOT EXISTS. */ export declare abstract class ExistsRelationHandler { abstract get Type(): RelationType; abstract apply(builder: WhereBuilder, rel: IRelationDescriptor, relationName: string, callback?: WhereFunction): ISelectQueryBuilder | undefined; } export declare class OneExistsRelationHandler extends ExistsRelationHandler { get Type(): RelationType; apply(builder: WhereBuilder, rel: IRelationDescriptor, _relationName: string, callback?: WhereFunction): ISelectQueryBuilder | undefined; } export declare class ManyExistsRelationHandler extends ExistsRelationHandler { get Type(): RelationType; apply(builder: WhereBuilder, rel: IRelationDescriptor, _relationName: string, callback?: WhereFunction): ISelectQueryBuilder; } export declare class ManyToManyExistsRelationHandler extends ExistsRelationHandler { get Type(): RelationType; apply(builder: WhereBuilder, rel: IRelationDescriptor, _relationName: string, callback?: WhereFunction): ISelectQueryBuilder; } //# sourceMappingURL=existsRelationHandlers.d.ts.map