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

Method SoftDeleteWorkspaceAgentsByWorkspaceID

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

Marks every non-deleted agent belonging to the given workspace as deleted. Called alongside UpdateWorkspaceDeletedByID when a workspace itself is soft-deleted, so the agent instance-identity auth path (which filters on workspace_agents.deleted) doesn't keep seeing orphaned rows.

(ctx context.Context, workspaceID uuid.UUID)

Source from the content-addressed store, hash-verified

1134 // (which filters on workspace_agents.deleted) doesn't keep seeing
1135 // orphaned rows.
1136 SoftDeleteWorkspaceAgentsByWorkspaceID(ctx context.Context, workspaceID uuid.UUID) error
1137 // Overrides updated_at on the parent run without touching any
1138 // other column. Used by tests that need to stamp a run with a
1139 // specific timestamp after the InsertChatDebugStep CTE has

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