const char *q_select_post = "SELECT id, title, created_at::DATE, body " "FROM posts " "WHERE id = $1;"; const char *q_select_posts = "SELECT id, title, created_at::DATE, body " "FROM posts " "ORDER BY updated_at DESC;"; 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) " "RETURNING id;"; 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 = "DELETE " "FROM posts " "WHERE id = $1 " "RETURNING id;";