This commit is contained in:
seb
2026-07-31 19:49:07 +02:00
parent 6b1701d4dc
commit e8326e22ac
10 changed files with 827 additions and 5 deletions

10
src/sql/articlepic.js Normal file
View File

@@ -0,0 +1,10 @@
export const GET_NEXT_SORT = `
SELECT ISNULL(MAX(sort), -1) + 1 AS sort
FROM articlepic
WHERE article_id = @articleId
`;
export const ADD = `
INSERT INTO articlepic (article_id, pic_id, sort)
VALUES (@articleId, @picId, @sort)
`;

9
src/sql/pic.js Normal file
View File

@@ -0,0 +1,9 @@
export const CREATE = `
INSERT INTO pic (
w, h, size, hash, thumbw, thumbh, thumbhash, source, [binary], thumbbinary
)
OUTPUT INSERTED.id
VALUES (
@w, @h, @size, @hash, @thumbw, @thumbh, @thumbhash, @source, @binary, @thumbbinary
)
`;