import { AqQuery } from 'aql-builder'; import { GeneratedAqlQuery } from 'arangojs/aql.js'; import { Query } from '../index.js'; import { JsonPrimitive } from '@salesforce/ts-types'; export type AqQueryFragment = Partial; export type AqBindVars = Record; export type QueryInput = string | AqQuery | Query | GeneratedAqlQuery; /** * A query definition that can (optionally) include a foundational base query. * * If the base query is a {@link Query} or an {@link AqQuery}, the properties of * the {@link ChildQuery} will be combined with those of the base query to * generate a new derivitive query. * * If the base query is a {@link GeneratedAqlQuery}, the list of named bind variables * will be injected into the base query before execution. */ export type ChildQuery = AqQueryFragment & { /** * The query to use as a starting point. If this value is a string, * it will be treated as the name of a saved query to look up in the global * configuration. If no query is found, it will be compiled as a raw AQL query. * If that fails you're SOL. */ parent: QueryInput; /** * After a query has been compiled into a {@link GeneratedAqlQuery}, these * values will be injected into its list of bound variables. */ bind?: AqBindVars; }; export declare function isChildQuery(input: unknown): input is ChildQuery; export declare function isAqQueryFragment(input: unknown): input is AqQueryFragment; /** * Given the various forms in which we take query definitions, take one and return * a Query or GeneratedAqlQuery instance. */ export declare function buildQueryWithParents(input: QueryInput | ChildQuery): Promise; /** * Apply child-query modifications to a parent query. */ export declare function addToParentQuery(base: Query | GeneratedAqlQuery, mods?: ChildQuery): GeneratedAqlQuery; //# sourceMappingURL=query-inheritance.d.ts.map