Search Results for

    Show / Hide Table of Contents

    Class MySqlIndexBuilderExtensions

    MySQL-specific extension methods for Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder.

    Inheritance
    System.Object
    MySqlIndexBuilderExtensions
    Namespace: MySql.EntityFrameworkCore.Extensions
    Assembly: MySql.EntityFrameworkCore.dll
    Version: 9.3.0
    Syntax
    public static class MySqlIndexBuilderExtensions

    Methods

    HasPrefixLength(IndexBuilder, Int32[])

    Sets prefix lengths for the index.

    Declaration
    public static IndexBuilder HasPrefixLength(this IndexBuilder indexBuilder, params int[] prefixLengths)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder

    The index builder.

    System.Int32[] prefixLengths

    The prefix lengths to set in the order of the index columns where specified. A value of 0 indicates, that the full length should be used for that column.

    Returns
    Type Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder

    The index builder.

    HasPrefixLength<TEntity>(IndexBuilder<TEntity>, Int32[])

    Sets prefix lengths for the index.

    Declaration
    public static IndexBuilder<TEntity> HasPrefixLength<TEntity>(this IndexBuilder<TEntity> indexBuilder, params int[] prefixLengths)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder

    The index builder.

    System.Int32[] prefixLengths

    The prefix lengths to set in the order of the index columns where specified. A value of 0 indicates, that the full length should be used for that column.

    Returns
    Type Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity>

    The index builder.

    Type Parameters
    Name Description
    TEntity

    IsFullText(IndexBuilder, Boolean, String)

    Sets a value indicating whether the index is full text.

    Declaration
    public static IndexBuilder IsFullText(this IndexBuilder indexBuilder, bool fullText = true, string parser = null)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder

    The index builder.

    System.Boolean fullText

    The value to set.

    System.String parser

    An optional argument (for example, "ngram"), that will be used in an WITH PARSER clause.

    Returns
    Type Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder

    The index builder.

    IsFullText<TEntity>(IndexBuilder<TEntity>, Boolean, String)

    Sets a value indicating whether the index is full text.

    Declaration
    public static IndexBuilder<TEntity> IsFullText<TEntity>(this IndexBuilder<TEntity> indexBuilder, bool fullText = true, string parser = null)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder

    The index builder.

    System.Boolean fullText

    The value to set.

    System.String parser

    An optional argument (for example, "ngram") that will be used in an WITH PARSER clause.

    Returns
    Type Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity>

    The index builder.

    Type Parameters
    Name Description
    TEntity

    IsSpatial(IndexBuilder, Boolean)

    Sets a value indicating whether the index is spartial.

    Declaration
    public static IndexBuilder IsSpatial(this IndexBuilder indexBuilder, bool spatial = true)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder

    The index builder.

    System.Boolean spatial

    The value to set.

    Returns
    Type Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder

    The index builder.

    IsSpatial<TEntity>(IndexBuilder<TEntity>, Boolean)

    Sets a value indicating whether the index is spartial.

    Declaration
    public static IndexBuilder<TEntity> IsSpatial<TEntity>(this IndexBuilder<TEntity> indexBuilder, bool spatial = true)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder

    The index builder.

    System.Boolean spatial

    The value to set.

    Returns
    Type Description
    Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity>

    The index builder.

    Type Parameters
    Name Description
    TEntity
    In This Article
    • Methods
      • HasPrefixLength(IndexBuilder, Int32[])
      • HasPrefixLength<TEntity>(IndexBuilder<TEntity>, Int32[])
      • IsFullText(IndexBuilder, Boolean, String)
      • IsFullText<TEntity>(IndexBuilder<TEntity>, Boolean, String)
      • IsSpatial(IndexBuilder, Boolean)
      • IsSpatial<TEntity>(IndexBuilder<TEntity>, Boolean)
    Back to top Copyright © 2021, 2025, Oracle and/or its affiliates.