diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-12 05:54:49 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-12 05:54:49 +0900 |
| commit | 3074f8d74330a2c238040755b758230d682a4bc4 (patch) | |
| tree | 3c45267ee25aa78be1ad4c31e0c09894e656b506 /backend/db/query.sql.go | |
| parent | 7527e54bba0c528015ce402bfa4534c1ab6ca1da (diff) | |
| parent | b37d6f213c2f3b19631e5067f39a7106859faaed (diff) | |
| download | phperkaigi-2025-albatross-3074f8d74330a2c238040755b758230d682a4bc4.tar.gz phperkaigi-2025-albatross-3074f8d74330a2c238040755b758230d682a4bc4.tar.zst phperkaigi-2025-albatross-3074f8d74330a2c238040755b758230d682a4bc4.zip | |
Merge branch 'feat/play-page'
Diffstat (limited to 'backend/db/query.sql.go')
| -rw-r--r-- | backend/db/query.sql.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/backend/db/query.sql.go b/backend/db/query.sql.go index 583389e..34b0ae9 100644 --- a/backend/db/query.sql.go +++ b/backend/db/query.sql.go @@ -174,6 +174,19 @@ func (q *Queries) GetGameByID(ctx context.Context, gameID int32) (GetGameByIDRow return i, err } +const getSubmissionCodeSizeByID = `-- name: GetSubmissionCodeSizeByID :one +SELECT code_size FROM submissions +WHERE submission_id = $1 +LIMIT 1 +` + +func (q *Queries) GetSubmissionCodeSizeByID(ctx context.Context, submissionID int32) (int32, error) { + row := q.db.QueryRow(ctx, getSubmissionCodeSizeByID, submissionID) + var code_size int32 + err := row.Scan(&code_size) + return code_size, err +} + const getUserAuthByUsername = `-- name: GetUserAuthByUsername :one SELECT users.user_id, username, display_name, icon_path, is_admin, created_at, user_auth_id, user_auths.user_id, auth_type, password_hash FROM users JOIN user_auths ON users.user_id = user_auths.user_id |
