Class NpgsqlIndexExtensions
Extension methods for
Namespace: Microsoft.EntityFrameworkCore
Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
Syntax
public static class NpgsqlIndexExtensions
Methods
| Improve this Doc View SourceGetAreNullsDistinct(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
| Improve this Doc View SourceGetAreNullsDistinctConfigurationSource(IConventionIndex)
Returns the
Declaration
public static ConfigurationSource? GetAreNullsDistinctConfigurationSource(this IConventionIndex index)
Parameters
Type | Name | Description |
---|---|---|
IConventionIndex | index | The index. |
Returns
Type | Description |
---|---|
ConfigurationSource? | The |
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
| Improve this Doc View SourceGetCollationConfigurationSource(IConventionIndex)
Returns the
Declaration
public static ConfigurationSource? GetCollationConfigurationSource(this IConventionIndex index)
Parameters
Type | Name | Description |
---|---|---|
IConventionIndex | index | The index. |
Returns
Type | Description |
---|---|
ConfigurationSource? | The |
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 |
GetIncludePropertiesConfigurationSource(IConventionIndex)
Returns the
Declaration
public static ConfigurationSource? GetIncludePropertiesConfigurationSource(this IConventionIndex index)
Parameters
Type | Name | Description |
---|---|---|
IConventionIndex | index | The index. |
Returns
Type | Description |
---|---|
ConfigurationSource? | The |
GetIsCreatedConcurrentlyConfigurationSource(IConventionIndex)
Returns the
Declaration
public static ConfigurationSource? GetIsCreatedConcurrentlyConfigurationSource(this IConventionIndex index)
Parameters
Type | Name | Description |
---|---|---|
IConventionIndex | index | The index. |
Returns
Type | Description |
---|---|
ConfigurationSource? | The |
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
| Improve this Doc View SourceGetMethodConfigurationSource(IConventionIndex)
Returns the
Declaration
public static ConfigurationSource? GetMethodConfigurationSource(this IConventionIndex index)
Parameters
Type | Name | Description |
---|---|---|
IConventionIndex | index | The index. |
Returns
Type | Description |
---|---|
ConfigurationSource? | The |
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
| Improve this Doc View SourceGetNullSortOrderConfigurationSource(IConventionIndex)
Returns the
Declaration
public static ConfigurationSource? GetNullSortOrderConfigurationSource(this IConventionIndex index)
Parameters
Type | Name | Description |
---|---|---|
IConventionIndex | index | The index. |
Returns
Type | Description |
---|---|
ConfigurationSource? | The |
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
| Improve this Doc View SourceGetOperatorsConfigurationSource(IConventionIndex)
Returns the
Declaration
public static ConfigurationSource? GetOperatorsConfigurationSource(this IConventionIndex index)
Parameters
Type | Name | Description |
---|---|---|
IConventionIndex | index | The index. |
Returns
Type | Description |
---|---|
ConfigurationSource? | The |
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
| Improve this Doc View SourceGetSortOrderConfigurationSource(IConventionIndex)
Returns the
Declaration
public static ConfigurationSource? GetSortOrderConfigurationSource(this IConventionIndex index)
Parameters
Type | Name | Description |
---|---|---|
IConventionIndex | index | The index. |
Returns
Type | Description |
---|---|
ConfigurationSource? | The |
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
| Improve this Doc View SourceGetTsVectorConfigConfigurationSource(IConventionIndex)
Returns the
Declaration
public static ConfigurationSource? GetTsVectorConfigConfigurationSource(this IConventionIndex index)
Parameters
Type | Name | Description |
---|---|---|
IConventionIndex | index | The index. |
Returns
Type | Description |
---|---|
ConfigurationSource? | The |
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? |
|
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
| Improve this Doc View SourceSetAreNullsDistinct(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
| Improve this Doc View SourceSetCollation(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
| Improve this Doc View SourceSetCollation(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
| Improve this Doc View SourceSetIncludeProperties(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>? |
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. |
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? |
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. |
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
| Improve this Doc View SourceSetMethod(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
| Improve this Doc View SourceSetNullSortOrder(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
| Improve this Doc View SourceSetNullSortOrder(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
| Improve this Doc View SourceSetOperators(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
| Improve this Doc View SourceSetOperators(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
| Improve this Doc View SourceSetSortOrder(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
| Improve this Doc View SourceSetSortOrder(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
| Improve this Doc View SourceSetTsVectorConfig(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 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
| Improve this Doc View SourceSetTsVectorConfig(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 See https://www.postgresql.org/docs/current/textsearch-controls.html for more information. |