import type { Field } from './dsl.js'; /** Binary operator on numeric values. */ export type BinOp = 'add' | 'sub' | 'mul' | 'div'; /** A value expression: column reference / literal / method parameter / binary * operation. Recursive — leaves are col/lit/param, bin combines them. */ export type ValueExpr = { kind: 'col'; field: Field; } | { kind: 'lit'; value: string | number; } | { kind: 'param'; name: string; } | { kind: 'bin'; op: BinOp; left: ValueExpr; right: ValueExpr; }; /** An update SET assignment: `col = expr` (besides the direct-assignment * columns carried by the args entity — a column must not appear in both). */ export interface SetExpr { col: Field; expr: ValueExpr; } export declare function col(field: Field): ValueExpr; export declare function lit(value: string | number): ValueExpr; export declare function param(name: string): ValueExpr; export declare function bin(op: BinOp, left: ValueExpr, right: ValueExpr): ValueExpr; /** Convenience builders for the common self-increment/decrement shapes. */ export declare const incr: (field: Field, by: ValueExpr) => SetExpr; export declare const decr: (field: Field, by: ValueExpr) => SetExpr; /** Aggregate expression result of an aggregate query column. */ export interface ComputeExpr { fn: 'sum' | 'avg' | 'count'; /** Column the function applies to; absent for count(*). */ field?: Field; } /** Aggregate expressions: Compute.sum(col) / Compute.avg(col) / Compute.count(). */ export declare const Compute: { sum(field: Field): ComputeExpr; avg(field: Field): ComputeExpr; count(): ComputeExpr; };