Class TableIndex

Represents a Microsoft SQL Server table index.

Inheritance
System.Object
TableIndex
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.BusinessFoundation.Data.Sql.Management
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 10.8.0
Syntax
public class TableIndex

Constructors

TableIndex(String, String, String[])

Initializes a new instance of the TableIndex class.

Declaration
public TableIndex(string tableName, string indexName, string[] indexKeys)
Parameters
Type Name Description
System.String tableName

Name of the table.

System.String indexName

Name of the index.

System.String[] indexKeys

The index keys.

Properties

IndexKeys

Gets the index keys.

Declaration
public Dictionary<string, bool> IndexKeys { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.Boolean>

The index keys.

IsClusteredIndex

Gets a value indicating whether this instance is clustered index.

Declaration
public bool IsClusteredIndex { get; }
Property Value
Type Description
System.Boolean

true if this instance is clustered index; otherwise, false.

IsPrimaryKeyIndex

Gets a value indicating whether this instance is primary key index.

Declaration
public bool IsPrimaryKeyIndex { get; }
Property Value
Type Description
System.Boolean

true if this instance is primary key index; otherwise, false.

Methods

CreateIndex()

Creates the index.

Declaration
public void CreateIndex()

DropIndex()

Drops the index.

Declaration
public void DropIndex()

GetTableIndex(String)

Gets the index of the table.

Declaration
public static TableIndex[] GetTableIndex(string tableName)
Parameters
Type Name Description
System.String tableName

Name of the table.

Returns
Type Description
TableIndex[]