CreateIndexTask
Class CreateIndexTask
Creates an index if the index doesn't exists, otherwise the index is dropped and recreated.
Implements
Inherited Members
Namespace: ETLBox.ControlFlow
Assembly: ETLBox.dll
Syntax
Examples
CreateIndexTask.Create("indexname","tablename", indexColumns)
Constructors
CreateIndexTask()
Declaration
CreateIndexTask(string, string, IList<string>)
Declaration
Parameters
Type | Name | Description |
---|---|---|
string | indexName | |
string | tableName | |
IList<string> | indexColumns |
CreateIndexTask(string, string, IList<string>, IList<string>)
Declaration
Parameters
Type | Name | Description |
---|---|---|
string | indexName | |
string | tableName | |
IList<string> | indexColumns | |
IList<string> | includeColumns |
Properties
IN
The formatted name of the index
Declaration
Property Value
Type | Description |
---|---|
ObjectNameDescriptor |
IncludeColumns
A list of included column names for the index.
Declaration
Property Value
Type | Description |
---|---|
IList<string> |
IndexColumns
A list of column names for the index
Declaration
Property Value
Type | Description |
---|---|
IList<string> |
IndexName
The name of the index
Declaration
Property Value
Type | Description |
---|---|
string |
IsClustered
Set the index as a clustered index
Declaration
Property Value
Type | Description |
---|---|
bool |
IsUnique
Set the index as Unique.
Declaration
Property Value
Type | Description |
---|---|
bool |
Sql
The sql code used to generate the index
Declaration
Property Value
Type | Description |
---|---|
string |
TN
The formatted name of the table.
Declaration
Property Value
Type | Description |
---|---|
ObjectNameDescriptor |
TableName
The name of the table the index is based on.
Declaration
Property Value
Type | Description |
---|---|
string |
Methods
CreateOrRecreate()
Runs the sql to (re)create the index on a table.
Declaration
CreateOrRecreate(IConnectionManager, string, string, IList<string>)
Creates an index. If the index exists, it is dropped and recreated.
Declaration
Parameters
Type | Name | Description |
---|---|---|
IConnectionManager | connectionManager | The connection manager of the database you want to connect |
string | indexName | The name of the index |
string | tableName | The name of the table the index is based on |
IList<string> | indexColumns | The name of the columns for the index |
CreateOrRecreate(IConnectionManager, string, string, IList<string>, IList<string>)
Creates an index. If the index exists, it is dropped and recreated.
Declaration
Parameters
Type | Name | Description |
---|---|---|
IConnectionManager | connectionManager | The connection manager of the database you want to connect |
string | indexName | The name of the index |
string | tableName | The name of the table the index is based on |
IList<string> | indexColumns | The name of the columns for the index |
IList<string> | includeColumns | The name of the columns that are included in the index. |
CreateOrRecreate(string, string, IList<string>)
Creates an index. If the index exists, it is dropped and recreated.
Declaration
Parameters
Type | Name | Description |
---|---|---|
string | indexName | The name of the index |
string | tableName | The name of the table the index is based on |
IList<string> | indexColumns | The name of the columns for the index |
CreateOrRecreate(string, string, IList<string>, IList<string>)
Creates an index. If the index exists, it is dropped and recreated.
Declaration
Parameters
Type | Name | Description |
---|---|---|
string | indexName | The name of the index |
string | tableName | The name of the table the index is based on |
IList<string> | indexColumns | The name of the columns for the index |
IList<string> | includeColumns | The name of the columns that are included in the index |