/**
 * Query, Filter, and Pagination Types
 * Core-specific query-building type definitions
 * Note: PaginationOptions, PaginationMetadata, FilterOperator, OperatorName are exported from index.ts via @baasix/types
 */
import type { PgTable, PgColumn } from 'drizzle-orm/pg-core';
import type { JoinDefinition } from './relations.js';
/**
 * Filter object structure (Sequelize-style) - core-specific with Drizzle support
 */
export interface FilterObject {
    [key: string]: any;
    AND?: FilterObject[];
    OR?: FilterObject[];
    cast?: string;
}
/**
 * Query context for building where conditions (core-specific with Drizzle types)
 */
export interface QueryContext {
    table?: PgTable;
    tableName?: string;
    schema?: Record<string, PgColumn>;
    schemaDefinition?: any;
    joins?: JoinDefinition[];
    forPermissionCheck?: boolean;
}
/**
 * Column reference format for filter values
 * Format: $COL(columnName) or $COL(tableName.columnName)
 */
export type ColumnReference = string;
/**
 * Type for filter operator values
 */
export type FilterValue = string | number | boolean | null | Date | any[] | Record<string, any> | ColumnReference;
/**
 * Interface for operator context (core-specific with Drizzle types)
 */
export interface OperatorContext {
    column: PgColumn;
    schemaTable?: any;
    fieldName: string;
    tableName?: string;
}
//# sourceMappingURL=query.d.ts.map