Skip to content

Add schema lookup to plan viewer operator right-click#170

Merged
erikdarlingdata merged 1 commit into
devfrom
feature/plan-viewer-schema-lookup
Apr 6, 2026
Merged

Add schema lookup to plan viewer operator right-click#170
erikdarlingdata merged 1 commit into
devfrom
feature/plan-viewer-schema-lookup

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

  • Right-click a data access operator in the plan viewer → Show Indexes / Show Table Definition
  • Connection string flows from QuerySessionControl to PlanViewerControl
  • Only data access operators (scan, seek, lookup, insert/update/delete) get the menu items
  • Temp objects (#temp, @table_var, worktables) are excluded
  • Items are disabled when no connection is available (e.g., file-opened plans)
  • Results shown in a popup window with SQL syntax highlighting and copy context menu

Partial fix for #166. Connection toolbar for file-mode plans is a follow-up.

Test plan

  • Connect to server, capture plan, right-click Clustered Index Scan → Show Indexes works
  • Show Table Definition works with correct DDL output
  • Non-data operators (Sort, Hash Match, etc.) don't show schema items
  • Plans from file (no connection) → schema items disabled
  • Columnstore, partitioned, compressed tables format correctly

🤖 Generated with Claude Code

Right-click a data access operator (scan, seek, lookup, insert, update,
delete) in the plan viewer to see Show Indexes and Show Table Definition.
Uses the connection from the query editor session.

- Pass connection string from QuerySessionControl to PlanViewerControl
- Add schema items to existing node context menu
- Filter by operator type (data access only)
- Exclude temp objects (#temp, @table_var, worktables)
- Items disabled when no connection is available
- Results shown in a popup window with SQL syntax highlighting
- Copy/Copy All/Select All context menu on results

Partial fix for #166 (plan viewer side). Connection toolbar for file
mode plans is not yet implemented.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 3b1aedd into dev Apr 6, 2026
2 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/plan-viewer-schema-lookup branch April 9, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant