語言

IConventionIndexBuilder 介面

定義

提供一個簡單的 API 表面來設定 IConventionIndex from 慣例。

此介面通常由資料庫提供者(及其他擴充)使用。 它通常不被用於應用程式程式碼中。

public interface IConventionIndexBuilder : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
type IConventionIndexBuilder = interface
    interface IConventionAnnotatableBuilder
Public Interface IConventionIndexBuilder
Implements IConventionAnnotatableBuilder
實作

備註

更多資訊與範例請參閱 模型建構慣例 。

屬性

名稱 Description
Metadata

能取得正在設定的索引。

ModelBuilder

會得到模型製作者。

(繼承來源 IConventionAnnotatableBuilder)

方法

名稱 Description
CanRemoveAnnotation(String, Boolean)

回傳一個值,指示是否能使用此組態來源移除帶有該名稱的註解。

(繼承來源 IConventionAnnotatableBuilder)
CanSetAnnotation(String, Object, Boolean)

回傳一個值,指示是否能從此配置來源設定包含該名稱與值的註解。

(繼承來源 IConventionAnnotatableBuilder)
CanSetIsDescending(IReadOnlyList<Boolean>, Boolean)

回傳一個值,指示是否能從當前配置來源設定此索引排序順序。

CanSetIsUnique(Nullable<Boolean>, Boolean)

回傳一個值,表示此索引唯一性是否能從目前的組態來源設定。

HasAnnotation(String, Object, Boolean)

設定以名字儲存的註解。 若已有指定名稱的註解存在相同或更低 ConfigurationSource的標註,則會覆寫現有註解。

HasNoAnnotation(String, Boolean)

移除這個物件中帶有名字的註解。

HasNonNullAnnotation(String, Object, Boolean)

設定以名字儲存的註解。 若已有指定名稱的註解存在相同或更低 ConfigurationSource的標註,則會覆寫現有註解。 若指定值, null 則移除註解。

IsDescending(IReadOnlyList<Boolean>, Boolean)

配置此索引欄位(升序或降序)的排序順序。

IsUnique(Nullable<Boolean>, Boolean)

配置此索引是否唯一(即每組值必須唯一)。

RemoveAnnotation(String, Boolean)
已淘汰.

移除這個物件中帶有名字的註解。

(繼承來源 IConventionAnnotatableBuilder)
SetOrRemoveAnnotation(String, Object, Boolean)
已淘汰.

設定或移除以名字儲存的註解。

(繼承來源 IConventionAnnotatableBuilder)

擴充方法

名稱 Description
CanSetDatabaseName(IConventionIndexBuilder, String, Boolean)

回傳一個值,表示是否可以設定該名稱作為索引。

CanSetDataCompression(IConventionIndexBuilder, Nullable<DataCompressionType>, Boolean)

回傳一個值,指示索引是否能在針對 SQL Server 時設定為資料壓縮選項。

CanSetFillFactor(IConventionIndexBuilder, Nullable<Int32>, Boolean)

回傳一個值,指示索引是否能在針對 SQL Server 時設定填充因子選項。

CanSetFilter(IConventionIndexBuilder, String, Boolean)

回傳一個值,表示是否能將給定表達式設為索引的過濾器。

CanSetFullTextCatalog(IConventionIndexBuilder, String, Boolean)

回傳一個值,表示當針對 SQL Server 時,索引是否能以指定的全文目錄進行配置。

CanSetFullTextChangeTracking(IConventionIndexBuilder, Nullable<FullTextChangeTracking>, Boolean)

回傳一個值,表示在針對 SQL Server 時,索引是否能設定為指定的變更追蹤模式。

CanSetFullTextKeyIndex(IConventionIndexBuilder, String, Boolean)

回傳一個值,表示當針對 SQL Server 時,索引是否能設定指定的 KEY INDEX。

CanSetFullTextLanguages(IConventionIndexBuilder, IReadOnlyDictionary<String,String>, Boolean)

回傳一個值,表示在針對 SQL Server 時,是否能設定全文索引中屬性的語言。

