Skip to content

Filtered indexes - throws #199

Description

@JaBistDuNarrisch

If you call this it throws. If not all providers accepts it we could distinguish and throw for the used provider. SQL Server supports adding filters for columns that are not part of the keycolumns array.

    Database.AddIndex("Blaaaa", new Index
    {
        Name = "UX_ddddd",
        Unique = true,
        Clustered = false,
        KeyColumns = ["IpaUserIdentifier"],
        FilterItems =
        [
            new FilterItem
            {
                ColumnName = "IpaUserIdentifier",
                Filter = FilterType.NotEqualTo,
                Value = null
            },
            new FilterItem
            {
                ColumnName = "Archive",
                Filter = FilterType.EqualTo,
                Value = 0
            }
        ]
    });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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