10 lines
343 B
SQL
10 lines
343 B
SQL
-- name: CreateFlagsGame :exec
|
|
INSERT INTO app_flags_games (uid, tags, question_amount) VALUES ($1, $2, $3) RETURNING (game_id, game_seed);
|
|
|
|
-- name: GetFlagsGame :one
|
|
SELECT * FROM app_flags_games WHERE game_id = $1 LIMIT 1;
|
|
|
|
-- name: UpdateFlagsGame :exec
|
|
UPDATE app_flags_games SET question_current = $1,
|
|
last_activity = CURRENT_TIMESTAMP;
|