diff options
Diffstat (limited to 'src/queries.h')
-rw-r--r-- | src/queries.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/queries.h b/src/queries.h index 9e90581..696d42a 100644 --- a/src/queries.h +++ b/src/queries.h @@ -19,6 +19,11 @@ const char *q_search_entries = ") " "SELECT id, title, created_at::DATE, updated_at::DATE, body FROM query;"; +const char *q_insert_entry = +"INSERT INTO entries (title, body, search_vector) " +"VALUES ($1, $2, TO_TSVECTOR('english', $3)) " +"RETURNING id;"; + const char *q_update_entry = "UPDATE entries " "SET title = $1, body = $2, updated_at = NOW(), search_vector = TO_TSVECTOR('english', $3) " |