diff options
author | Michael McVady <femtonaut@gmail.com> | 2023-02-22 22:23:27 -0600 |
---|---|---|
committer | Michael McVady <femtonaut@gmail.com> | 2023-02-22 22:23:27 -0600 |
commit | 174907730bd2175bddc896cb6484918e2e5064f5 (patch) | |
tree | 9e78d8a29eb26d2f4c082841b150215ecdd977fe /src/queries.h | |
parent | f90a5869678757b7202334988eeabd96017da533 (diff) |
Make post UUID optional
Diffstat (limited to 'src/queries.h')
-rw-r--r-- | src/queries.h | 7 |
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) " |