Class NpgsqlIndexBuilderExtensions
Npgsql specific extension methods for
Namespace: Microsoft.EntityFrameworkCore
Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
Syntax
public static class NpgsqlIndexBuilderExtensions
Methods
| Improve this Doc View SourceAreNullsDistinct(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
| Improve this Doc View SourceAreNullsDistinct(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
| Improve this Doc View SourceAreNullsDistinct<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
| Improve this Doc View SourceCanSetAreNullsDistinct(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 |
|
Remarks
| Improve this Doc View SourceCanSetCollation(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
| Improve this Doc View SourceCanSetHasCollation(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
| Improve this Doc View SourceCanSetHasMethod(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 |
|
Remarks
| Improve this Doc View SourceCanSetHasNullSortOrder(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
| Improve this Doc View SourceCanSetHasOperators(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 |
|
Remarks
| Improve this Doc View SourceCanSetHasSortOrder(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
| Improve this Doc View SourceCanSetInclude(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 |
|
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 |
|
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
| Improve this Doc View SourceCanSetIsTsVectorExpressionIndex(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 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 |
|
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 |
|
Remarks
| Improve this Doc View SourceCanSetNullSortOrder(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
| Improve this Doc View SourceCanSetOperators(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 |
|
Remarks
| Improve this Doc View SourceCanSetSortOrder(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
| Improve this Doc View SourceCanSetToTsVector(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 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 |
|
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
| Improve this Doc View SourceHasCollation(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
| Improve this Doc View SourceHasCollation<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
| Improve this Doc View SourceHasMethod(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
| Improve this Doc View SourceHasMethod(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
| Improve this Doc View SourceHasMethod<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
| Improve this Doc View SourceHasNullSortOrder(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
| Improve this Doc View SourceHasNullSortOrder(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
| Improve this Doc View SourceHasNullSortOrder<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
| Improve this Doc View SourceHasOperators(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
| Improve this Doc View SourceHasOperators(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
| Improve this Doc View SourceHasOperators<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
| Improve this Doc View SourceHasSortOrder(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
| Improve this Doc View SourceHasSortOrder(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
| Improve this Doc View SourceHasSortOrder<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
| Improve this Doc View SourceIncludeProperties(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
| Improve this Doc View SourceIncludeProperties(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
| Improve this Doc View SourceIncludeProperties<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
(
If multiple properties are to be included then specify an anonymous type including the
properties ( |
Returns
Type | Description |
---|---|
IndexBuilder<><TEntity> | A builder to further configure the index. |
Type Parameters
Name | Description |
---|---|
TEntity |
Remarks
| Improve this Doc View SourceIncludeProperties<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
| Improve this Doc View SourceIsCreatedConcurrently(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
| Improve this Doc View SourceIsCreatedConcurrently(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
| Improve this Doc View SourceIsCreatedConcurrently<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
| Improve this Doc View SourceIsTsVectorExpressionIndex(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 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,
|
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 See https://www.postgresql.org/docs/current/textsearch-controls.html for more information. |
Returns
Type | Description |
---|---|
IndexBuilder | A builder to further configure the index. |
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 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 |
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
| Improve this Doc View SourceUseCollation(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
| Improve this Doc View SourceUseCollation<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 |