Files
OwnCord/Server/db/queries/sqlite/plugins.sql
T
J3vbandClaude Fable 5 9d8bbec375 chore(db): drop 18 sqlc queries with zero callers
Each verified: the generated dbgen method's only references were the
.sql definition and dbgen output itself (no wrapper in db/*.go, no
test, no script). ArchiveChannel, DeleteAttachment,
FindExistingDMChannel, GetDefaultRole, GetMessagesByChannel,
GetMessagesByChannelBeforeCursor, GetMessagesForAPIBeforeCursor,
GetPinnedMessageRows, GetPlugin, GetPluginByName, InsertDMChannel,
InsertDMOpenState, InsertDMParticipants, LinkAttachmentToMessage,
SetChannelMixingThreshold, SetChannelVoiceMaxVideo,
SetChannelVoiceQuality, UpdateVoiceSpeaking.

dbgen regenerated with the pinned sqlc v1.30.0 (132 → 114 queries);
sqlc-verify clean; db/service/ws suites green including -race.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 15:29:01 +02:00

26 lines
868 B
SQL

-- name: InstallPlugin :execresult
INSERT INTO plugins (name, version, manifest_json) VALUES (?, ?, ?)
ON CONFLICT(name) DO UPDATE SET version = excluded.version, manifest_json = excluded.manifest_json;
-- name: EnablePlugin :exec
UPDATE plugins SET enabled = 1 WHERE id = ?;
-- name: DisablePlugin :exec
UPDATE plugins SET enabled = 0 WHERE id = ?;
-- name: UninstallPlugin :exec
DELETE FROM plugins WHERE id = ?;
-- name: ListPlugins :many
SELECT id, name, version, enabled, manifest_json, installed_at FROM plugins ORDER BY name;
-- name: PluginKVGet :one
SELECT value FROM plugin_kv WHERE plugin_id = ? AND key = ?;
-- name: PluginKVSet :exec
INSERT INTO plugin_kv (plugin_id, key, value) VALUES (?, ?, ?)
ON CONFLICT(plugin_id, key) DO UPDATE SET value = excluded.value;
-- name: PluginKVDelete :exec
DELETE FROM plugin_kv WHERE plugin_id = ? AND key = ?;