chore(coderd/database): remove unused UpdateChatMessageByID query (#27099)

Removes the `UpdateChatMessageByID` query. Its only non-generated
reference was its own dbauthz coverage test, so it is dead code.

> Generated by Coder Agents on behalf of @johnstcn.
This commit is contained in:
Cian Johnston
2026-07-08 19:02:19 +01:00
committed by GitHub
parent 344a97751e
commit 990f0a5529
7 changed files with 0 additions and 117 deletions
-49
View File
@@ -11644,55 +11644,6 @@ func (q *sqlQuerier) UpdateChatMCPServerIDs(ctx context.Context, arg UpdateChatM
return i, err
}
const updateChatMessageByID = `-- name: UpdateChatMessageByID :one
UPDATE
chat_messages
SET
model_config_id = COALESCE($1::uuid, model_config_id),
content = $2::jsonb
WHERE
id = $3::bigint
RETURNING
id, chat_id, model_config_id, created_at, role, content, visibility, input_tokens, output_tokens, total_tokens, reasoning_tokens, cache_creation_tokens, cache_read_tokens, context_limit, compressed, created_by, content_version, total_cost_micros, runtime_ms, deleted, provider_response_id, api_key_id, revision
`
type UpdateChatMessageByIDParams struct {
ModelConfigID uuid.NullUUID `db:"model_config_id" json:"model_config_id"`
Content pqtype.NullRawMessage `db:"content" json:"content"`
ID int64 `db:"id" json:"id"`
}
func (q *sqlQuerier) UpdateChatMessageByID(ctx context.Context, arg UpdateChatMessageByIDParams) (ChatMessage, error) {
row := q.db.QueryRowContext(ctx, updateChatMessageByID, arg.ModelConfigID, arg.Content, arg.ID)
var i ChatMessage
err := row.Scan(
&i.ID,
&i.ChatID,
&i.ModelConfigID,
&i.CreatedAt,
&i.Role,
&i.Content,
&i.Visibility,
&i.InputTokens,
&i.OutputTokens,
&i.TotalTokens,
&i.ReasoningTokens,
&i.CacheCreationTokens,
&i.CacheReadTokens,
&i.ContextLimit,
&i.Compressed,
&i.CreatedBy,
&i.ContentVersion,
&i.TotalCostMicros,
&i.RuntimeMs,
&i.Deleted,
&i.ProviderResponseID,
&i.APIKeyID,
&i.Revision,
)
return i, err
}
const updateChatPinOrder = `-- name: UpdateChatPinOrder :exec
WITH target_chat AS (
SELECT