-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: integration keys sqlc (#3293)
* integration key sqlc queries * remove statement preparation * tidy up queries * require db/tx
- Loading branch information
1 parent
62fb4b4
commit a4c2aac
Showing
12 changed files
with
335 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
-- name: IntKeyGetServiceID :one | ||
SELECT | ||
service_id | ||
FROM | ||
integration_keys | ||
WHERE | ||
id = $1 | ||
AND type = $2; | ||
|
||
-- name: IntKeyCreate :exec | ||
INSERT INTO integration_keys(id, name, type, service_id) | ||
VALUES ($1, $2, $3, $4); | ||
|
||
-- name: IntKeyFindOne :one | ||
SELECT | ||
id, | ||
name, | ||
type, | ||
service_id | ||
FROM | ||
integration_keys | ||
WHERE | ||
id = $1; | ||
|
||
-- name: IntKeyFindByService :many | ||
SELECT | ||
id, | ||
name, | ||
type, | ||
service_id | ||
FROM | ||
integration_keys | ||
WHERE | ||
service_id = $1; | ||
|
||
-- name: IntKeyDelete :exec | ||
DELETE FROM integration_keys | ||
WHERE id = ANY (@ids::uuid[]); | ||
|
Oops, something went wrong.