aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/db/query.sql.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/db/query.sql.go')
-rw-r--r--backend/db/query.sql.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/backend/db/query.sql.go b/backend/db/query.sql.go
index 6c78267..cfb97fd 100644
--- a/backend/db/query.sql.go
+++ b/backend/db/query.sql.go
@@ -36,6 +36,28 @@ func (q *Queries) CreateSubmission(ctx context.Context, arg CreateSubmissionPara
return submission_id, err
}
+const createSubmissionResult = `-- name: CreateSubmissionResult :exec
+INSERT INTO submission_results (submission_id, status, stdout, stderr)
+VALUES ($1, $2, $3, $4)
+`
+
+type CreateSubmissionResultParams struct {
+ SubmissionID int32
+ Status string
+ Stdout string
+ Stderr string
+}
+
+func (q *Queries) CreateSubmissionResult(ctx context.Context, arg CreateSubmissionResultParams) error {
+ _, err := q.db.Exec(ctx, createSubmissionResult,
+ arg.SubmissionID,
+ arg.Status,
+ arg.Stdout,
+ arg.Stderr,
+ )
+ return err
+}
+
const createTestcaseResult = `-- name: CreateTestcaseResult :exec
INSERT INTO testcase_results (submission_id, testcase_id, status, stdout, stderr)
VALUES ($1, $2, $3, $4, $5)