(ctx context.Context, id uuid.UUID)
| 2420 | } |
| 2421 | |
| 2422 | func (q *querier) DeleteWorkspaceSubAgentByID(ctx context.Context, id uuid.UUID) error { |
| 2423 | workspace, err := q.db.GetWorkspaceByAgentID(ctx, id) |
| 2424 | if err != nil { |
| 2425 | return err |
| 2426 | } |
| 2427 | |
| 2428 | if err := q.authorizeContext(ctx, policy.ActionDeleteAgent, workspace); err != nil { |
| 2429 | return err |
| 2430 | } |
| 2431 | |
| 2432 | return q.db.DeleteWorkspaceSubAgentByID(ctx, id) |
| 2433 | } |
| 2434 | |
| 2435 | func (q *querier) DisableForeignKeysAndTriggers(ctx context.Context) error { |
| 2436 | if !testing.Testing() { |
nothing calls this directly
no test coverage detected