From eb82fdb2dc0903e6125014abd64aceab42c8eb35 Mon Sep 17 00:00:00 2001
From: Runxi Yu <me@runxiyu.org>
Date: Tue, 12 Aug 2025 11:01:07 +0800
Subject: Refactor

---
 forged/sql/queries/repos.sql | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 forged/sql/queries/repos.sql

(limited to 'forged/sql/queries/repos.sql')

diff --git a/forged/sql/queries/repos.sql b/forged/sql/queries/repos.sql
new file mode 100644
index 0000000..cacc5b8
--- /dev/null
+++ b/forged/sql/queries/repos.sql
@@ -0,0 +1,9 @@
+-- name: InsertRepo :one
+INSERT INTO repos (group_id, name, description, contrib_requirements)
+VALUES ($1, $2, $3, $4)
+RETURNING id;
+
+-- name: GetRepoByGroupAndName :one
+SELECT id, name, COALESCE(description, '') AS description
+FROM repos
+WHERE group_id = $1 AND name = $2;
-- 
cgit v1.2.3

