providerrefactor part1
This commit is contained in:
13
src/providers/sqlite3/queries/pic.js
Normal file
13
src/providers/sqlite3/queries/pic.js
Normal 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)
|
||||
`;
|
||||
Reference in New Issue
Block a user