Class IndexSchemaCollection
List of indexes for table TableSchema.
Inheritance
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 |
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 |
System.ArgumentException | Value of |
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 |
System.ArgumentException | Value of |
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 |
Returns
Type | Description |
---|---|
IndexSchema | Created index schema. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Value of |
System.ArgumentException | Value of |
GetKeyForItem(IndexSchema)
Declaration
protected override string GetKeyForItem(IndexSchema item)
Parameters
Type | Name | Description |
---|---|---|
IndexSchema | item |
Returns
Type | Description |
---|---|
System.String |
Overrides
InsertItem(Int32, IndexSchema)
Declaration
protected override void InsertItem(int index, IndexSchema item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
IndexSchema | item |
Overrides
RemoveItem(Int32)
Declaration
protected override void RemoveItem(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |