Built basic blog backend.

This commit is contained in:
2018-11-20 08:39:25 +11:00
parent 75764f744d
commit 8ab9f09287
34 changed files with 221 additions and 98 deletions

View File

@ -0,0 +1,5 @@
INSERT INTO "BlogArticles" (
"handle", "image", "shortDescription", "description", "date"
) VALUES (
${handle}, ${image}, ${shortDescription}, ${description}, ${date}
) RETURNING *;

View File

@ -0,0 +1 @@
SELECT * FROM "BlogArticles" WHERE "handle"=${handle};

View File

@ -0,0 +1 @@
SELECT * FROM "BlogArticles" WHERE "id" = ${id};

View File

@ -0,0 +1,11 @@
SELECT
*
FROM
"BlogArticles"
ORDER BY
"date" DESC
LIMIT
${count}
OFFSET
${offset}
;

View File

@ -0,0 +1 @@
SELECT COUNT(*) FROM "BlogArticles";