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

Method SelectUsageEventsForPublishing

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

Note that this selects from the CTE, not the original table. The CTE is named the same as the original table to trick sqlc into reusing the existing struct for the table. The CTE and the reorder is required because UPDATE doesn't guarantee order.

(ctx context.Context, now time.Time)

Source from the content-addressed store, hash-verified

1119 // for the table.
1120 // The CTE and the reorder is required because UPDATE doesn't guarantee order.
1121 SelectUsageEventsForPublishing(ctx context.Context, now time.Time) ([]UsageEvent, error)
1122 SoftDeleteChatMessageByID(ctx context.Context, id int64) error
1123 SoftDeleteChatMessagesAfterID(ctx context.Context, arg SoftDeleteChatMessagesAfterIDParams) error
1124 SoftDeleteContextFileMessages(ctx context.Context, chatID uuid.UUID) error

Callers 8

TestUsageEventsMethod · 0.65
publishOnceMethod · 0.65
TestPublisherClaimExpiryFunction · 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 5

TestUsageEventsMethod · 0.52
TestPublisherClaimExpiryFunction · 0.52