fix: use explicit client_type list instead of LIKE pattern

Replace '%-speech' pattern with explicit IN ('edge-speech') for both
ListProviders (exclusion) and ListSpeechProviders (inclusion). New
speech client types must be added to both queries.
This commit is contained in:
Acbox
2026-04-07 00:31:40 +08:00
parent ea40e6481a
commit fd6a2fd191
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ SELECT * FROM providers WHERE name = sqlc.arg(name);
-- name: ListProviders :many
SELECT * FROM providers
WHERE client_type NOT LIKE '%-speech'
WHERE client_type NOT IN ('edge-speech')
ORDER BY created_at DESC;
-- name: UpdateProvider :one
@@ -187,7 +187,7 @@ WHERE m.id = sqlc.arg(id)
-- name: ListSpeechProviders :many
SELECT * FROM providers
WHERE client_type LIKE '%-speech'
WHERE client_type IN ('edge-speech')
ORDER BY created_at DESC;
-- name: ListSpeechModels :many