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

Method PinChatByID

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

Under READ COMMITTED, concurrent pin operations for the same owner may momentarily produce duplicate pin_order values because each CTE snapshot does not see the other's writes. The next pin/unpin/reorder operation's ROW_NUMBER() self-heals the sequence, so this is acceptable.

(ctx context.Context, id uuid.UUID)

Source from the content-addressed store, hash-verified

1094 // pin/unpin/reorder operation's ROW_NUMBER() self-heals the
1095 // sequence, so this is acceptable.
1096 PinChatByID(ctx context.Context, id uuid.UUID) error
1097 PopNextQueuedMessage(ctx context.Context, chatID uuid.UUID) (ChatQueuedMessage, error)
1098 ReduceWorkspaceAgentShareLevelToAuthenticatedByTemplate(ctx context.Context, templateID uuid.UUID) error
1099 RegisterWorkspaceProxy(ctx context.Context, arg RegisterWorkspaceProxyParams) (WorkspaceProxy, error)

Callers 6

patchChatMethod · 0.65
TestChatPinOrderQueriesFunction · 0.65
PinChatByIDMethod · 0.65
PinChatByIDMethod · 0.65
TestChatsMethod · 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 3

TestChatPinOrderQueriesFunction · 0.52
TestChatsMethod · 0.52