diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-11 20:39:48 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-11 20:39:48 +0900 |
| commit | 125e26b4d5c986f8531c098ecd5d291c1e1c7a76 (patch) | |
| tree | fee5d641a05dc972a6b80fb3620d156f13d9b137 /backend/db/query.sql.go | |
| parent | e3502d9e649fe61bb0ba4046b2c23c0d78bc92e9 (diff) | |
| download | phperkaigi-2025-albatross-125e26b4d5c986f8531c098ecd5d291c1e1c7a76.tar.gz phperkaigi-2025-albatross-125e26b4d5c986f8531c098ecd5d291c1e1c7a76.tar.zst phperkaigi-2025-albatross-125e26b4d5c986f8531c098ecd5d291c1e1c7a76.zip | |
feat(backend): make `games.problem_id` non-null
Diffstat (limited to 'backend/db/query.sql.go')
| -rw-r--r-- | backend/db/query.sql.go | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/backend/db/query.sql.go b/backend/db/query.sql.go index cbef51d..583389e 100644 --- a/backend/db/query.sql.go +++ b/backend/db/query.sql.go @@ -136,7 +136,7 @@ func (q *Queries) CreateUserAuth(ctx context.Context, arg CreateUserAuthParams) const getGameByID = `-- name: GetGameByID :one SELECT game_id, game_type, state, display_name, duration_seconds, created_at, started_at, games.problem_id, problems.problem_id, title, description FROM games -LEFT JOIN problems ON games.problem_id = problems.problem_id +JOIN problems ON games.problem_id = problems.problem_id WHERE games.game_id = $1 LIMIT 1 ` @@ -149,10 +149,10 @@ type GetGameByIDRow struct { DurationSeconds int32 CreatedAt pgtype.Timestamp StartedAt pgtype.Timestamp - ProblemID *int32 - ProblemID_2 *int32 - Title *string - Description *string + ProblemID int32 + ProblemID_2 int32 + Title string + Description string } func (q *Queries) GetGameByID(ctx context.Context, gameID int32) (GetGameByIDRow, error) { @@ -295,7 +295,7 @@ func (q *Queries) ListGamePlayers(ctx context.Context, gameID int32) ([]ListGame const listGames = `-- name: ListGames :many SELECT game_id, game_type, state, display_name, duration_seconds, created_at, started_at, games.problem_id, problems.problem_id, title, description FROM games -LEFT JOIN problems ON games.problem_id = problems.problem_id +JOIN problems ON games.problem_id = problems.problem_id ORDER BY games.game_id ` @@ -307,10 +307,10 @@ type ListGamesRow struct { DurationSeconds int32 CreatedAt pgtype.Timestamp StartedAt pgtype.Timestamp - ProblemID *int32 - ProblemID_2 *int32 - Title *string - Description *string + ProblemID int32 + ProblemID_2 int32 + Title string + Description string } func (q *Queries) ListGames(ctx context.Context) ([]ListGamesRow, error) { @@ -347,7 +347,7 @@ func (q *Queries) ListGames(ctx context.Context) ([]ListGamesRow, error) { const listGamesForPlayer = `-- name: ListGamesForPlayer :many SELECT games.game_id, game_type, state, display_name, duration_seconds, created_at, started_at, games.problem_id, problems.problem_id, title, description, game_players.game_id, user_id FROM games -LEFT JOIN problems ON games.problem_id = problems.problem_id +JOIN problems ON games.problem_id = problems.problem_id JOIN game_players ON games.game_id = game_players.game_id WHERE game_players.user_id = $1 ORDER BY games.game_id @@ -361,10 +361,10 @@ type ListGamesForPlayerRow struct { DurationSeconds int32 CreatedAt pgtype.Timestamp StartedAt pgtype.Timestamp - ProblemID *int32 - ProblemID_2 *int32 - Title *string - Description *string + ProblemID int32 + ProblemID_2 int32 + Title string + Description string GameID_2 int32 UserID int32 } @@ -511,7 +511,7 @@ type UpdateGameParams struct { DisplayName string DurationSeconds int32 StartedAt pgtype.Timestamp - ProblemID *int32 + ProblemID int32 } func (q *Queries) UpdateGame(ctx context.Context, arg UpdateGameParams) error { |
