儲存庫查詢關鍵字
Supported query method subject keywords
The following table lists the subject keywords generally supported by the Spring Data repository query derivation mechanism to express the predicate. Consult the store-specific documentation for the exact list of supported keywords, because some keywords listed here might not be supported in a particular store.
關鍵字 | 描述 |
---|---|
|
一般查詢方法,通常傳回儲存庫類型、 |
|
Exists 投影,通常傳回 |
|
Count 投影,傳回數字結果。 |
|
Delete 查詢方法,不傳回任何結果 ( |
|
將查詢結果限制為前 |
|
使用 distinct 查詢僅傳回唯一結果。 請查閱特定儲存區的文件,以了解是否支援該功能。 此關鍵字可以出現在主詞中 |
Reserved methods
下表列出使用預定義功能(如 CrudRepository
中所定義)的保留方法。 這些方法直接在儲存庫代理的後端(特定於儲存區)實作上調用。 另請參閱「定義查詢方法」。
|
|
|
|
|
Supported query method predicate keywords and modifiers
下表列出了 Spring Data 儲存庫查詢衍生機制通常支援的謂詞關鍵字。 但是,請查閱特定儲存區的文件以獲取支援關鍵字的確切列表,因為此處列出的一些關鍵字可能在特定儲存區中不受支援。
邏輯關鍵字 | 關鍵字表達式 |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In addition to filter predicates, the following list of modifiers is supported
關鍵字 | 描述 |
---|---|
|
與謂詞關鍵字一起使用,用於不區分大小寫的比較。 |
|
忽略所有適用屬性的大小寫。 用於查詢方法謂詞中的某處。 |
|
指定靜態排序順序,後跟屬性路徑和方向(例如 |