import type { Collection as MongoCollection, InsertOneResult, Document, UpdateResult, DeleteResult } from "mongodb"; import type { App } from "../main.js"; import type { QueryStage } from "./query-stage.js"; import type { OutputOptions } from "./datastore.js"; export default abstract class Datastore { app: App; constructor(app: App); abstract start(): Promise; abstract stop(): Promise; abstract find(collection_name: string, query: Record, options: Parameters[1], output_options: OutputOptions): Promise[]>; abstract aggregate(collection_name: string, pipeline: QueryStage[], _: unknown, output_options: OutputOptions): Promise[]>; abstract insert(collection_name: string, to_insert: Record, options?: Parameters[1]): Promise>; abstract update(collection_name: string, query: unknown, new_value: unknown): Promise>; abstract remove(collection_name: string, query: unknown, just_one: boolean): Promise; }