import { Lazy } from "../Lazy.js"; export interface IDocumentQueryBaseSingle { /** * Returns first element or throws if sequence is empty. */ first(): Promise; /** * Returns first element if there's any or null otherwise. */ firstOrNull(): Promise; /** * Returns single element or throws if sequence is empty or contains more than one element. */ single(): Promise; /** * Returns single element if there's any or null otherwise. */ singleOrNull(): Promise; /** * Gets the total count of records for this query */ count(): Promise; /** * Gets the total count of records for this query as long */ longCount(): Promise; /** * Register the query as a lazy query in the session and return a lazy * instance that will evaluate the query only when needed. */ lazily(): Lazy; /** * Register the query as a lazy query in the session and return a lazy * instance that will evaluate the query only when needed. * Also provide a function to execute when the value is evaluated */ lazily(onEval: (list: T[]) => void): Lazy; /** * Checks if the given query matches any records */ any(): Promise; /** * Register the query as a lazy-count query in the session and return a lazy * instance that will evaluate the query only when needed. */ countLazily(): Lazy; } //# sourceMappingURL=IDocumentQueryBaseSingle.d.ts.map