diff --git a/queries/records/get_and_update.sql b/queries/records/get_and_update.sql new file mode 100644 index 0000000..52ba101 --- /dev/null +++ b/queries/records/get_and_update.sql @@ -0,0 +1,8 @@ +UPDATE record +SET downloads = downloads + 1 +WHERE cache_name = ? +RETURNING + cache_name, + uploaded, + downloads, + max_downloads;