Class NpgsqlIndexBuilderExtensions
- Namespace
- Microsoft.EntityFrameworkCore
- Assembly
- Npgsql.EntityFrameworkCore.PostgreSQL.dll
Npgsql specific extension methods for IndexBuilder.
public static class NpgsqlIndexBuilderExtensions
- Inheritance
-
NpgsqlIndexBuilderExtensions
- Inherited Members
Methods
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.
public static IConventionIndexBuilder? AreNullsDistinct(this IConventionIndexBuilder indexBuilder, bool nullsDistinct = true, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
nullsDistinctboolWhether nulls should be considered distinct.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionIndexBuilder
A builder to further configure the index.
Remarks
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.
public static IndexBuilder AreNullsDistinct(this IndexBuilder indexBuilder, bool nullsDistinct = true)
Parameters
indexBuilderIndexBuilderThe builder for the index being configured.
nullsDistinctboolWhether nulls should be considered distinct.
Returns
- IndexBuilder
A builder to further configure the index.
Remarks
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.
public static IndexBuilder<TEntity> AreNullsDistinct<TEntity>(this IndexBuilder<TEntity> indexBuilder, bool nullsDistinct = true)
Parameters
indexBuilderIndexBuilder<TEntity>The builder for the index being configured.
nullsDistinctboolWhether nulls should be considered distinct.
Returns
- IndexBuilder<TEntity>
A builder to further configure the index.
Type Parameters
TEntity
Remarks
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.
public static bool CanSetAreNullsDistinct(this IConventionIndexBuilder indexBuilder, bool nullsDistinct = true, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
nullsDistinctboolWhether nulls should be considered distinct.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
trueif the index can be configured with the method
Remarks
CanSetCollation(IConventionIndexBuilder, IReadOnlyList<string>?, bool)
Returns a value indicating whether the PostgreSQL index collation can be set.
public static bool CanSetCollation(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? values, bool fromDataAnnotation)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
valuesIReadOnlyList<string>The sort options to use for each column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
A builder to further configure the index.
Remarks
CanSetHasCollation(IConventionIndexBuilder, IReadOnlyList<string>?, bool)
Returns a value indicating whether the PostgreSQL index collation can be set.
[Obsolete("Use CanSetHasCollation")]
public static bool CanSetHasCollation(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? values, bool fromDataAnnotation)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
valuesIReadOnlyList<string>The sort options to use for each column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
A builder to further configure the index.
Remarks
CanSetHasMethod(IConventionIndexBuilder, string?, bool)
The PostgreSQL index method to be used. Null selects the default (currently btree).
[Obsolete("Use CanSetMethod")]
public static bool CanSetHasMethod(this IConventionIndexBuilder indexBuilder, string? method, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
methodstringThe name of the index.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
trueif the index can be configured with the method
Remarks
CanSetHasNullSortOrder(IConventionIndexBuilder, IReadOnlyList<NullSortOrder>?, bool)
Returns a value indicating whether the PostgreSQL index null sort ordering can be set.
[Obsolete("Use CanSetNullSortOrder")]
public static bool CanSetHasNullSortOrder(this IConventionIndexBuilder indexBuilder, IReadOnlyList<NullSortOrder>? values, bool fromDataAnnotation)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
valuesIReadOnlyList<NullSortOrder>The sort order to use for each column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
A builder to further configure the index.
Remarks
CanSetHasOperators(IConventionIndexBuilder, IReadOnlyList<string>?, bool)
Returns a value indicating whether the PostgreSQL index operators can be set.
[Obsolete("Use CanSetOperators")]
public static bool CanSetHasOperators(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? operators, bool fromDataAnnotation)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
operatorsIReadOnlyList<string>The operators to use for each column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
trueif the index can be configured with the method.
Remarks
CanSetHasSortOrder(IConventionIndexBuilder, IReadOnlyList<SortOrder>?, bool)
Returns a value indicating whether the PostgreSQL index sort ordering can be set.
[Obsolete("Use CanSetSortOrder")]
public static bool CanSetHasSortOrder(this IConventionIndexBuilder indexBuilder, IReadOnlyList<SortOrder>? values, bool fromDataAnnotation)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
valuesIReadOnlyList<SortOrder>The sort order to use for each column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
A builder to further configure the index.
Remarks
CanSetInclude(IConventionIndexBuilder, IReadOnlyList<string>?, bool)
Returns a value indicating whether the given include properties can be set.
[Obsolete("Use CanSetIncludeProperties")]
public static bool CanSetInclude(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
propertyNamesIReadOnlyList<string>An array of property names to be used in 'include' clause.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
trueif the given include properties can be set.
CanSetIncludeProperties(IConventionIndexBuilder, IReadOnlyList<string>?, bool)
Returns a value indicating whether the given include properties can be set.
public static bool CanSetIncludeProperties(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
propertyNamesIReadOnlyList<string>An array of property names to be used in 'include' clause.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
trueif the given include properties can be set.
CanSetIsCreatedConcurrently(IConventionIndexBuilder, bool?, bool)
Returns a value indicating whether concurrent creation for the index can be set.
public static bool CanSetIsCreatedConcurrently(this IConventionIndexBuilder indexBuilder, bool? createdConcurrently, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
createdConcurrentlybool?A value indicating whether the index is created with the "concurrently" option.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
A builder to further configure the index.
Remarks
CanSetIsTsVectorExpressionIndex(IConventionIndexBuilder, string?, bool)
Returns a value indicating whether the index can be configured as a full-text tsvector expression index.
public static bool CanSetIsTsVectorExpressionIndex(this IConventionIndexBuilder indexBuilder, string? config, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
configstringThe text search configuration for this generated tsvector property, or
nullif this is not a generated tsvector property.See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
trueif the index can be configured as a full-text tsvector expression index.
CanSetMethod(IConventionIndexBuilder, string?, bool)
The PostgreSQL index method to be used. Null selects the default (currently btree).
public static bool CanSetMethod(this IConventionIndexBuilder indexBuilder, string? method, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
methodstringThe name of the index.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
trueif the index can be configured with the method
Remarks
CanSetNullSortOrder(IConventionIndexBuilder, IReadOnlyList<NullSortOrder>?, bool)
Returns a value indicating whether the PostgreSQL index null sort ordering can be set.
public static bool CanSetNullSortOrder(this IConventionIndexBuilder indexBuilder, IReadOnlyList<NullSortOrder>? values, bool fromDataAnnotation)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
valuesIReadOnlyList<NullSortOrder>The sort order to use for each column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
A builder to further configure the index.
Remarks
CanSetOperators(IConventionIndexBuilder, IReadOnlyList<string>?, bool)
Returns a value indicating whether the PostgreSQL index operators can be set.
public static bool CanSetOperators(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? operators, bool fromDataAnnotation)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
operatorsIReadOnlyList<string>The operators to use for each column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
trueif the index can be configured with the method.
Remarks
CanSetSortOrder(IConventionIndexBuilder, IReadOnlyList<SortOrder>?, bool)
Returns a value indicating whether the PostgreSQL index sort ordering can be set.
[Obsolete("Use IsDescending instead")]
public static bool CanSetSortOrder(this IConventionIndexBuilder indexBuilder, IReadOnlyList<SortOrder>? values, bool fromDataAnnotation)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
valuesIReadOnlyList<SortOrder>The sort order to use for each column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
A builder to further configure the index.
Remarks
CanSetStorageParameter(IConventionIndexBuilder, string, object?, bool)
Returns a value indicating whether the PostgreSQL storage parameter is set on the table created for this entity.
public static bool CanSetStorageParameter(this IConventionIndexBuilder indexBuilder, string parameterName, object? parameterValue, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
parameterNamestringThe name of the storage parameter.
parameterValueobjectThe value of the storage parameter.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
trueif the index can be configured as with the storage parameter.
Remarks
CanSetToTsVector(IConventionIndexBuilder, string?, bool)
Returns a value indicating whether the index can be configured as a full-text tsvector expression index.
[Obsolete("Use CanSetIsTsVectorExpressionIndex")]
public static bool CanSetToTsVector(this IConventionIndexBuilder indexBuilder, string? config, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
configstringThe text search configuration for this generated tsvector property, or
nullif this is not a generated tsvector property.See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
trueif the index can be configured as a full-text tsvector expression index.
HasCollation(IConventionIndexBuilder, IReadOnlyList<string>?, bool)
The PostgreSQL index collation to be used.
[Obsolete("Use UseCollation")]
public static IConventionIndexBuilder? HasCollation(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? values, bool fromDataAnnotation)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
valuesIReadOnlyList<string>The sort options to use for each column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionIndexBuilder
A builder to further configure the index.
Remarks
HasCollation(IndexBuilder, params string[]?)
The PostgreSQL index collation to be used.
[Obsolete("Use UseCollation")]
public static IndexBuilder HasCollation(this IndexBuilder indexBuilder, params string[]? values)
Parameters
indexBuilderIndexBuilderThe builder for the index being configured.
valuesstring[]The sort options to use for each column.
Returns
- IndexBuilder
A builder to further configure the index.
Remarks
HasCollation<TEntity>(IndexBuilder<TEntity>, params string[]?)
The PostgreSQL index collation to be used.
[Obsolete("Use UseCollation")]
public static IndexBuilder<TEntity> HasCollation<TEntity>(this IndexBuilder<TEntity> indexBuilder, params string[]? values)
Parameters
indexBuilderIndexBuilder<TEntity>The builder for the index being configured.
valuesstring[]The sort options to use for each column.
Returns
- IndexBuilder<TEntity>
A builder to further configure the index.
Type Parameters
TEntity
Remarks
HasMethod(IConventionIndexBuilder, string?, bool)
The PostgreSQL index method to be used. Null selects the default (currently btree).
public static IConventionIndexBuilder? HasMethod(this IConventionIndexBuilder indexBuilder, string? method, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
methodstringThe name of the index.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionIndexBuilder
A builder to further configure the index.
Remarks
HasMethod(IndexBuilder, string?)
The PostgreSQL index method to be used. Null selects the default (currently btree).
public static IndexBuilder HasMethod(this IndexBuilder indexBuilder, string? method)
Parameters
indexBuilderIndexBuilderThe builder for the index being configured.
methodstringThe name of the index.
Returns
- IndexBuilder
A builder to further configure the index.
Remarks
HasMethod<TEntity>(IndexBuilder<TEntity>, string?)
The PostgreSQL index method to be used. Null selects the default (currently btree).
public static IndexBuilder<TEntity> HasMethod<TEntity>(this IndexBuilder<TEntity> indexBuilder, string? method)
Parameters
indexBuilderIndexBuilder<TEntity>The builder for the index being configured.
methodstringThe name of the index.
Returns
- IndexBuilder<TEntity>
A builder to further configure the index.
Type Parameters
TEntity
Remarks
HasNullSortOrder(IConventionIndexBuilder, IReadOnlyList<NullSortOrder>?, bool)
The PostgreSQL index NULL sort ordering to be used.
public static IConventionIndexBuilder? HasNullSortOrder(this IConventionIndexBuilder indexBuilder, IReadOnlyList<NullSortOrder>? values, bool fromDataAnnotation)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
valuesIReadOnlyList<NullSortOrder>The sort order to use for each column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionIndexBuilder
A builder to further configure the index.
Remarks
HasNullSortOrder(IndexBuilder, params NullSortOrder[]?)
The PostgreSQL index NULL sort ordering to be used.
public static IndexBuilder HasNullSortOrder(this IndexBuilder indexBuilder, params NullSortOrder[]? values)
Parameters
indexBuilderIndexBuilderThe builder for the index being configured.
valuesNullSortOrder[]The sort order to use for each column.
Returns
- IndexBuilder
A builder to further configure the index.
Remarks
HasNullSortOrder<TEntity>(IndexBuilder<TEntity>, params NullSortOrder[]?)
The PostgreSQL index NULL sort ordering to be used.
public static IndexBuilder<TEntity> HasNullSortOrder<TEntity>(this IndexBuilder<TEntity> indexBuilder, params NullSortOrder[]? values)
Parameters
indexBuilderIndexBuilder<TEntity>The builder for the index being configured.
valuesNullSortOrder[]The sort order to use for each column.
Returns
- IndexBuilder<TEntity>
A builder to further configure the index.
Type Parameters
TEntity
Remarks
HasOperators(IConventionIndexBuilder, IReadOnlyList<string>?, bool)
The PostgreSQL index operators to be used.
public static IConventionIndexBuilder? HasOperators(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? operators, bool fromDataAnnotation)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
operatorsIReadOnlyList<string>The operators to use for each column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionIndexBuilder
A builder to further configure the index.
Remarks
HasOperators(IndexBuilder, params string[]?)
The PostgreSQL index operators to be used.
public static IndexBuilder HasOperators(this IndexBuilder indexBuilder, params string[]? operators)
Parameters
indexBuilderIndexBuilderThe builder for the index being configured.
operatorsstring[]The operators to use for each column.
Returns
- IndexBuilder
A builder to further configure the index.
Remarks
HasOperators<TEntity>(IndexBuilder<TEntity>, params string[]?)
The PostgreSQL index operators to be used.
public static IndexBuilder<TEntity> HasOperators<TEntity>(this IndexBuilder<TEntity> indexBuilder, params string[]? operators)
Parameters
indexBuilderIndexBuilder<TEntity>The builder for the index being configured.
operatorsstring[]The operators to use for each column.
Returns
- IndexBuilder<TEntity>
A builder to further configure the index.
Type Parameters
TEntity
Remarks
HasSortOrder(IConventionIndexBuilder, IReadOnlyList<SortOrder>?, bool)
The PostgreSQL index sort ordering to be used.
[Obsolete("Use IsDescending instead")]
public static IConventionIndexBuilder? HasSortOrder(this IConventionIndexBuilder indexBuilder, IReadOnlyList<SortOrder>? values, bool fromDataAnnotation)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
valuesIReadOnlyList<SortOrder>The sort order to use for each column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionIndexBuilder
A builder to further configure the index.
Remarks
HasSortOrder(IndexBuilder, params SortOrder[]?)
The PostgreSQL index sort ordering to be used.
[Obsolete("Use IsDescending instead")]
public static IndexBuilder HasSortOrder(this IndexBuilder indexBuilder, params SortOrder[]? values)
Parameters
indexBuilderIndexBuilderThe builder for the index being configured.
valuesSortOrder[]The sort order to use for each column.
Returns
- IndexBuilder
A builder to further configure the index.
Remarks
HasSortOrder<TEntity>(IndexBuilder<TEntity>, params SortOrder[]?)
The PostgreSQL index sort ordering to be used.
[Obsolete("Use IsDescending instead")]
public static IndexBuilder<TEntity> HasSortOrder<TEntity>(this IndexBuilder<TEntity> indexBuilder, params SortOrder[]? values)
Parameters
indexBuilderIndexBuilder<TEntity>The builder for the index being configured.
valuesSortOrder[]The sort order to use for each column.
Returns
- IndexBuilder<TEntity>
A builder to further configure the index.
Type Parameters
TEntity
Remarks
HasStorageParameter(IConventionIndexBuilder, string, object?, bool)
Sets a PostgreSQL storage parameter on the index.
public static IConventionIndexBuilder? HasStorageParameter(this IConventionIndexBuilder indexBuilder, string parameterName, object? parameterValue, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
parameterNamestringThe name of the storage parameter.
parameterValueobjectThe value of the storage parameter.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionIndexBuilder
trueif the index can be configured with the method
Remarks
HasStorageParameter(IndexBuilder, string, object?)
Sets a PostgreSQL storage parameter on the index.
public static IndexBuilder HasStorageParameter(this IndexBuilder indexBuilder, string parameterName, object? parameterValue)
Parameters
indexBuilderIndexBuilderThe builder for the index being configured.
parameterNamestringThe name of the storage parameter.
parameterValueobjectThe value of the storage parameter.
Returns
- IndexBuilder
The same builder instance so that multiple calls can be chained.
Remarks
HasStorageParameter<TEntity>(IndexBuilder<TEntity>, string, object?)
Sets a PostgreSQL storage parameter on the index.
public static IndexBuilder<TEntity> HasStorageParameter<TEntity>(this IndexBuilder<TEntity> indexBuilder, string parameterName, object? parameterValue) where TEntity : class
Parameters
indexBuilderIndexBuilder<TEntity>The builder for the index being configured.
parameterNamestringThe name of the storage parameter.
parameterValueobjectThe value of the storage parameter.
Returns
- IndexBuilder<TEntity>
The same builder instance so that multiple calls can be chained.
Type Parameters
TEntity
Remarks
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.
public static IConventionIndexBuilder? IncludeProperties(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
propertyNamesIReadOnlyList<string>An array of property names to be used in INCLUDE clause.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionIndexBuilder
A builder to further configure the index.
Remarks
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.
public static IndexBuilder IncludeProperties(this IndexBuilder indexBuilder, params string[] propertyNames)
Parameters
indexBuilderIndexBuilderThe builder for the index being configured.
propertyNamesstring[]An array of property names to be used in INCLUDE clause.
Returns
- IndexBuilder
A builder to further configure the index.
Remarks
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.
public static IndexBuilder<TEntity> IncludeProperties<TEntity>(this IndexBuilder<TEntity> indexBuilder, Expression<Func<TEntity, object>> includeExpression)
Parameters
indexBuilderIndexBuilder<TEntity>The builder for the index being configured.
includeExpressionExpression<Func<TEntity, object>>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
- IndexBuilder<TEntity>
A builder to further configure the index.
Type Parameters
TEntity
Remarks
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.
public static IndexBuilder<TEntity> IncludeProperties<TEntity>(this IndexBuilder<TEntity> indexBuilder, params string[] propertyNames)
Parameters
indexBuilderIndexBuilder<TEntity>The builder for the index being configured.
propertyNamesstring[]An array of property names to be used in INCLUDE clause.
Returns
- IndexBuilder<TEntity>
A builder to further configure the index.
Type Parameters
TEntity
Remarks
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.
public static IConventionIndexBuilder? IsCreatedConcurrently(this IConventionIndexBuilder indexBuilder, bool? createdConcurrently, bool fromDataAnnotation = false)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
createdConcurrentlybool?A value indicating whether the index is created with the "concurrently" option.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionIndexBuilder
A builder to further configure the index.
Remarks
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.
public static IndexBuilder IsCreatedConcurrently(this IndexBuilder indexBuilder, bool createdConcurrently = true)
Parameters
indexBuilderIndexBuilderThe builder for the index being configured.
createdConcurrentlyboolA value indicating whether the index is created with the "concurrently" option.
Returns
- IndexBuilder
A builder to further configure the index.
Remarks
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.
public static IndexBuilder<TEntity> IsCreatedConcurrently<TEntity>(this IndexBuilder<TEntity> indexBuilder, bool createdConcurrently = true)
Parameters
indexBuilderIndexBuilder<TEntity>The builder for the index being configured.
createdConcurrentlyboolA value indicating whether the index is created with the "concurrently" option.
Returns
- IndexBuilder<TEntity>
A builder to further configure the index.
Type Parameters
TEntity
Remarks
IsTsVectorExpressionIndex(IConventionIndexBuilder, string?)
Configures this index to be a full-text tsvector expression index.
public static IConventionIndexBuilder? IsTsVectorExpressionIndex(this IConventionIndexBuilder indexBuilder, string? config)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
configstringThe text search configuration for this generated tsvector property, or
nullif this is not a generated tsvector property.See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.
Returns
- IConventionIndexBuilder
The same builder instance if the configuration was applied,
nullotherwise.
IsTsVectorExpressionIndex(IndexBuilder, string)
Configures this index to be a full-text tsvector expression index.
public static IndexBuilder IsTsVectorExpressionIndex(this IndexBuilder indexBuilder, string config)
Parameters
indexBuilderIndexBuilderThe builder for the index being configured.
configstringThe text search configuration for this generated tsvector property, or
nullif this is not a generated tsvector property.See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.
Returns
- IndexBuilder
A builder to further configure the index.
IsTsVectorExpressionIndex<TEntity>(IndexBuilder<TEntity>, string)
Configures this index to be a full-text tsvector expression index.
public static IndexBuilder<TEntity> IsTsVectorExpressionIndex<TEntity>(this IndexBuilder<TEntity> indexBuilder, string config)
Parameters
indexBuilderIndexBuilder<TEntity>The builder for the index being configured.
configstringThe text search configuration for this generated tsvector property, or
nullif this is not a generated tsvector property.See https://www.postgresql.org/docs/current/textsearch-controls.html for more information.
Returns
- IndexBuilder<TEntity>
A builder to further configure the index.
Type Parameters
TEntity
UseCollation(IConventionIndexBuilder, IReadOnlyList<string>?, bool)
The PostgreSQL index collation to be used.
public static IConventionIndexBuilder? UseCollation(this IConventionIndexBuilder indexBuilder, IReadOnlyList<string>? values, bool fromDataAnnotation)
Parameters
indexBuilderIConventionIndexBuilderThe builder for the index being configured.
valuesIReadOnlyList<string>The sort options to use for each column.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionIndexBuilder
A builder to further configure the index.
Remarks
UseCollation(IndexBuilder, params string[]?)
The PostgreSQL index collation to be used.
public static IndexBuilder UseCollation(this IndexBuilder indexBuilder, params string[]? values)
Parameters
indexBuilderIndexBuilderThe builder for the index being configured.
valuesstring[]The sort options to use for each column.
Returns
- IndexBuilder
A builder to further configure the index.
Remarks
UseCollation<TEntity>(IndexBuilder<TEntity>, params string[]?)
The PostgreSQL index collation to be used.
public static IndexBuilder<TEntity> UseCollation<TEntity>(this IndexBuilder<TEntity> indexBuilder, params string[]? values)
Parameters
indexBuilderIndexBuilder<TEntity>The builder for the index being configured.
valuesstring[]The sort options to use for each column.
Returns
- IndexBuilder<TEntity>
A builder to further configure the index.
Type Parameters
TEntity