Skip to content

IndexDefinition class is derived from TSqlStatement however it is not a statement #114

@IVNSTN

Description

@IVNSTN

Inline indices are represented in ScriptDom as instances of IndexDefinition class. These index definitions in T-SQL can only be a part of CREATE TABLE/DECLARE TABLE statement and cannot be used as separate statements.

There is also IndexStatement class which represents CREATE/ALTER/DROP INDEX statements (well, drop has a separate implementation) which are true standalone statements.

While developing code analysis, code formatting, coverage computation tools one cannot be sure that descendant of TSqlStatement class is actually a statement and has to manually exclude/ignore instances of "false-statement" classes such as IndexDefinition.

It'd be great if such expressions which cannot exist separately from a surrounding statement were not derived from TSqlStatement class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions