summaryrefslogtreecommitdiff
path: root/src/sql/section_upsert.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql/section_upsert.sql')
-rw-r--r--src/sql/section_upsert.sql10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sql/section_upsert.sql b/src/sql/section_upsert.sql
new file mode 100644
index 0000000..4ca1025
--- /dev/null
+++ b/src/sql/section_upsert.sql
@@ -0,0 +1,10 @@
+INSERT INTO [at_section] (uuid,section_type,sequence,beats_per_bar,bar_count)
+ VALUES('%s','%s','%s','%s','%s')
+ ON CONFLICT(uuid) DO UPDATE SET
+ section_type=excluded.section_type
+ ,sequence=excluded.sequence
+ ,beats_per_bar=excluded.beats_per_bar
+ ,bar_count=excluded.bar_count
+ ,is_deleted=0
+ ,modification_dt=unixepoch('now')
+ WHERE uuid=excluded.uuid;