/** * Internal execute-time option types consumed by the built-in engine's * query planner, operator implementations, and result shaping. These are * NOT part of the {@link AgDataEngine} public contract — custom engines * never see them. */ /** * Null/Undefined Handling Mode. * * - 'strict': Distinguishes between null and undefined * * null and undefined create separate groups/matches * * Sort order: undefined < null < values * * isUndefined operator available * * - 'unified' (default): Treats null and undefined as equivalent (SQL-compatible) * * null and undefined create same groups/matches * * Sort order: (null|undefined) < values * * isUndefined operator returns false always */ export type NullHandlingMode = 'strict' | 'unified'; export interface NullHandlingOptions { /** Null handling. */ nullHandling?: NullHandlingMode; /** Whether to include null keys in filter results. Defaults to false. */ includeNull?: boolean; } export interface RangeHandlingOptions { /** Whether range filters are inclusive (e.g. >=, <=) or exclusive (e.g. >, <). Defaults to false. */ inclusive?: boolean; } export interface StringHandlingOptions { /** Whether string comparisons should be case-sensitive. Defaults to false. */ matchCase?: boolean; /** Whether to trim leading/trailing whitespace from string values before comparison. Defaults to false. */ trimWhitespace?: boolean; } export interface ExecuteOptions extends NullHandlingOptions, RangeHandlingOptions, StringHandlingOptions { } /** * Execute-time options consumed by the built-in engine's query path. * Specifies target shape, materialisation, cross-filter, and the * null/range/string handling toggles. */ export interface ExecuteRequestOptions extends ExecuteOptions { /** * Target result shape. Defaults to 'rows'. * - 'rows': flattened to rows * - 'columns': columnar data structure */ shape: 'rows' | 'columns'; /** Whether columnar results are materialised (expanded to dense arrays). Only applies when shape is 'columns'. Defaults to true. */ materialised?: boolean; /** Include cross-filter results alongside primary results. */ crossFilter?: boolean; }