-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DB methods for selector management
Adds the needed SQL methods to manage profile selectors Fixes: #3720
- Loading branch information
Showing
5 changed files
with
464 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
-- name: CreateSelector :one | ||
INSERT INTO profile_selectors (profile_id, entity, selector, comment) | ||
VALUES ($1, $2, $3, $4) | ||
RETURNING id, profile_id, entity, selector, comment; | ||
|
||
-- name: GetSelectorsByProfileID :many | ||
SELECT id, profile_id, entity, selector, comment | ||
FROM profile_selectors | ||
WHERE profile_id = $1; | ||
|
||
-- name: UpdateSelector :one | ||
UPDATE profile_selectors | ||
SET entity = $2, selector = $3, comment = $4 | ||
WHERE id = $1 | ||
RETURNING id, profile_id, entity, selector, comment; | ||
|
||
-- name: DeleteSelector :exec | ||
DELETE FROM profile_selectors | ||
WHERE id = $1; | ||
|
||
-- name: GetSelectorByID :one | ||
SELECT id, profile_id, entity, selector, comment | ||
FROM profile_selectors | ||
WHERE id = $1; |
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.
Oops, something went wrong.