Class IndexSchema
Schema of a table's index.
Inheritance
Namespace: Kros.Data.Schema
Assembly: Kros.Utils.dll
Syntax
public class IndexSchema
Constructors
IndexSchema(String)
Creates an instance of index with name indexName.
Declaration
public IndexSchema(string indexName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | indexName | Name of the index. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Value of |
| System.ArgumentException | Value of |
IndexSchema(String, IndexType)
Creates an instance of index of type indexType, with name indexName.
Declaration
public IndexSchema(string indexName, IndexType indexType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | indexName | Name of the index. |
| IndexType | indexType | Type of the index. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Value of |
| System.ArgumentException | Value of |
IndexSchema(String, IndexType, Boolean)
Creates an instance of index of type indexType, with name indexName and
setting if the index is clustered.
Declaration
public IndexSchema(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 |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Value of |
| System.ArgumentException | Value of |
Properties
Columns
List of index's columns.
Declaration
public IndexColumnSchemaCollection Columns { get; }
Property Value
| Type | Description |
|---|---|
| IndexColumnSchemaCollection |
IndexType
Index type.
Declaration
public IndexType IndexType { get; }
Property Value
| Type | Description |
|---|---|
| IndexType |
Name
Name of the index. It is not possible to set the name, if the index already belongs to some table (value of Table is not null)
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | Attempt to change the name, but index already belongs to some table. |
Table
Table, to which index belongs.
Declaration
public TableSchema Table { get; }
Property Value
| Type | Description |
|---|---|
| TableSchema |
Methods
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |