-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Summary
Add a --dry-run (-dr) CLI option that lists all recursively referenced views and exits without performing any inlining. Useful for understanding the view dependency tree before committing to an inline operation.
Expected behavior
sqlinliner -cs "Server=.;Database=Test;Integrated Security=true" -vn "dbo.VHeavy" --dry-runShould output the fully qualified names of all referenced views (recursively), then exit.
Implementation notes
From the previous attempt (PR #74, branch codex/add-dry-run-option-for-referenced-views):
- Add a static
DatabaseView.GetReferencedViews(DatabaseConnection, string viewSql)method that recursively resolves all nested views into aDictionary<string, DatabaseView> - Add
--dry-run/-droption toProgram.cs(using the new System.CommandLine 2.0.3 API) - When
--dry-runis set, callGetReferencedViews, print each view name, and return early
The previous branch is stale and won't merge due to the System.CommandLine 2.0.3 migration and test suite changes on main.
Supersedes PR #74.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels