/** * 查询条件构建器 * 提供类似 Drizzle 的查询条件函数 */ import { PodColumnBase } from './schema'; import { BinaryExpression, LogicalExpression, UnaryExpression, SPARQLExpression } from './expressions'; export type QueryCondition = BinaryExpression | LogicalExpression | UnaryExpression; export type PublicQueryCondition = QueryCondition; export type PublicWhereObject = Omit, 'id' | '@id'> & { id?: never; '@id'?: never; }; export type PublicWhereInput = PublicWhereObject | PublicQueryCondition; export type AnyColumnOperand = PodColumnBase; type ConditionOperand = AnyColumnOperand | SPARQLExpression | string; type ConditionValue = unknown; export declare function eq(column: ConditionOperand, value: ConditionValue): QueryCondition; export declare function ne(column: ConditionOperand, value: ConditionValue): QueryCondition; export declare function gt(column: ConditionOperand, value: ConditionValue): QueryCondition; export declare function gte(column: ConditionOperand, value: ConditionValue): QueryCondition; export declare function lt(column: ConditionOperand, value: ConditionValue): QueryCondition; export declare function lte(column: ConditionOperand, value: ConditionValue): QueryCondition; export declare function like(column: ConditionOperand, pattern: string): QueryCondition; export declare function ilike(column: ConditionOperand, pattern: string): QueryCondition; export declare function between(column: ConditionOperand, min: ConditionValue, max: ConditionValue): QueryCondition; export declare function notBetween(column: ConditionOperand, min: ConditionValue, max: ConditionValue): QueryCondition; export declare function regex(column: ConditionOperand, pattern: string, flags?: string): QueryCondition; export declare function inArray(column: ConditionOperand, values: ConditionValue[]): QueryCondition; export declare function notInArray(column: ConditionOperand, values: ConditionValue[]): QueryCondition; export declare function isNull(column: ConditionOperand): QueryCondition; export declare function isNotNull(column: ConditionOperand): QueryCondition; export declare function and(...conditions: (QueryCondition | undefined | null | false)[]): QueryCondition; export declare function or(...conditions: (QueryCondition | undefined | null | false)[]): QueryCondition; export declare function not(condition: QueryCondition): QueryCondition; export declare function exists(subquery: string): QueryCondition; export declare function notExists(subquery: string): QueryCondition; export declare const conditions: { eq: typeof eq; ne: typeof ne; gt: typeof gt; gte: typeof gte; lt: typeof lt; lte: typeof lte; like: typeof like; ilike: typeof ilike; between: typeof between; notBetween: typeof notBetween; regex: typeof regex; inArray: typeof inArray; notInArray: typeof notInArray; isNull: typeof isNull; isNotNull: typeof isNotNull; and: typeof and; or: typeof or; not: typeof not; exists: typeof exists; notExists: typeof notExists; }; export default conditions; //# sourceMappingURL=query-conditions.d.ts.map