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

Method UnarchiveChatByID

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

Unarchives a chat (and its children). Stale file references are handled automatically by FK cascades on chat_file_links: when dbpurge deletes a chat_files row, the corresponding chat_file_links rows are cascade-deleted by PostgreSQL.

(ctx context.Context, id uuid.UUID)

Source from the content-addressed store, hash-verified

1169 // dbpurge deletes a chat_files row, the corresponding
1170 // chat_file_links rows are cascade-deleted by PostgreSQL.
1171 UnarchiveChatByID(ctx context.Context, id uuid.UUID) ([]Chat, error)
1172 // This will always work regardless of the current state of the template version.
1173 UnarchiveTemplateVersion(ctx context.Context, arg UnarchiveTemplateVersionParams) error
1174 UnfavoriteWorkspace(ctx context.Context, id uuid.UUID) error

Callers 6

patchChatMethod · 0.65
UnarchiveChatByIDMethod · 0.65
TestDeleteOldChatFilesFunction · 0.65
UnarchiveChatByIDMethod · 0.65
TestChatsMethod · 0.65
UnarchiveChatMethod · 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

TestDeleteOldChatFilesFunction · 0.52
TestChatsMethod · 0.52