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

Method UpsertAIModelPrices

coderd/database/querier.go:1364–1364  ·  view source on GitHub ↗

Upsert a batch of (provider, model) rows from a JSON array. Each element must have provider, model, and the four price fields; null prices are written as SQL NULL.

(ctx context.Context, seed json.RawMessage)

Source from the content-addressed store, hash-verified

1362 // must have provider, model, and the four price fields; null prices are
1363 // written as SQL NULL.
1364 UpsertAIModelPrices(ctx context.Context, seed json.RawMessage) error
1365 // Returns true if a new rows was inserted, false otherwise.
1366 UpsertAISeatState(ctx context.Context, arg UpsertAISeatStateParams) (bool, error)
1367 UpsertAnnouncementBanners(ctx context.Context, value string) error

Callers 5

UpsertAIModelPricesMethod · 0.65
UpsertAIModelPricesMethod · 0.65
TestAIBridgeMethod · 0.65
SeedFromBytesFunction · 0.65
TestSeedFromBytesFunction · 0.65

Implementers 5

sqlQueriercoderd/database/db.go
queryMetricsStorecoderd/database/dbmetrics/querymetrics
queriercoderd/database/dbauthz/dbauthz.go
MockStorecoderd/database/dbmock/dbmock.go
MockStoreMockRecordercoderd/database/dbmock/dbmock.go

Calls

no outgoing calls

Tested by 2

TestAIBridgeMethod · 0.52
TestSeedFromBytesFunction · 0.52