improving similarity cache

This commit is contained in:
orangecoding
2025-10-29 09:36:05 +01:00
parent d433b13db6
commit 79a8420dfb
20 changed files with 169 additions and 242 deletions

View File

@@ -310,8 +310,8 @@ export const deleteListingsByJobId = (jobId) => {
if (!jobId) return;
return SqliteConnection.execute(
`DELETE
FROM listings
WHERE job_id = @jobId`,
FROM listings
WHERE job_id = @jobId`,
{ jobId },
);
};
@@ -332,3 +332,13 @@ export const deleteListingsById = (ids) => {
ids,
);
};
/**
* Return all listings with only the fields: title, address, and price.
* This is the single helper requested for simple consumers.
*
* @returns {{title: string|null, address: string|null, price: number|null}[]}
*/
export const getAllEntriesFromListings = () => {
return SqliteConnection.query(`SELECT title, address, price FROM listings`);
};