语法糖

This commit is contained in:
2026-03-18 17:29:42 +08:00
parent ff60642c62
commit 23b9f101b3
4 changed files with 230 additions and 1 deletions

View File

@ -0,0 +1,5 @@
-- 插入语法糖,如果同一用户下名称已存在则更新内容
INSERT INTO syntactic_sugar (name, content, belong_to, channel_id)
VALUES (?, ?, ?, ?)
ON CONFLICT(name, channel_id, belong_to) DO UPDATE SET
content = excluded.content;