import{and as l,eq as s}from"drizzle-orm";import{getFirstRow as o}from"../../../providers/database/utils/get-first-row.js";import{createFileHashReadModel as a}from"../mappers/create-file-hash-read-model.js";import{fileHashesTable as t}from"../../../providers/database/databases/sqlite-db/schemas/file-hashes-table.js";class f{#e;constructor(e){this.#e=e}async getByPath(e){const r=await o(this.#e.client.select().from(t).where(s(t.filePath,e)));return r?a(r):null}async getAllOutdated(e){return(await this.#e.client.select().from(t).where(l(s(t.fileType,e),s(t.status,"outdated"))).all()).map(a)}async getAllByFileType(e){return(await this.#e.client.select().from(t).where(s(t.fileType,e)).all()).map(a)}}export{f as FileHashesReadRepository};
