Debian Codegraph @

tests/blogdb/sql/blogs/blogs.sql

raw
1 -- name: publish-blog<!
2 insert into blogs (
3 userid,
4 title,
5 content,
6 published
7 )
8 values (
9 :userid,
10 :title,
11 :content,
12 :published
13 )
14
15 -- name: remove-blog!
16 -- Remove a blog from the database
17 delete from blogs where blogid = :blogid;
18
19
20 -- name: get-user-blogs
21 -- Get blogs authored by a user.
22 select title,
23 published
24 from blogs
25 where userid = :userid
26 order by published desc;