providerrefactor part1

This commit is contained in:
seb
2026-09-21 03:33:55 +02:00
parent 53a20c4353
commit 4ed6260e91
57 changed files with 1662 additions and 145 deletions

View File

@@ -0,0 +1,13 @@
import * as source from '../../mssql/queries/pic.js';
import { translateQueries } from './translate.js';
const queries = translateQueries(source, 'pic');
export const {
CREATE, GET_CATEGORY_ID_BY_HASH, GET_FULL_BY_HASH, GET_THUMB_BY_HASH,
} = queries;
export const DELETE_BY_ARTICLE_AND_HASH = `
DELETE FROM pic
WHERE hash = @fullHash
AND id IN (SELECT pic_id FROM articlepic WHERE article_id = @articleId)
`;