41
41
42
42
-- name: GetTemplateVersionByJobID :one
43
43
SELECT
44
- id, template_id, organization_id, created_at, updated_at, name, readme,
45
- job_id, created_by, external_auth_providers, message, archived,
46
- source_example_id, created_by_avatar_url, created_by_username
44
+ *
47
45
FROM
48
46
template_version_with_user AS template_versions
49
47
WHERE
@@ -54,9 +52,7 @@ SELECT * FROM template_version_with_user AS template_versions WHERE created_at >
54
52
55
53
-- name: GetTemplateVersionByTemplateIDAndName :one
56
54
SELECT
57
- id, template_id, organization_id, created_at, updated_at, name, readme,
58
- job_id, created_by, external_auth_providers, message, archived,
59
- source_example_id, created_by_avatar_url, created_by_username
55
+ *
60
56
FROM
61
57
template_version_with_user AS template_versions
62
58
WHERE
@@ -65,19 +61,15 @@ WHERE
65
61
66
62
-- name: GetTemplateVersionByID :one
67
63
SELECT
68
- id, template_id, organization_id, created_at, updated_at, name, readme,
69
- job_id, created_by, external_auth_providers, message, archived,
70
- source_example_id, created_by_avatar_url, created_by_username
64
+ *
71
65
FROM
72
66
template_version_with_user AS template_versions
73
67
WHERE
74
68
id = $1 ;
75
69
76
70
-- name: GetTemplateVersionsByIDs :many
77
71
SELECT
78
- id, template_id, organization_id, created_at, updated_at, name, readme,
79
- job_id, created_by, external_auth_providers, message, archived,
80
- source_example_id, created_by_avatar_url, created_by_username
72
+ *
81
73
FROM
82
74
template_version_with_user AS template_versions
83
75
WHERE
@@ -125,16 +117,14 @@ WHERE
125
117
UPDATE
126
118
template_versions
127
119
SET
128
- external_auth_providers = @external_auth_providers ,
129
- updated_at = @updated_at
120
+ external_auth_providers = $ 2 ,
121
+ updated_at = $ 3
130
122
WHERE
131
- job_id = @job_id ;
123
+ job_id = $ 1 ;
132
124
133
125
-- name: GetPreviousTemplateVersion :one
134
126
SELECT
135
- id, template_id, organization_id, created_at, updated_at, name, readme,
136
- job_id, created_by, external_auth_providers, message, archived,
137
- source_example_id, created_by_avatar_url, created_by_username
127
+ *
138
128
FROM
139
129
template_version_with_user AS template_versions
140
130
WHERE
178
168
-- Scope an archive to a single template and ignore already archived template versions
179
169
(
180
170
SELECT
181
- id, job_id, template_id
171
+ *
182
172
FROM
183
173
template_versions
184
174
WHERE
0 commit comments