Search Results for

    Show / Hide Table of Contents
    View Source

    Class CreateIndexBuilder

    Provides a fluent builder for defining and creating database indexes as part of migration expressions.

    Inheritance
    object
    ExpressionBuilderBase<CreateIndexExpression>
    Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Index
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class CreateIndexBuilder : ExpressionBuilderBase<CreateIndexExpression>, ICreateIndexForTableBuilder, ICreateIndexOnColumnBuilder, IExecutableBuilder, ICreateIndexColumnOptionsBuilder, ICreateIndexOptionsBuilder, IFluentBuilder

    Constructors

    View Source

    CreateIndexBuilder(CreateIndexExpression)

    Initializes a new instance of the CreateIndexBuilder class with the specified create index expression.

    Declaration
    public CreateIndexBuilder(CreateIndexExpression expression)
    Parameters
    Type Name Description
    CreateIndexExpression expression

    The CreateIndexExpression that defines the index to be created.

    Properties

    View Source

    CurrentColumn

    Gets or sets the definition of the current column being added to the index.

    Declaration
    public IndexColumnDefinition? CurrentColumn { get; set; }
    Property Value
    Type Description
    IndexColumnDefinition

    Methods

    View Source

    Ascending()

    Marks the index column to be sorted in ascending order.

    Declaration
    public ICreateIndexOnColumnBuilder Ascending()
    Returns
    Type Description
    ICreateIndexOnColumnBuilder

    The builder to continue configuring the index column.

    View Source

    Clustered()

    Marks the index as clustered.

    Declaration
    public ICreateIndexOnColumnBuilder Clustered()
    Returns
    Type Description
    ICreateIndexOnColumnBuilder

    The ICreateIndexOnColumnBuilder instance for further index configuration.

    View Source

    Descending()

    Specifies that the index column should be sorted in descending order.

    Declaration
    public ICreateIndexOnColumnBuilder Descending()
    Returns
    Type Description
    ICreateIndexOnColumnBuilder

    The builder for configuring the index column.

    View Source

    Do()

    Executes.

    Declaration
    public void Do()
    View Source

    NonClustered()

    Specifies that the index should be created as non-clustered.

    Declaration
    public ICreateIndexOnColumnBuilder NonClustered()
    Returns
    Type Description
    ICreateIndexOnColumnBuilder

    An ICreateIndexOnColumnBuilder to specify the columns for the index.

    View Source

    OnColumn(string)

    Specifies the index column.

    Declaration
    public ICreateIndexColumnOptionsBuilder OnColumn(string columnName)
    Parameters
    Type Name Description
    string columnName
    Returns
    Type Description
    ICreateIndexColumnOptionsBuilder
    View Source

    OnTable(string)

    Specifies the table on which the index will be created.

    Declaration
    public ICreateIndexOnColumnBuilder OnTable(string tableName)
    Parameters
    Type Name Description
    string tableName

    The name of the table.

    Returns
    Type Description
    ICreateIndexOnColumnBuilder

    An ICreateIndexOnColumnBuilder to define the index columns.

    View Source

    WithOptions()

    Allows further configuration of index options for the current index creation operation.

    Declaration
    public ICreateIndexOptionsBuilder WithOptions()
    Returns
    Type Description
    ICreateIndexOptionsBuilder

    An ICreateIndexOptionsBuilder to specify index options.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX