mingo
Version:
MongoDB query language for in-memory objects
24 lines (23 loc) • 959 B
TypeScript
import { Options } from "../core";
import { AnyObject } from "../types";
import { QueryImpl } from "./_internal";
/**
* Represents a query object used to filter and match documents based on specified criteria.
* All query, projection, and related expression operators are preloaded into the context by default.
*
* @example
* ```typescript
* const query = new Query({ age: { $gt: 18 } });
* const result = query.test({ name: "John", age: 25 }); // true
* ```
*/
export declare class Query extends QueryImpl {
/**
* Creates an instance of the query with the specified condition and options.
* This object is preloaded with all query and projection operators.
*
* @param condition - The query condition object used to define the criteria for matching documents.
* @param options - Optional configuration settings to customize the query behavior.
*/
constructor(condition: AnyObject, options?: Partial<Options>);
}