From 62dae6011db94dd52c3ac0fce517c6e9cc0abcf6 Mon Sep 17 00:00:00 2001
From: Jonathan Bradley <jcb@pikum.xyz>
Date: Fri, 10 Oct 2025 17:07:45 -0400
Subject: pke-at: first-pass storage interface

---
 src/sql/song_upsert.sql | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 src/sql/song_upsert.sql

(limited to 'src/sql/song_upsert.sql')

diff --git a/src/sql/song_upsert.sql b/src/sql/song_upsert.sql
new file mode 100644
index 0000000..d0e4fcc
--- /dev/null
+++ b/src/sql/song_upsert.sql
@@ -0,0 +1,10 @@
+INSERT INTO [at_song] (uuid,ccli,title,arrangement,beats_per_minute)
+	VALUES('%s','%s','%s','%s','%s')
+		ON CONFLICT(uuid) DO UPDATE SET
+			ccli=excluded.ccli
+			,title=excluded.title
+			,arrangement=excluded.arrangement
+			,beats_per_minute=excluded.beats_per_minute
+			,is_deleted=0
+			,modification_dt=unixepoch('now')
+		WHERE uuid=excluded.uuid;
-- 
cgit v1.2.3

