Description
While using the Microsoft ScriptDom parser, I observed an inconsistency in the classification of properties within the CreateExternalModelStatement class.
Most properties are correctly identified as TSqlFragment types, including:
Location
ModelName
ApiFormat
LocalRuntimePath
Credential
Parameters
However, the MODEL_TYPE field is not classified as a TSqlFragment, which breaks consistency and complicates tooling that relies on uniform fragment types for parsing and analysis.
🔍 Expected Behavior
MODEL_TYPE should be exposed as a TSqlFragment, just like the other fields in CreateExternalModelStatement.
❌ Actual Behavior
MODEL_TYPE is not treated as a TSqlFragment, making it harder to traverse or extract metadata consistently across all fields.
🧪 Steps to Reproduce
- Parse a
CREATE EXTERNAL MODEL statement using ScriptDom.
- Inspect the resulting
CreateExternalModelStatement object.
- Observe that
MODEL_TYPE is not a TSqlFragment.
✅ Suggested Fix
Update the parser to classify MODEL_TYPE as a TSqlFragment for consistency and better support in downstream tooling.
📎 Additional Context
This change would improve the usability of ScriptDom for scenarios involving AST traversal, formatting, and metadata extraction.
Description
While using the Microsoft ScriptDom parser, I observed an inconsistency in the classification of properties within the
CreateExternalModelStatementclass.Most properties are correctly identified as
TSqlFragmenttypes, including:LocationModelNameApiFormatLocalRuntimePathCredentialParametersHowever, the
MODEL_TYPEfield is not classified as aTSqlFragment, which breaks consistency and complicates tooling that relies on uniform fragment types for parsing and analysis.🔍 Expected Behavior
MODEL_TYPEshould be exposed as aTSqlFragment, just like the other fields inCreateExternalModelStatement.❌ Actual Behavior
MODEL_TYPEis not treated as aTSqlFragment, making it harder to traverse or extract metadata consistently across all fields.🧪 Steps to Reproduce
CREATE EXTERNAL MODELstatement using ScriptDom.CreateExternalModelStatementobject.MODEL_TYPEis not aTSqlFragment.✅ Suggested Fix
Update the parser to classify
MODEL_TYPEas aTSqlFragmentfor consistency and better support in downstream tooling.📎 Additional Context
This change would improve the usability of ScriptDom for scenarios involving AST traversal, formatting, and metadata extraction.