mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-02-09 13:48:25 -06:00
13 lines
512 B
SQL
13 lines
512 B
SQL
-- name: WebhooksServiceUpdateWebhook :one
|
|
UPDATE webhooks
|
|
SET
|
|
name = COALESCE(sqlc.narg('name'), name),
|
|
is_active = COALESCE(sqlc.narg('is_active'), is_active),
|
|
event_type = COALESCE(sqlc.narg('event_type'), event_type),
|
|
target_ids = COALESCE(sqlc.narg('target_ids'), target_ids),
|
|
url = COALESCE(sqlc.narg('url'), url),
|
|
method = COALESCE(sqlc.narg('method'), method),
|
|
headers = COALESCE(sqlc.narg('headers'), headers),
|
|
body = COALESCE(sqlc.narg('body'), body)
|
|
WHERE id = @webhook_id
|
|
RETURNING *; |