Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ExplicitVisit method for some TSqlFragment descendant classes is never called

Open
#145 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp, sql
Domain
devtools

Research direction

Start with TSqlFragmentVisitor and its ExplicitVisit methods, then compare dispatch for DataModificationStatement with concrete descendants such as InsertStatement. Review how Visit and TSqlConcreteFragmentVisitor are intended to differ. Done means resolving the abstract-class dispatch behavior and documenting when ExplicitVisit, Visit, and TSqlConcreteFragmentVisitor should be used.

Written by the indexing model from the issue text.

Description

For example, TSqlFragmentVisitor has virtual method for visiting DataModificationStatement - ExplicitVisit(DataModificationStatement) which can be overridden and "used" for whatever reason in an app... The thing is - it is never called. There is no code invoking ExplicitVisit for this abstract class and many others. These methods are stillborn and it takes some time to realize that the code does not work and to discover why. For concrete descendants of DataModificationStatement (InsertStatement etc.) it does work as expected.

Consider removing such stillborn methods from TSqlFragmentVisitor or mark them sealed or start invoking them.

Also it'd be great to improve documentation: please elaborate scenarios in which ExplicitVisit method should be used instead of Visit, when TSqlConcreteFragmentVisitor should be utilized.

Dominant language
GAP
Stars
277
Forks
43
Avg merge
6d 17h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/SqlScriptDOM

All issues in microsoft/SqlScriptDOM

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.