import { Select, Expr, Operation } from './schema'; /** Converts a JSON `Select` object and its contents into normal form, in-place. * - Uppercases all object keys and operator names. * - Turns result columns declared as plain path strings into proper '.' operations. * - Breaks up property paths, for example `[".foo.bar"]` becomes `[".", "foo", "bar"]`. * - Converts shorthand `["$foo"]` into `["$", "foo"]`, and the same for '?'. * This isn't necessary for JSON generated by this library's N1QL parser, * but is required if we decide to accept externally-created JSON, whether hand-written or * produced by LiteCore. */ export declare function Normalize(select: Select): void; /** Ensures that every '.' and 'META()' expression starts with a valid source alias. */ export declare function NormalizePaths(select: Select, aliases: Map, singleSource: string | undefined): void; /** Calls `visitor` on every Operation. Iteration stops if it returns false. */ export declare function VisitSelect(select: Select, visitor: (op: string, subexpr: Operation) => boolean): void; /** Calls `visitor` on every Operation. Iteration stops if it returns false. */ export declare function VisitExpr(expr: Expr, visitor: (op: string, subexpr: Operation) => boolean): boolean; /** Returns the set of source/result aliases accessed by an Expr. */ export declare function ExprAliases(expr: Expr): Set; /** Given a predicate expression such as a SELECT's WHERE or a JOIN's ON, * converts it to an array of one or more Operations that must all be true, * i.e. that are implicitly joined by AND. */ export declare function SplitANDs(where: Expr): Operation[];