CanSetIncludeProperties(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)

回傳一個值,表示是否能設定給定的包含屬性。

CanSetIsClustered(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

回傳一個值,表示索引是否能被設定為叢集。

CanSetIsCreatedOnline(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

回傳一個值,表示在針對 SQL Server 時,索引是否能設定線上選項。

CanSetIsFullTextIndex(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

回傳一個值,指示索引是否能設定為全文索引。

CanSetName(IConventionIndexBuilder, String, Boolean)
已淘汰.

回傳一個值,表示是否可以設定該名稱作為索引。

CanSetSortInTempDb(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

回傳一個值,表示當針對 SQL Server 時,索引是否能在 tempdb 選項中設定 sort。

CanSetVectorIndexType(IConventionIndexBuilder, Nullable<VectorIndexType>, Boolean)

回傳一個值,表示向量索引是否可設定為向量。

ForSqlServerInclude(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)
已淘汰.

設定索引在針對 SQL Server 時包含屬性。

ForSqlServerIsClustered(IConventionIndexBuilder, Nullable<Boolean>, Boolean)
已淘汰.

在針對 SQL Server 時,設定索引是否為叢集。

ForSqlServerIsCreatedOnline(IConventionIndexBuilder, Nullable<Boolean>, Boolean)
已淘汰.

設定索引是否在針對 SQL Server 時使用線上選項建立。

ForVectors(IConventionIndexBuilder, Nullable<VectorIndexType>, Boolean)

將索引配置為向量索引,並以給定的向量索引類型(如「flat」、「diskANN」)或「quantizedFlat」為範本。 欲了解更多資訊,請參閱 Azure Cosmos DB 中的向量搜尋 for NoSQL。

HasDatabaseName(IConventionIndexBuilder, String, Boolean)

在針對關聯式資料庫時,設定資料庫中索引的名稱。

HasFillFactor(IConventionIndexBuilder, Nullable<Int32>, Boolean)

在針對 SQL Server 時,設定索引是否使用填充因子選項建立。

HasFilter(IConventionIndexBuilder, String, Boolean)

配置索引的濾波表達式。

HasFullTextCatalog(IConventionIndexBuilder, String, Boolean)

在針對 SQL Server 時,將全文目錄配置為全文索引。

HasFullTextChangeTracking(IConventionIndexBuilder, Nullable<FullTextChangeTracking>, Boolean)

在針對 SQL Server 時,設定全文索引的變更追蹤模式。

HasFullTextKeyIndex(IConventionIndexBuilder, String, Boolean)

在針對 SQL Server 時,設定全文索引的 KEY INDEX。

HasFullTextLanguages(IConventionIndexBuilder, IReadOnlyDictionary<String,String>, Boolean)

針對 SQL Server 進行全文索引屬性的配置。

HasName(IConventionIndexBuilder, String, Boolean)
已淘汰.

在針對關聯式資料庫時,設定資料庫中索引的名稱。

IncludeProperties(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)

設定索引在針對 SQL Server 時包含屬性。

IsClustered(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

在針對 SQL Server 時,設定索引是否為叢集。

IsCreatedOnline(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

設定索引是否在針對 SQL Server 時使用線上選項建立。

IsFullTextIndex(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

將索引配置為全文索引。 欲了解更多資訊,請參閱 Azure Cosmos DB 中的全文搜尋 NoSQL。

IsVectorIndex(IConventionIndexBuilder, Nullable<VectorIndexType>, Boolean)

將索引配置為向量索引,並使用給定的向量索引類型,例如「flat」、「diskANN」或「quantizedFlat」。 欲了解更多資訊,請參閱 Azure Cosmos DB 中的向量搜尋 for NoSQL。

SortInTempDb(IConventionIndexBuilder, Nullable<Boolean>, Boolean)

在 SQL Server 目標設定索引是否在 tempdb 中以排序選項建立。

UseDataCompression(IConventionIndexBuilder, Nullable<DataCompressionType>, Boolean)

設定在針對 SQL Server 時,是否建立索引時使用資料壓縮選項。

適用於