mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-21 02:42:07 -05:00
17 lines
614 B
TypeScript
17 lines
614 B
TypeScript
import { sql } from "~/db/sql";
|
|
import type { Tables } from "~/db/tables";
|
|
|
|
const stm = sql.prepare(/* sql */ `
|
|
insert into "TournamentMatchGameResult"
|
|
("matchId", "stageId", "mode", "winnerTeamId", "reporterId", "number", "source", "opponentOnePoints", "opponentTwoPoints")
|
|
values
|
|
(@matchId, @stageId, @mode, @winnerTeamId, @reporterId, @number, @source, @opponentOnePoints, @opponentTwoPoints)
|
|
returning *
|
|
`);
|
|
|
|
export function insertTournamentMatchGameResult(
|
|
args: Omit<Tables["TournamentMatchGameResult"], "id" | "createdAt">,
|
|
) {
|
|
return stm.get(args) as Tables["TournamentMatchGameResult"];
|
|
}
|