MCPcopy Index your code
hub / github.com/coder/coder / UpdateEncryptedAIProviderKey

Method UpdateEncryptedAIProviderKey

coderd/database/queries.sql.go:396–408  ·  view source on GitHub ↗

Updates only the encrypted columns (api_key, api_key_key_id) and the updated_at timestamp on a row. Used by the dbcrypt key rotation utility to re-encrypt or decrypt rows in place.

(ctx context.Context, arg UpdateEncryptedAIProviderKeyParams)

Source from the content-addressed store, hash-verified

394// the updated_at timestamp on a row. Used by the dbcrypt key
395// rotation utility to re-encrypt or decrypt rows in place.
396func (q *sqlQuerier) UpdateEncryptedAIProviderKey(ctx context.Context, arg UpdateEncryptedAIProviderKeyParams) (AIProviderKey, error) {
397 row := q.db.QueryRowContext(ctx, updateEncryptedAIProviderKey, arg.APIKey, arg.ApiKeyKeyID, arg.ID)
398 var i AIProviderKey
399 err := row.Scan(
400 &i.ID,
401 &i.ProviderID,
402 &i.APIKey,
403 &i.ApiKeyKeyID,
404 &i.CreatedAt,
405 &i.UpdatedAt,
406 )
407 return i, err
408}
409
410const deleteAIProviderByID = `-- name: DeleteAIProviderByID :exec
411UPDATE

Callers

nothing calls this directly

Calls 2

QueryRowContextMethod · 0.80
ScanMethod · 0.45

Tested by

no test coverage detected