MySQL · 1181 bytes Raw Blame History
1 -- SPDX-License-Identifier: AGPL-3.0-or-later
2
3 -- name: InsertWorkflowStep :one
4 INSERT INTO workflow_steps (
5 job_id, step_index, step_id, step_name, if_expr,
6 run_command, uses_alias, working_directory, step_env, continue_on_error
7 ) VALUES (
8 $1, $2, $3, $4, $5, $6, $7, $8, $9, $10
9 )
10 RETURNING id, job_id, step_index, step_id, step_name, if_expr,
11 run_command, uses_alias, working_directory, step_env,
12 continue_on_error, status, conclusion, log_object_key,
13 log_byte_count, started_at, completed_at, version,
14 created_at, updated_at;
15
16 -- name: GetWorkflowStepByID :one
17 SELECT id, job_id, step_index, step_id, step_name, if_expr,
18 run_command, uses_alias, working_directory, step_env,
19 continue_on_error, status, conclusion, log_object_key,
20 log_byte_count, started_at, completed_at, version,
21 created_at, updated_at
22 FROM workflow_steps
23 WHERE id = $1;
24
25 -- name: ListStepsForJob :many
26 SELECT id, job_id, step_index, step_id, step_name, run_command,
27 uses_alias, status, conclusion, log_byte_count,
28 started_at, completed_at, created_at
29 FROM workflow_steps
30 WHERE job_id = $1
31 ORDER BY step_index ASC;
32