24 lines
700 B
SQL
24 lines
700 B
SQL
-- Active: 1709890109198@@192.168.1.250@5436@sorare
|
|
-- name: CreateFixtures :copyfrom
|
|
INSERT INTO fixtures (slug, display_name, state, start_date, end_date, game_week)
|
|
VALUES ($1, $2, $3, $4, $5, $6);
|
|
|
|
-- name: CreateOrUpdateFixture :exec
|
|
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;
|
|
|
|
|
|
|
|
|