Search Results for

    Show / Hide Table of Contents

    Class NpgsqlIndexExtensions

    Extension methods for for Npgsql-specific metadata.

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

    Methods

    | Improve this Doc View Source

    GetAreNullsDistinct(IReadOnlyIndex)

    Returns 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? GetAreNullsDistinct(this IReadOnlyIndex index)
    Parameters
    Type Name Description
    IReadOnlyIndex index
    Returns
    Type Description
    bool?
    Remarks

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

    | Improve this Doc View Source

    GetAreNullsDistinctConfigurationSource(IConventionIndex)

    Returns the for whether nulls are considered distinct.

    Declaration
    public static ConfigurationSource? GetAreNullsDistinctConfigurationSource(this IConventionIndex index)
    Parameters
    Type Name Description
    IConventionIndex index

    The index.

    Returns
    Type Description
    ConfigurationSource?

    The .

    | Improve this Doc View Source

    GetCollation(IReadOnlyIndex)

    Returns the column collations to be used, or null if they have not been specified.

    Declaration
    public static IReadOnlyList<string>? GetCollation(this IReadOnlyIndex index)
    Parameters
    Type Name Description
    IReadOnlyIndex index
    Returns
    Type Description
    IReadOnlyList<><string>?
    Remarks

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

    | Improve this Doc View Source

    GetCollationConfigurationSource(IConventionIndex)

    Returns the for the index collations.

    Declaration
    public static ConfigurationSource? GetCollationConfigurationSource(this IConventionIndex index)
    Parameters
    Type Name Description
    IConventionIndex index

    The index.

    Returns
    Type Description
    ConfigurationSource?

    The for the index collations.

    | Improve this Doc View Source

    GetIncludeProperties(IReadOnlyIndex)

    Returns included property names, or null if they have not been specified.

    Declaration
    public static IReadOnlyList<string>? GetIncludeProperties(this IReadOnlyIndex index)
    Parameters
    Type Name Description
    IReadOnlyIndex index

    The index.

    Returns
    Type Description
    IReadOnlyList<><string>?

    The included property names, or null if they have not been specified.

    | Improve this Doc View Source

    GetIncludePropertiesConfigurationSource(IConventionIndex)

    Returns the for the included property names.

    Declaration
    public static ConfigurationSource? GetIncludePropertiesConfigurationSource(this IConventionIndex index)
    Parameters
    Type Name Description
    IConventionIndex index

    The index.

    Returns
    Type Description
    ConfigurationSource?

    The for the included property names.

    | Improve this Doc View Source

    GetIsCreatedConcurrentlyConfigurationSource(IConventionIndex)

    Returns the for whether the index is created concurrently.

    Declaration
    public static ConfigurationSource? GetIsCreatedConcurrentlyConfigurationSource(this IConventionIndex index)
    Parameters
    Type Name Description
    IConventionIndex index

    The index.

    Returns
    Type Description
    ConfigurationSource?

    The for whether the index is created concurrently.

    | Improve this Doc View Source

    GetMethod(IReadOnlyIndex)

    Returns the index method to be used, or null if it hasn't been specified. null selects the default (currently btree).

    Declaration
    public static string? GetMethod(this IReadOnlyIndex index)
    Parameters
    Type Name Description
    IReadOnlyIndex index
    Returns
    Type Description
    string?
    Remarks

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

    | Improve this Doc View Source

    GetMethodConfigurationSource(IConventionIndex)

    Returns the for the index method.

    Declaration
    public static ConfigurationSource? GetMethodConfigurationSource(this IConventionIndex index)
    Parameters
    Type Name Description
    IConventionIndex index

    The index.

    Returns
    Type Description
    ConfigurationSource?

    The for the index method.

    | Improve this Doc View Source

    GetNullSortOrder(IReadOnlyIndex)

    Returns the column NULL sort orders to be used, or null if they have not been specified.

    Declaration
    public static IReadOnlyList<NullSortOrder>? GetNullSortOrder(this IReadOnlyIndex index)
    Parameters
    Type Name Description
    IReadOnlyIndex index
    Returns
    Type Description
    IReadOnlyList<><NullSortOrder>?
    Remarks

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

    | Improve this Doc View Source

    GetNullSortOrderConfigurationSource(IConventionIndex)

    Returns the for the index null sort orders.

    Declaration
    public static ConfigurationSource? GetNullSortOrderConfigurationSource(this IConventionIndex index)
    Parameters
    Type Name Description
    IConventionIndex index

    The index.

    Returns
    Type Description
    ConfigurationSource?

    The for the index null sort orders.

    | Improve this Doc View Source

    GetOperators(IReadOnlyIndex)

    Returns the column operators to be used, or null if they have not been specified.

    Declaration
    public static IReadOnlyList<string>? GetOperators(this IReadOnlyIndex index)
    Parameters
    Type Name Description
    IReadOnlyIndex index
    Returns
    Type Description
    IReadOnlyList<><string>?
    Remarks

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

    | Improve this Doc View Source

    GetOperatorsConfigurationSource(IConventionIndex)

    Returns the for the index operators.

    Declaration
    public static ConfigurationSource? GetOperatorsConfigurationSource(this IConventionIndex index)
    Parameters
    Type Name Description
    IConventionIndex index

    The index.

    Returns
    Type Description
    ConfigurationSource?

    The for the index operators.

    | Improve this Doc View Source

    GetSortOrder(IReadOnlyIndex)

    Returns the column sort orders to be used, or null if they have not been specified.

    Declaration
    public static IReadOnlyList<SortOrder>? GetSortOrder(this IReadOnlyIndex index)
    Parameters
    Type Name Description
    IReadOnlyIndex index
    Returns
    Type Description
    IReadOnlyList<><SortOrder>?
    Remarks

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

    | Improve this Doc View Source

    GetSortOrderConfigurationSource(IConventionIndex)

    Returns the for the index sort orders.

    Declaration
    public static ConfigurationSource? GetSortOrderConfigurationSource(this IConventionIndex index)
    Parameters
    Type Name Description
    IConventionIndex index

    The index.

    Returns
    Type Description
    ConfigurationSource?

    The for the index sort orders.

    | Improve this Doc View Source

    GetTsVectorConfig(IReadOnlyIndex)

    Returns the text search configuration for this tsvector expression index, or null if this is not a tsvector expression index.

    Declaration
    public static string? GetTsVectorConfig(this IReadOnlyIndex index)
    Parameters
    Type Name Description
    IReadOnlyIndex index

    The index.

    Returns
    Type Description
    string?
    Remarks

    https://www.postgresql.org/docs/current/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX

    | Improve this Doc View Source

    GetTsVectorConfigConfigurationSource(IConventionIndex)

    Returns the for the tsvector config.

    Declaration
    public static ConfigurationSource? GetTsVectorConfigConfigurationSource(this IConventionIndex index)
    Parameters
    Type Name Description
    IConventionIndex index

    The index.

    Returns
    Type Description
    ConfigurationSource?

    The for the tsvector config.

    | Improve this Doc View Source

    IsCreatedConcurrently(IReadOnlyIndex)

    Returns a value indicating whether the index is created concurrently.

    Declaration
    public static bool? IsCreatedConcurrently(this IReadOnlyIndex index)
    Parameters
    Type Name Description
    IReadOnlyIndex index

    The index.

    Returns
    Type Description
    bool?

    true if the index is created concurrently.

    | Improve this Doc View Source

    SetAreNullsDistinct(IConventionIndex, bool?, bool)

    Sets 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? SetAreNullsDistinct(this IConventionIndex index, bool? nullsDistinct, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndex index
    bool? nullsDistinct
    bool fromDataAnnotation
    Returns
    Type Description
    bool?
    Remarks

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

    | Improve this Doc View Source

    SetAreNullsDistinct(IMutableIndex, bool?)

    Sets 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 void SetAreNullsDistinct(this IMutableIndex index, bool? nullsDistinct)
    Parameters
    Type Name Description
    IMutableIndex index
    bool? nullsDistinct
    Remarks

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

    | Improve this Doc View Source

    SetCollation(IConventionIndex, IReadOnlyList<string>?, bool)

    Sets the column collations to be used, or null if they have not been specified.

    Declaration
    public static IReadOnlyList<string>? SetCollation(this IConventionIndex index, IReadOnlyList<string>? collations, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndex index
    IReadOnlyList<><string>? collations
    bool fromDataAnnotation
    Returns
    Type Description
    IReadOnlyList<><string>?
    Remarks

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

    | Improve this Doc View Source

    SetCollation(IMutableIndex, IReadOnlyList<string>?)

    Sets the column collations to be used, or null if they have not been specified.

    Declaration
    public static void SetCollation(this IMutableIndex index, IReadOnlyList<string>? collations)
    Parameters
    Type Name Description
    IMutableIndex index
    IReadOnlyList<><string>? collations
    Remarks

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

    | Improve this Doc View Source

    SetIncludeProperties(IConventionIndex, IReadOnlyList<string>?, bool)

    Sets included property names.

    Declaration
    public static IReadOnlyList<string>? SetIncludeProperties(this IConventionIndex index, IReadOnlyList<string>? properties, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndex index

    The index.

    IReadOnlyList<><string>? properties

    The value to set.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    IReadOnlyList<><string>?
    | Improve this Doc View Source

    SetIncludeProperties(IMutableIndex, IReadOnlyList<string>?)

    Sets included property names.

    Declaration
    public static void SetIncludeProperties(this IMutableIndex index, IReadOnlyList<string>? properties)
    Parameters
    Type Name Description
    IMutableIndex index

    The index.

    IReadOnlyList<><string>? properties

    The value to set.

    | Improve this Doc View Source

    SetIsCreatedConcurrently(IConventionIndex, bool?, bool)

    Sets a value indicating whether the index is created concurrently.

    Declaration
    public static bool? SetIsCreatedConcurrently(this IConventionIndex index, bool? createdConcurrently, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndex index

    The index.

    bool? createdConcurrently

    The value to set.

    bool fromDataAnnotation

    Indicates whether the configuration was specified using a data annotation.

    Returns
    Type Description
    bool?
    | Improve this Doc View Source

    SetIsCreatedConcurrently(IMutableIndex, bool?)

    Sets a value indicating whether the index is created concurrently.

    Declaration
    public static void SetIsCreatedConcurrently(this IMutableIndex index, bool? createdConcurrently)
    Parameters
    Type Name Description
    IMutableIndex index

    The index.

    bool? createdConcurrently

    The value to set.

    | Improve this Doc View Source

    SetMethod(IConventionIndex, string?, bool)

    Sets the index method to be used, or null if it hasn't been specified. null selects the default (currently btree).

    Declaration
    public static string? SetMethod(this IConventionIndex index, string? method, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndex index
    string? method
    bool fromDataAnnotation
    Returns
    Type Description
    string?
    Remarks

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

    | Improve this Doc View Source

    SetMethod(IMutableIndex, string?)

    Sets the index method to be used, or null if it hasn't been specified. null selects the default (currently btree).

    Declaration
    public static void SetMethod(this IMutableIndex index, string? method)
    Parameters
    Type Name Description
    IMutableIndex index
    string? method
    Remarks

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

    | Improve this Doc View Source

    SetNullSortOrder(IConventionIndex, IReadOnlyList<NullSortOrder>?, bool)

    Sets the column NULL sort orders to be used, or null if they have not been specified.

    Declaration
    public static IReadOnlyList<NullSortOrder>? SetNullSortOrder(this IConventionIndex index, IReadOnlyList<NullSortOrder>? nullSortOrder, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndex index
    IReadOnlyList<><NullSortOrder>? nullSortOrder
    bool fromDataAnnotation
    Returns
    Type Description
    IReadOnlyList<><NullSortOrder>?
    Remarks

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

    | Improve this Doc View Source

    SetNullSortOrder(IMutableIndex, IReadOnlyList<NullSortOrder>?)

    Sets the column NULL sort orders to be used, or null if they have not been specified.

    Declaration
    public static void SetNullSortOrder(this IMutableIndex index, IReadOnlyList<NullSortOrder>? nullSortOrder)
    Parameters
    Type Name Description
    IMutableIndex index
    IReadOnlyList<><NullSortOrder>? nullSortOrder
    Remarks

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

    | Improve this Doc View Source

    SetOperators(IConventionIndex, IReadOnlyList<string>?, bool)

    Sets the column operators to be used, or null if they have not been specified.

    Declaration
    public static IReadOnlyList<string>? SetOperators(this IConventionIndex index, IReadOnlyList<string>? operators, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndex index
    IReadOnlyList<><string>? operators
    bool fromDataAnnotation
    Returns
    Type Description
    IReadOnlyList<><string>?
    Remarks

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

    | Improve this Doc View Source

    SetOperators(IMutableIndex, IReadOnlyList<string>?)

    Sets the column operators to be used, or null if they have not been specified.

    Declaration
    public static void SetOperators(this IMutableIndex index, IReadOnlyList<string>? operators)
    Parameters
    Type Name Description
    IMutableIndex index
    IReadOnlyList<><string>? operators
    Remarks

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

    | Improve this Doc View Source

    SetSortOrder(IConventionIndex, IReadOnlyList<SortOrder>?, bool)

    Sets the column sort orders to be used, or null if they have not been specified.

    Declaration
    public static IReadOnlyList<SortOrder>? SetSortOrder(this IConventionIndex index, IReadOnlyList<SortOrder>? sortOrder, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndex index
    IReadOnlyList<><SortOrder>? sortOrder
    bool fromDataAnnotation
    Returns
    Type Description
    IReadOnlyList<><SortOrder>?
    Remarks

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

    | Improve this Doc View Source

    SetSortOrder(IMutableIndex, IReadOnlyList<SortOrder>?)

    Sets the column sort orders to be used, or null if they have not been specified.

    Declaration
    public static void SetSortOrder(this IMutableIndex index, IReadOnlyList<SortOrder>? sortOrder)
    Parameters
    Type Name Description
    IMutableIndex index
    IReadOnlyList<><SortOrder>? sortOrder
    Remarks

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

    | Improve this Doc View Source

    SetTsVectorConfig(IConventionIndex, string?, bool)

    Sets the index to tsvector config name to be used.

    Declaration
    public static string? SetTsVectorConfig(this IConventionIndex index, string? config, bool fromDataAnnotation = false)
    Parameters
    Type Name Description
    IConventionIndex index

    The index.

    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
    string?
    Remarks

    https://www.postgresql.org/docs/current/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX

    | Improve this Doc View Source

    SetTsVectorConfig(IMutableIndex, string?)

    Sets the text search configuration for this tsvector expression index, or null if this is not a tsvector expression index.

    Declaration
    public static void SetTsVectorConfig(this IMutableIndex index, string? config)
    Parameters
    Type Name Description
    IMutableIndex index

    The index.

    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.

    Remarks

    https://www.postgresql.org/docs/current/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX

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