aboutsummaryrefslogtreecommitdiff
path: root/src/queries.h
diff options
context:
space:
mode:
authorMichael McVady <femtonaut@gmail.com>2023-04-20 23:15:47 -0500
committerMichael McVady <femtonaut@gmail.com>2023-04-20 23:15:47 -0500
commit900010b413359b77658e42eacf488cd6301fff67 (patch)
tree45b242779fb893544f876c079551974dffebb959 /src/queries.h
parentf6bc52181033e982cf5088e121af5d6e616cf8cd (diff)
Hack in Mermaid JS rendering
Diffstat (limited to 'src/queries.h')
-rw-r--r--src/queries.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/queries.h b/src/queries.h
index 6230f41..2334874 100644
--- a/src/queries.h
+++ b/src/queries.h
@@ -1,48 +1,48 @@
-const char *q_select_html_post = \
+const char *q_select_html_post =
"SELECT id, title, created_at::DATE, body "
"FROM posts "
"WHERE id = $1;";
-const char *q_select_html_posts = \
+const char *q_select_html_posts =
"SELECT id, title, created_at::DATE, body "
"FROM posts "
"ORDER BY updated_at DESC;";
-const char *q_select_json_post = \
+const char *q_select_json_post =
"SELECT JSON_AGG(ROW_TO_JSON(row)) FROM ("
"SELECT id, title, body, created_at, updated_at "
"FROM posts "
"WHERE id = $1"
") row;";
-const char *q_select_json_posts = \
+const char *q_select_json_posts =
"SELECT JSON_AGG(ROW_TO_JSON(row)) FROM ("
"SELECT id, title, body, created_at, updated_at "
"FROM posts "
"ORDER BY updated_at DESC"
") row;";
-const char *q_insert_posts = \
+const char *q_insert_posts =
"INSERT INTO posts "
"(title, body) "
"VALUES "
"($1, $2) "
"RETURNING id;";
-const char *q_insert_posts_with_id = \
+const char *q_insert_posts_with_id =
"INSERT INTO posts "
"(id, title, body) "
"VALUES "
"($1, $2, $3) "
"RETURNING id;";
-const char *q_update_posts = \
+const char *q_update_posts =
"UPDATE posts "
"SET title = $1, body = $2, updated_at = NOW() "
"WHERE id = $3 "
"RETURNING id;";
-const char *q_delete_posts = \
+const char *q_delete_posts =
"DELETE "
"FROM posts "
"WHERE id = $1 "