2024-03-22 18:50:22 +00:00
|
|
|
-- name: CreateOrUpdateFixtures :batchexec
|
2024-03-21 05:34:38 +00:00
|
|
|
INSERT INTO fixtures (slug, display_name, state, start_date, end_date, game_week)
|
|
|
|
VALUES ($1, $2, $3, $4, $5, $6)
|
|
|
|
ON CONFLICT (slug) DO UPDATE
|
|
|
|
SET display_name = $2, state = $3, start_date = $4, end_date = $5, game_week = $6;
|
|
|
|
|
|
|
|
-- name: GetFixtureBySlug :one
|
|
|
|
SELECT * FROM fixtures WHERE slug = $1;
|
|
|
|
|
|
|
|
-- name: GetFixtureByGameWeek :one
|
|
|
|
SELECT * FROM fixtures WHERE game_week = $1;
|
|
|
|
|
|
|
|
-- name: GetAllFixtures :many
|
|
|
|
SELECT * FROM fixtures;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|