mirror of
https://github.com/Syfaro/fuzzysearch.git
synced 2024-11-10 17:02:38 +00:00
8 lines
215 B
MySQL
8 lines
215 B
MySQL
|
INSERT INTO
|
||
|
rate_limit (api_key_id, time_window, group_name, count)
|
||
|
VALUES
|
||
|
($1, $2, $3, $4) ON CONFLICT ON CONSTRAINT unique_window DO
|
||
|
UPDATE
|
||
|
set
|
||
|
count = rate_limit.count + $4 RETURNING rate_limit.count
|