aboutsummaryrefslogtreecommitdiff
path: root/src/queries.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/queries.h')
-rw-r--r--src/queries.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/queries.h b/src/queries.h
index 108b249..809d259 100644
--- a/src/queries.h
+++ b/src/queries.h
@@ -24,6 +24,13 @@ const char *q_select_json_posts = \
const char *q_insert_posts = \
"INSERT INTO posts "
+"(title, body) "
+"VALUES "
+"($1, $2) "
+"RETURNING id;";
+
+const char *q_insert_posts_with_id = \
+"INSERT INTO posts "
"(id, title, body) "
"VALUES "
"($1, $2, $3) "