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

Method InsertAIProviderKey

coderd/database/queries.sql.go:353–372  ·  view source on GitHub ↗
(ctx context.Context, arg InsertAIProviderKeyParams)

Source from the content-addressed store, hash-verified

351}
352
353func (q *sqlQuerier) InsertAIProviderKey(ctx context.Context, arg InsertAIProviderKeyParams) (AIProviderKey, error) {
354 row := q.db.QueryRowContext(ctx, insertAIProviderKey,
355 arg.ID,
356 arg.ProviderID,
357 arg.APIKey,
358 arg.ApiKeyKeyID,
359 arg.CreatedAt,
360 arg.UpdatedAt,
361 )
362 var i AIProviderKey
363 err := row.Scan(
364 &i.ID,
365 &i.ProviderID,
366 &i.APIKey,
367 &i.ApiKeyKeyID,
368 &i.CreatedAt,
369 &i.UpdatedAt,
370 )
371 return i, err
372}
373
374const updateEncryptedAIProviderKey = `-- name: UpdateEncryptedAIProviderKey :one
375UPDATE

Callers

nothing calls this directly

Calls 2

QueryRowContextMethod · 0.80
ScanMethod · 0.45

Tested by

no test coverage detected