import type { PropertyDefinition } from '../schema/types'; /** * Builds the `CALL { ... }` subquery used to project an `@cypher` field * for `ORDER BY`. The user's statement is embedded verbatim with `this` * rebound from the outer node variable — no text substitution. * * The caller is expected to follow this CALL with its own `WITH` clause * to rename the projected column (``) to a unique alias * (e.g. `__sort_`) and carry forward any prior sort aliases. * * Example output: * ```cypher * CALL { * WITH n * WITH n AS this * MATCH (this)-[:HAS_STATUS]->(s) RETURN s.name AS statusName * } * ``` */ export declare function buildCypherSortProjection(statement: string, nodeVar: string): string; /** * Compiles a `sort` array (mixed stored-field + `@cypher`-field entries) * into the Cypher fragments needed before and after the `RETURN` clause. * * - Stored fields → emit `. ` directly in the ORDER BY. * Byte-identical to the pre-1.5.0 behavior. * - `@cypher` fields → emit a `CALL { ... }` subquery plus a `WITH` to * rename the projected column into a unique `__sort_` alias, * carrying forward any prior aliases plus caller-supplied `preserveVars` * (e.g. `__typename` for `InterfaceModel`). * * The returned `pre` string is intended to be appended BEFORE the `RETURN`, * and `orderBy` to be appended AFTER it. * * Each entry must carry exactly ONE ordering key — precedence comes from the * entry's position in the array. Multi-key entries throw (`assertSingleSortKey`). */ export declare function compileSortClause(args: { sort: ReadonlyArray>; nodeVar: string; propertyLookup: (field: string) => PropertyDefinition | undefined; preserveVars?: ReadonlyArray; }): { pre: string; orderBy: string; }; //# sourceMappingURL=cypher-sort-projection.d.ts.map