Show / Hide Table of Contents

    Class IndexSchemaCollection

    List of indexes for table TableSchema.

    Inheritance
    System.Object
    System.Collections.ObjectModel.Collection<IndexSchema>
    System.Collections.ObjectModel.KeyedCollection<System.String, IndexSchema>
    IndexSchemaCollection
    Namespace: Kros.Data.Schema
    Assembly: Kros.Utils.dll
    Syntax
    public class IndexSchemaCollection : KeyedCollection<string, IndexSchema>, IList<IndexSchema>, ICollection<IndexSchema>, IList, ICollection, IReadOnlyList<IndexSchema>, IReadOnlyCollection<IndexSchema>, IEnumerable<IndexSchema>, IEnumerable
    Remarks

    To the indexes added to this list is automatically set their Table. Index can belong only to one table.

    Constructors

    IndexSchemaCollection(TableSchema)

    Creates a new index list for table.

    Declaration
    public IndexSchemaCollection(TableSchema table)
    Parameters
    Type Name Description
    TableSchema table

    Table to which index list belongs.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Value of table is null.

    Properties

    Table

    The table to which belongs this IndexSchemaCollection.

    Declaration
    public TableSchema Table { get; }
    Property Value
    Type Description
    TableSchema

    Methods

    Add(String)

    Creates an instance of index with name indexName. Created index is added to the list.

    Declaration
    public IndexSchema Add(string indexName)
    Parameters
    Type Name Description
    System.String indexName

    Name of the index.

    Returns
    Type Description
    IndexSchema

    Created index schema.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Value of indexName is null.

    System.ArgumentException

    Value of indexName is empty string, or string containing only whitespace characters.

    Add(String, IndexType)

    Creates an instance of index of type indexType, with name indexName. Created index is added to the list.

    Declaration
    public IndexSchema Add(string indexName, IndexType indexType)
    Parameters
    Type Name Description
    System.String indexName

    Name of the index.

    IndexType indexType

    Type of the index.

    Returns
    Type Description
    IndexSchema

    Created index schema.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Value of indexName is null.

    System.ArgumentException

    Value of indexName is empty string, or string containing only whitespace characters.

    Add(String, IndexType, Boolean)

    Creates an instance of index of type indexType, with name indexName and setting if the index is clustered. Created index is added to the list.

    Declaration
    public IndexSchema Add(string indexName, IndexType indexType, bool clustered)
    Parameters
    Type Name Description
    System.String indexName

    Name of the index.

    IndexType indexType

    Type of the index.

    System.Boolean clustered

    Specifies, if the index is CLUSTERED.

    Returns
    Type Description
    IndexSchema

    Created index schema.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Value of indexName is null.

    System.ArgumentException

    Value of indexName is empty string, or string containing only whitespace characters.

    GetKeyForItem(IndexSchema)

    Declaration
    protected override string GetKeyForItem(IndexSchema item)
    Parameters
    Type Name Description
    IndexSchema item
    Returns
    Type Description
    System.String
    Overrides
    System.Collections.ObjectModel.KeyedCollection<System.String, Kros.Data.Schema.IndexSchema>.GetKeyForItem(Kros.Data.Schema.IndexSchema)

    InsertItem(Int32, IndexSchema)

    Declaration
    protected override void InsertItem(int index, IndexSchema item)
    Parameters
    Type Name Description
    System.Int32 index
    IndexSchema item
    Overrides
    System.Collections.ObjectModel.KeyedCollection<System.String, Kros.Data.Schema.IndexSchema>.InsertItem(System.Int32, Kros.Data.Schema.IndexSchema)

    RemoveItem(Int32)

    Declaration
    protected override void RemoveItem(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Overrides
    System.Collections.ObjectModel.KeyedCollection<System.String, Kros.Data.Schema.IndexSchema>.RemoveItem(System.Int32)
    Back to top KROS a.s.