import { IQueryStore, type Checkpoint, type ColumnPageQuery, type IQuery, type Page, } from '#/persistence/interface/queryStore'; export function stubQueryStore(): IQueryStore { return { _serviceBrand: undefined, put: async (_c: string, _k: string, _v: unknown) => {}, batch: async (_ops) => {}, delete: async (_c: string, _k: string) => {}, get: async (_c: string, _k: string) => undefined as T | undefined, getMany: async (_c: string, _keys: readonly string[]) => new Map(), query: (_c: string) => emptyQuery(), pageByColumn: async (_c: string, _q: ColumnPageQuery) => ({ items: [] as T[] }), ensureIndex: async (_c, _d) => {}, listKeys: async (_c: string) => [], dropCollection: async (_c: string) => {}, getCheckpoint: async (_s: string) => undefined as Checkpoint | undefined, setCheckpoint: async (_s: string, _c: Checkpoint) => {}, storeEpoch: () => 0, close: async () => {}, }; } function emptyQuery(): IQuery { const page: Page = { items: [] }; const q: IQuery = { where: () => q, whereColumn: () => q, orderBy: () => q, limit: () => q, cursor: () => q, execute: () => Promise.resolve(page), }; return q; }