creatorupdatordeprecate
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
-- name: GetQueryConfig :one
|
||||
SELECT id, config FROM queryConfigs where queryId = $1 and addedVersion >= $2 and COALESCE(removedVersion, $2 - 1) < $2;
|
||||
|
||||
-- name: GetQueryType :one
|
||||
SELECT type FROM queries where id = $1;
|
||||
|
||||
-- name: DeprecateQuery :exec
|
||||
INSERT INTO queryDeprecations (queryId) VALUES ($1) RETURNING id;
|
||||
|
||||
-- name: IsQueryDeprecated :one
|
||||
SELECT EXISTS (
|
||||
SELECT 1 FROM queryDeprecations where queryId = $1 and removedAt is not null
|
||||
);
|
||||
|
||||
-- name: GetQuery :one
|
||||
SELECT q.id, q.type, q.activeVersion, c.config, ARRAY_AGG(r.requiredQueryId) AS requiredIds
|
||||
FROM queries AS q
|
||||
|
||||
Reference in New Issue
Block a user