Search Results for

    Show / Hide Table of Contents

    Class NpgsqlIndexBuilderExtensions

    Npgsql specific extension methods for .

    Inheritance
    object
    NpgsqlIndexBuilderExtensions
    Namespace: Microsoft.EntityFrameworkCore
    Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
    Syntax
    public static class NpgsqlIndexBuilderExtensions

    Methods

    | Improve this Doc View Source

    AreNullsDistinct(IConventionIndexBuilder, bool, bool)

    Specifies whether for a unique index, null values should be considered distinct (not equal). The default is that they are distinct, so that a unique index could contain multiple null values in a column.

    Declaration
    public static IConventionIndexBuilder? AreNullsDistinct(this IConventionIndexBuilder indexBuilder, bool nullsDistinct = true, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    bool nullsDistinct

    Whether nulls should be considered distinct.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    IConventionIndexBuilder?

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/sql-createindex.html

    | Improve this Doc View Source

    AreNullsDistinct(IndexBuilder, bool)

    Specifies whether for a unique index, null values should be considered distinct (not equal). The default is that they are distinct, so that a unique index could contain multiple null values in a column.

    Declaration
    public static IndexBuilder AreNullsDistinct(this IndexBuilder indexBuilder, bool nullsDistinct = true)
    Parameters
    Type Name Description
    IndexBuilder indexBuilder

    The builder for the index being configured.

    bool nullsDistinct

    Whether nulls should be considered distinct.

    Returns
    Type Description
    IndexBuilder

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/sql-createindex.html

    | Improve this Doc View Source

    AreNullsDistinct<TEntity>(IndexBuilder<TEntity>, bool)

    Specifies whether for a unique index, null values should be considered distinct (not equal). The default is that they are distinct, so that a unique index could contain multiple null values in a column.

    Declaration
    public static IndexBuilder<TEntity> AreNullsDistinct<TEntity>(this IndexBuilder<TEntity> indexBuilder, bool nullsDistinct = true)
    Parameters
    Type Name Description
    IndexBuilder<><TEntity> indexBuilder

    The builder for the index being configured.

    bool nullsDistinct

    Whether nulls should be considered distinct.

    Returns
    Type Description
    IndexBuilder<><TEntity>

    A builder to further configure the index.

    Type Parameters
    Name Description
    TEntity
    Remarks

    https://www.postgresql.org/docs/current/sql-createindex.html

    | Improve this Doc View Source

    CanSetAreNullsDistinct(IConventionIndexBuilder, bool, bool)

    Specifies whether for a unique index, null values should be considered distinct (not equal). The default is that they are distinct, so that a unique index could contain multiple null values in a column.

    Declaration
    public static bool CanSetAreNullsDistinct(this IConventionIndexBuilder indexBuilder, bool nullsDistinct = true, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    bool nullsDistinct

    Whether nulls should be considered distinct.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    true if the index can be configured with the method

    Remarks

    https://www.postgresql.org/docs/current/sql-createindex.html

    | Improve this Doc View Source

    CanSetCollation(IConventionIndexBuilder, IReadOnlyList<string>?, bool)

    Returns a value indicating whether the PostgreSQL index collation can be set.

    Declaration
    public static bool CanSetCollation(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? values, bool fromDataAnnotation)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><string>? values

    The sort options to use for each column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-collations.html

    | Improve this Doc View Source

    CanSetHasCollation(IConventionIndexBuilder, IReadOnlyList<string>?, bool)

    Returns a value indicating whether the PostgreSQL index collation can be set.

    Declaration
    public static bool CanSetHasCollation(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? values, bool fromDataAnnotation)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><string>? values

    The sort options to use for each column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-collations.html

    | Improve this Doc View Source

    CanSetHasMethod(IConventionIndexBuilder, string?, bool)

    The PostgreSQL index method to be used. Null selects the default (currently btree).

    Declaration
    public static bool CanSetHasMethod(this IConventionIndexBuilder indexBuilder, string? method, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    string? method

    The name of the index.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    true if the index can be configured with the method

    Remarks

    http://www.postgresql.org/docs/current/static/sql-createindex.html

    | Improve this Doc View Source

    CanSetHasNullSortOrder(IConventionIndexBuilder, IReadOnlyList<NullSortOrder>?, bool)

    Returns a value indicating whether the PostgreSQL index null sort ordering can be set.

    Declaration
    public static bool CanSetHasNullSortOrder(this IConventionIndexBuilder indexBuilder, IReadOnlyList<NullSortOrder>? values, bool fromDataAnnotation)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><NullSortOrder>? values

    The sort order to use for each column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-ordering.html

    | Improve this Doc View Source

    CanSetHasOperators(IConventionIndexBuilder, IReadOnlyList<string>?, bool)

    Returns a value indicating whether the PostgreSQL index operators can be set.

    Declaration
    public static bool CanSetHasOperators(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? operators, bool fromDataAnnotation)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><string>? operators

    The operators to use for each column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    true if the index can be configured with the method.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-opclass.html

    | Improve this Doc View Source

    CanSetHasSortOrder(IConventionIndexBuilder, IReadOnlyList<SortOrder>?, bool)

    Returns a value indicating whether the PostgreSQL index sort ordering can be set.

    Declaration
    public static bool CanSetHasSortOrder(this IConventionIndexBuilder indexBuilder, IReadOnlyList<SortOrder>? values, bool fromDataAnnotation)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><SortOrder>? values

    The sort order to use for each column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-ordering.html

    | Improve this Doc View Source

    CanSetInclude(IConventionIndexBuilder, IReadOnlyList<string>?, bool)

    Returns a value indicating whether the given include properties can be set.

    Declaration
    public static bool CanSetInclude(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><string>? propertyNames

    An array of property names to be used in 'include' clause.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    true if the given include properties can be set.

    | Improve this Doc View Source

    CanSetIncludeProperties(IConventionIndexBuilder, IReadOnlyList<string>?, bool)

    Returns a value indicating whether the given include properties can be set.

    Declaration
    public static bool CanSetIncludeProperties(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><string>? propertyNames

    An array of property names to be used in 'include' clause.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    true if the given include properties can be set.

    | Improve this Doc View Source

    CanSetIsCreatedConcurrently(IConventionIndexBuilder, bool?, bool)

    Returns a value indicating whether concurrent creation for the index can be set.

    Declaration
    public static bool CanSetIsCreatedConcurrently(this IConventionIndexBuilder indexBuilder, bool? createdConcurrently, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    bool? createdConcurrently

    A value indicating whether the index is created with the "concurrently" option.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/sql-createindex.html#SQL-CREATEINDEX-CONCURRENTLY

    | Improve this Doc View Source

    CanSetIsTsVectorExpressionIndex(IConventionIndexBuilder, string?, bool)

    Returns a value indicating whether the index can be configured as a full-text tsvector expression index.

    Declaration
    public static bool CanSetIsTsVectorExpressionIndex(this IConventionIndexBuilder indexBuilder, string? config, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    string? config

    The text search configuration for this generated tsvector property, or null if this is not a generated tsvector property.

    See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    true if the index can be configured as a full-text tsvector expression index.

    | Improve this Doc View Source

    CanSetMethod(IConventionIndexBuilder, string?, bool)

    The PostgreSQL index method to be used. Null selects the default (currently btree).

    Declaration
    public static bool CanSetMethod(this IConventionIndexBuilder indexBuilder, string? method, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    string? method

    The name of the index.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    true if the index can be configured with the method

    Remarks

    http://www.postgresql.org/docs/current/static/sql-createindex.html

    | Improve this Doc View Source

    CanSetNullSortOrder(IConventionIndexBuilder, IReadOnlyList<NullSortOrder>?, bool)

    Returns a value indicating whether the PostgreSQL index null sort ordering can be set.

    Declaration
    public static bool CanSetNullSortOrder(this IConventionIndexBuilder indexBuilder, IReadOnlyList<NullSortOrder>? values, bool fromDataAnnotation)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><NullSortOrder>? values

    The sort order to use for each column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-ordering.html

    | Improve this Doc View Source

    CanSetOperators(IConventionIndexBuilder, IReadOnlyList<string>?, bool)

    Returns a value indicating whether the PostgreSQL index operators can be set.

    Declaration
    public static bool CanSetOperators(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? operators, bool fromDataAnnotation)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><string>? operators

    The operators to use for each column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    true if the index can be configured with the method.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-opclass.html

    | Improve this Doc View Source

    CanSetSortOrder(IConventionIndexBuilder, IReadOnlyList<SortOrder>?, bool)

    Returns a value indicating whether the PostgreSQL index sort ordering can be set.

    Declaration
    public static bool CanSetSortOrder(this IConventionIndexBuilder indexBuilder, IReadOnlyList<SortOrder>? values, bool fromDataAnnotation)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><SortOrder>? values

    The sort order to use for each column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-ordering.html

    | Improve this Doc View Source

    CanSetToTsVector(IConventionIndexBuilder, string?, bool)

    Returns a value indicating whether the index can be configured as a full-text tsvector expression index.

    Declaration
    public static bool CanSetToTsVector(this IConventionIndexBuilder indexBuilder, string? config, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    string? config

    The text search configuration for this generated tsvector property, or null if this is not a generated tsvector property.

    See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool

    true if the index can be configured as a full-text tsvector expression index.

    | Improve this Doc View Source

    HasCollation(IConventionIndexBuilder, IReadOnlyList<string>?, bool)

    The PostgreSQL index collation to be used.

    Declaration
    public static IConventionIndexBuilder? HasCollation(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? values, bool fromDataAnnotation)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><string>? values

    The sort options to use for each column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    IConventionIndexBuilder?

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-collations.html

    | Improve this Doc View Source

    HasCollation(IndexBuilder, params string[]?)

    The PostgreSQL index collation to be used.

    Declaration
    public static IndexBuilder HasCollation(this IndexBuilder indexBuilder, params string[]? values)
    Parameters
    Type Name Description
    IndexBuilder indexBuilder

    The builder for the index being configured.

    string[] values

    The sort options to use for each column.

    Returns
    Type Description
    IndexBuilder

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-collations.html

    | Improve this Doc View Source

    HasCollation<TEntity>(IndexBuilder<TEntity>, params string[]?)

    The PostgreSQL index collation to be used.

    Declaration
    public static IndexBuilder<TEntity> HasCollation<TEntity>(this IndexBuilder<TEntity> indexBuilder, params string[]? values)
    Parameters
    Type Name Description
    IndexBuilder<><TEntity> indexBuilder

    The builder for the index being configured.

    string[] values

    The sort options to use for each column.

    Returns
    Type Description
    IndexBuilder<><TEntity>

    A builder to further configure the index.

    Type Parameters
    Name Description
    TEntity
    Remarks

    https://www.postgresql.org/docs/current/static/indexes-collations.html

    | Improve this Doc View Source

    HasMethod(IConventionIndexBuilder, string?, bool)

    The PostgreSQL index method to be used. Null selects the default (currently btree).

    Declaration
    public static IConventionIndexBuilder? HasMethod(this IConventionIndexBuilder indexBuilder, string? method, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    string? method

    The name of the index.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    IConventionIndexBuilder?

    A builder to further configure the index.

    Remarks

    http://www.postgresql.org/docs/current/static/sql-createindex.html

    | Improve this Doc View Source

    HasMethod(IndexBuilder, string?)

    The PostgreSQL index method to be used. Null selects the default (currently btree).

    Declaration
    public static IndexBuilder HasMethod(this IndexBuilder indexBuilder, string? method)
    Parameters
    Type Name Description
    IndexBuilder indexBuilder

    The builder for the index being configured.

    string? method

    The name of the index.

    Returns
    Type Description
    IndexBuilder

    A builder to further configure the index.

    Remarks

    http://www.postgresql.org/docs/current/static/sql-createindex.html

    | Improve this Doc View Source

    HasMethod<TEntity>(IndexBuilder<TEntity>, string?)

    The PostgreSQL index method to be used. Null selects the default (currently btree).

    Declaration
    public static IndexBuilder<TEntity> HasMethod<TEntity>(this IndexBuilder<TEntity> indexBuilder, string? method)
    Parameters
    Type Name Description
    IndexBuilder<><TEntity> indexBuilder

    The builder for the index being configured.

    string? method

    The name of the index.

    Returns
    Type Description
    IndexBuilder<><TEntity>

    A builder to further configure the index.

    Type Parameters
    Name Description
    TEntity
    Remarks

    http://www.postgresql.org/docs/current/static/sql-createindex.html

    | Improve this Doc View Source

    HasNullSortOrder(IConventionIndexBuilder, IReadOnlyList<NullSortOrder>?, bool)

    The PostgreSQL index NULL sort ordering to be used.

    Declaration
    public static IConventionIndexBuilder? HasNullSortOrder(this IConventionIndexBuilder indexBuilder, IReadOnlyList<NullSortOrder>? values, bool fromDataAnnotation)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><NullSortOrder>? values

    The sort order to use for each column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    IConventionIndexBuilder?

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-ordering.html

    | Improve this Doc View Source

    HasNullSortOrder(IndexBuilder, params NullSortOrder[]?)

    The PostgreSQL index NULL sort ordering to be used.

    Declaration
    public static IndexBuilder HasNullSortOrder(this IndexBuilder indexBuilder, params NullSortOrder[]? values)
    Parameters
    Type Name Description
    IndexBuilder indexBuilder

    The builder for the index being configured.

    NullSortOrder[] values

    The sort order to use for each column.

    Returns
    Type Description
    IndexBuilder

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-ordering.html

    | Improve this Doc View Source

    HasNullSortOrder<TEntity>(IndexBuilder<TEntity>, params NullSortOrder[]?)

    The PostgreSQL index NULL sort ordering to be used.

    Declaration
    public static IndexBuilder<TEntity> HasNullSortOrder<TEntity>(this IndexBuilder<TEntity> indexBuilder, params NullSortOrder[]? values)
    Parameters
    Type Name Description
    IndexBuilder<><TEntity> indexBuilder

    The builder for the index being configured.

    NullSortOrder[] values

    The sort order to use for each column.

    Returns
    Type Description
    IndexBuilder<><TEntity>

    A builder to further configure the index.

    Type Parameters
    Name Description
    TEntity
    Remarks

    https://www.postgresql.org/docs/current/static/indexes-ordering.html

    | Improve this Doc View Source

    HasOperators(IConventionIndexBuilder, IReadOnlyList<string>?, bool)

    The PostgreSQL index operators to be used.

    Declaration
    public static IConventionIndexBuilder? HasOperators(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? operators, bool fromDataAnnotation)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><string>? operators

    The operators to use for each column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    IConventionIndexBuilder?

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-opclass.html

    | Improve this Doc View Source

    HasOperators(IndexBuilder, params string[]?)

    The PostgreSQL index operators to be used.

    Declaration
    public static IndexBuilder HasOperators(this IndexBuilder indexBuilder, params string[]? operators)
    Parameters
    Type Name Description
    IndexBuilder indexBuilder

    The builder for the index being configured.

    string[] operators

    The operators to use for each column.

    Returns
    Type Description
    IndexBuilder

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-opclass.html

    | Improve this Doc View Source

    HasOperators<TEntity>(IndexBuilder<TEntity>, params string[]?)

    The PostgreSQL index operators to be used.

    Declaration
    public static IndexBuilder<TEntity> HasOperators<TEntity>(this IndexBuilder<TEntity> indexBuilder, params string[]? operators)
    Parameters
    Type Name Description
    IndexBuilder<><TEntity> indexBuilder

    The builder for the index being configured.

    string[] operators

    The operators to use for each column.

    Returns
    Type Description
    IndexBuilder<><TEntity>

    A builder to further configure the index.

    Type Parameters
    Name Description
    TEntity
    Remarks

    https://www.postgresql.org/docs/current/static/indexes-opclass.html

    | Improve this Doc View Source

    HasSortOrder(IConventionIndexBuilder, IReadOnlyList<SortOrder>?, bool)

    The PostgreSQL index sort ordering to be used.

    Declaration
    public static IConventionIndexBuilder? HasSortOrder(this IConventionIndexBuilder indexBuilder, IReadOnlyList<SortOrder>? values, bool fromDataAnnotation)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><SortOrder>? values

    The sort order to use for each column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    IConventionIndexBuilder?

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-ordering.html

    | Improve this Doc View Source

    HasSortOrder(IndexBuilder, params SortOrder[]?)

    The PostgreSQL index sort ordering to be used.

    Declaration
    public static IndexBuilder HasSortOrder(this IndexBuilder indexBuilder, params SortOrder[]? values)
    Parameters
    Type Name Description
    IndexBuilder indexBuilder

    The builder for the index being configured.

    SortOrder[] values

    The sort order to use for each column.

    Returns
    Type Description
    IndexBuilder

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-ordering.html

    | Improve this Doc View Source

    HasSortOrder<TEntity>(IndexBuilder<TEntity>, params SortOrder[]?)

    The PostgreSQL index sort ordering to be used.

    Declaration
    public static IndexBuilder<TEntity> HasSortOrder<TEntity>(this IndexBuilder<TEntity> indexBuilder, params SortOrder[]? values)
    Parameters
    Type Name Description
    IndexBuilder<><TEntity> indexBuilder

    The builder for the index being configured.

    SortOrder[] values

    The sort order to use for each column.

    Returns
    Type Description
    IndexBuilder<><TEntity>

    A builder to further configure the index.

    Type Parameters
    Name Description
    TEntity
    Remarks

    https://www.postgresql.org/docs/current/static/indexes-ordering.html

    | Improve this Doc View Source

    IncludeProperties(IConventionIndexBuilder, IReadOnlyList<string>, bool)

    Adds an INCLUDE clause to the index definition with the specified property names. This clause specifies a list of columns which will be included as a non-key part in the index.

    Declaration
    public static IConventionIndexBuilder? IncludeProperties(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><string> propertyNames

    An array of property names to be used in INCLUDE clause.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    IConventionIndexBuilder?

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/sql-createindex.html

    | Improve this Doc View Source

    IncludeProperties(IndexBuilder, params string[])

    Adds an INCLUDE clause to the index definition with the specified property names. This clause specifies a list of columns which will be included as a non-key part in the index.

    Declaration
    public static IndexBuilder IncludeProperties(this IndexBuilder indexBuilder, params string[] propertyNames)
    Parameters
    Type Name Description
    IndexBuilder indexBuilder

    The builder for the index being configured.

    string[] propertyNames

    An array of property names to be used in INCLUDE clause.

    Returns
    Type Description
    IndexBuilder

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/sql-createindex.html

    | Improve this Doc View Source

    IncludeProperties<TEntity>(IndexBuilder<TEntity>, Expression<Func<TEntity, object>>)

    Adds an INCLUDE clause to the index definition with property names from the specified expression. This clause specifies a list of columns which will be included as a non-key part in the index.

    Declaration
    public static IndexBuilder<TEntity> IncludeProperties<TEntity>(this IndexBuilder<TEntity> indexBuilder, Expression<Func<TEntity, object>> includeExpression)
    Parameters
    Type Name Description
    IndexBuilder<><TEntity> indexBuilder

    The builder for the index being configured.

    Expression<><Func<, ><TEntity, object>> includeExpression

    A lambda expression representing the property(s) to be included in the INCLUDE clause (blog => blog.Url).

    If multiple properties are to be included then specify an anonymous type including the properties (post => new { post.Title, post.BlogId }).

    Returns
    Type Description
    IndexBuilder<><TEntity>

    A builder to further configure the index.

    Type Parameters
    Name Description
    TEntity
    Remarks

    https://www.postgresql.org/docs/current/sql-createindex.html

    | Improve this Doc View Source

    IncludeProperties<TEntity>(IndexBuilder<TEntity>, params string[])

    Adds an INCLUDE clause to the index definition with the specified property names. This clause specifies a list of columns which will be included as a non-key part in the index.

    Declaration
    public static IndexBuilder<TEntity> IncludeProperties<TEntity>(this IndexBuilder<TEntity> indexBuilder, params string[] propertyNames)
    Parameters
    Type Name Description
    IndexBuilder<><TEntity> indexBuilder

    The builder for the index being configured.

    string[] propertyNames

    An array of property names to be used in INCLUDE clause.

    Returns
    Type Description
    IndexBuilder<><TEntity>

    A builder to further configure the index.

    Type Parameters
    Name Description
    TEntity
    Remarks

    https://www.postgresql.org/docs/current/sql-createindex.html

    | Improve this Doc View Source

    IsCreatedConcurrently(IConventionIndexBuilder, bool?, bool)

    When this option is used, PostgreSQL will build the index without taking any locks that prevent concurrent inserts, updates, or deletes on the table; whereas a standard index build locks out writes (but not reads) on the table until it's done.

    Declaration
    public static IConventionIndexBuilder? IsCreatedConcurrently(this IConventionIndexBuilder indexBuilder, bool? createdConcurrently, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    bool? createdConcurrently

    A value indicating whether the index is created with the "concurrently" option.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    IConventionIndexBuilder?

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/sql-createindex.html#SQL-CREATEINDEX-CONCURRENTLY

    | Improve this Doc View Source

    IsCreatedConcurrently(IndexBuilder, bool)

    When this option is used, PostgreSQL will build the index without taking any locks that prevent concurrent inserts, updates, or deletes on the table; whereas a standard index build locks out writes (but not reads) on the table until it's done.

    Declaration
    public static IndexBuilder IsCreatedConcurrently(this IndexBuilder indexBuilder, bool createdConcurrently = true)
    Parameters
    Type Name Description
    IndexBuilder indexBuilder

    The builder for the index being configured.

    bool createdConcurrently

    A value indicating whether the index is created with the "concurrently" option.

    Returns
    Type Description
    IndexBuilder

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/sql-createindex.html#SQL-CREATEINDEX-CONCURRENTLY

    | Improve this Doc View Source

    IsCreatedConcurrently<TEntity>(IndexBuilder<TEntity>, bool)

    When this option is used, PostgreSQL will build the index without taking any locks that prevent concurrent inserts, updates, or deletes on the table; whereas a standard index build locks out writes (but not reads) on the table until it's done.

    Declaration
    public static IndexBuilder<TEntity> IsCreatedConcurrently<TEntity>(this IndexBuilder<TEntity> indexBuilder, bool createdConcurrently = true)
    Parameters
    Type Name Description
    IndexBuilder<><TEntity> indexBuilder

    The builder for the index being configured.

    bool createdConcurrently

    A value indicating whether the index is created with the "concurrently" option.

    Returns
    Type Description
    IndexBuilder<><TEntity>

    A builder to further configure the index.

    Type Parameters
    Name Description
    TEntity
    Remarks

    https://www.postgresql.org/docs/current/sql-createindex.html#SQL-CREATEINDEX-CONCURRENTLY

    | Improve this Doc View Source

    IsTsVectorExpressionIndex(IConventionIndexBuilder, string?)

    Configures this index to be a full-text tsvector expression index.

    Declaration
    public static IConventionIndexBuilder? IsTsVectorExpressionIndex(this IConventionIndexBuilder indexBuilder, string? config)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    string? config

    The text search configuration for this generated tsvector property, or null if this is not a generated tsvector property.

    See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.

    Returns
    Type Description
    IConventionIndexBuilder?

    The same builder instance if the configuration was applied, null otherwise.

    | Improve this Doc View Source

    IsTsVectorExpressionIndex(IndexBuilder, string)

    Configures this index to be a full-text tsvector expression index.

    Declaration
    public static IndexBuilder IsTsVectorExpressionIndex(this IndexBuilder indexBuilder, string config)
    Parameters
    Type Name Description
    IndexBuilder indexBuilder

    The builder for the index being configured.

    string config

    The text search configuration for this generated tsvector property, or null if this is not a generated tsvector property.

    See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.

    Returns
    Type Description
    IndexBuilder

    A builder to further configure the index.

    | Improve this Doc View Source

    IsTsVectorExpressionIndex<TEntity>(IndexBuilder<TEntity>, string)

    Configures this index to be a full-text tsvector expression index.

    Declaration
    public static IndexBuilder<TEntity> IsTsVectorExpressionIndex<TEntity>(this IndexBuilder<TEntity> indexBuilder, string config)
    Parameters
    Type Name Description
    IndexBuilder<><TEntity> indexBuilder

    The builder for the index being configured.

    string config

    The text search configuration for this generated tsvector property, or null if this is not a generated tsvector property.

    See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.

    Returns
    Type Description
    IndexBuilder<><TEntity>

    A builder to further configure the index.

    Type Parameters
    Name Description
    TEntity
    | Improve this Doc View Source

    UseCollation(IConventionIndexBuilder, IReadOnlyList<string>?, bool)

    The PostgreSQL index collation to be used.

    Declaration
    public static IConventionIndexBuilder? UseCollation(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? values, bool fromDataAnnotation)
    Parameters
    Type Name Description
    IConventionIndexBuilder indexBuilder

    The builder for the index being configured.

    IReadOnlyList<><string>? values

    The sort options to use for each column.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    IConventionIndexBuilder?

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-collations.html

    | Improve this Doc View Source

    UseCollation(IndexBuilder, params string[]?)

    The PostgreSQL index collation to be used.

    Declaration
    public static IndexBuilder UseCollation(this IndexBuilder indexBuilder, params string[]? values)
    Parameters
    Type Name Description
    IndexBuilder indexBuilder

    The builder for the index being configured.

    string[] values

    The sort options to use for each column.

    Returns
    Type Description
    IndexBuilder

    A builder to further configure the index.

    Remarks

    https://www.postgresql.org/docs/current/static/indexes-collations.html

    | Improve this Doc View Source

    UseCollation<TEntity>(IndexBuilder<TEntity>, params string[]?)

    The PostgreSQL index collation to be used.

    Declaration
    public static IndexBuilder<TEntity> UseCollation<TEntity>(this IndexBuilder<TEntity> indexBuilder, params string[]? values)
    Parameters
    Type Name Description
    IndexBuilder<><TEntity> indexBuilder

    The builder for the index being configured.

    string[] values

    The sort options to use for each column.

    Returns
    Type Description
    IndexBuilder<><TEntity>

    A builder to further configure the index.

    Type Parameters
    Name Description
    TEntity
    Remarks

    https://www.postgresql.org/docs/current/static/indexes-collations.html

    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright 2023 The Npgsql Development Team