Have got post creation working.
This commit is contained in:
parent
63b19a249a
commit
8e0ffb6c24
20 changed files with 479 additions and 11 deletions
14
sql/queries/posts.sql
Normal file
14
sql/queries/posts.sql
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
-- name: ListPosts :many
|
||||
SELECT * FROM post WHERE site_id = $1 ORDER BY post_date DESC LIMIT 25;
|
||||
|
||||
-- name: InsertPost :one
|
||||
INSERT INTO post (
|
||||
site_id,
|
||||
title,
|
||||
body,
|
||||
state,
|
||||
props,
|
||||
post_date,
|
||||
created_at
|
||||
) VALUES ($1, $2, $3, $4, $5, $6, $7)
|
||||
RETURNING id;
|
||||
Loading…
Add table
Add a link
Reference in a new issue