Move exists check to the add command instead of the database insert routine so it can run earlier

This commit is contained in:
2024-12-11 02:30:29 -05:00
parent 4aee41c9a8
commit d90fcfa32a
3 changed files with 15 additions and 13 deletions

View File

@ -54,7 +54,7 @@ zblock_feed_info_err zblock_feed_info_retrieve_list_item(PGconn *conn, zblock_fe
// check if the feed currently exists. the result is in the exists pointer.
zblock_feed_info_err zblock_feed_info_exists(PGconn *conn, const char *url, u64snowflake channel_id, int *exists);
// Insert new feed into the database
// Insert new feed into the database. This function assumes that you have already verified that it has not been added previously.
zblock_feed_info_err zblock_feed_info_insert(PGconn *conn, zblock_feed_info *feed);
// deletes feed from the database