REST Resource: projects.databases.collectionGroups.fields
資源:欄位
代表資料庫中的單一欄位。
欄位會按照「集合群組」分組,代表資料庫中所有 ID 相同的集合。
JSON 表示法 |
{
"name": string,
"indexConfig": {
object (IndexConfig )
}
} |
欄位 |
name |
string
表單 projects/{projectId}/databases/{databaseId}/collectionGroups/{collectionId}/fields/{fieldPath} 的欄位名稱 欄位路徑可以是簡單的欄位名稱,例如address 或 mapValue 中的欄位路徑,例如address.city 或特殊欄位路徑唯一有效的特殊欄位是 * ,代表任何欄位。 欄位路徑可以使用 (backtick). The only character that needs
to be escaped within a quoted field path is the backtick character itself,
escaped using a backslash. Special characters in field paths that
must be quoted include: *, .,
``` (backtick), [, ]` 和任何 ASCII 符號字元來引用。 例如:(注意:此處的註解是以 Markdown 語法編寫,因此使用另一層反引號來代表程式碼區塊) \ address.city`represents a field named address.city, not the map key
cityin the field address.
`*`represents a field named *`,不是任何欄位。 特殊的 Field 包含所有欄位的預設索引設定。這個欄位的資源名稱為:這個 Field 中定義的 projects/{projectId}/databases/{databaseId}/collectionGroups/__default__/fields/* 索引,會套用至所有沒有 Field 索引設定的欄位。
|
indexConfig |
object (IndexConfig )
這個欄位的索引設定。如未設定,欄位索引功能會還原為 ancestorField 定義的設定。如要明確移除這個欄位的所有索引,請指定內含空白索引清單的索引設定。
|
索引設定
JSON 表示法 |
{
"indexes": [
{
object (Index )
}
],
"usesAncestorConfig": boolean,
"ancestorField": string,
"reverting": boolean
} |
欄位 |
indexes[] |
object (Index )
這個欄位支援的索引。
|
usesAncestorConfig |
boolean
僅供輸出。如果設為 true,Field 的索引設定是根據 ancestorField 指定的設定進行設置。如果設為 False,系統會明確定義 Field 的索引設定。
|
ancestorField |
string
僅供輸出。指定 Field 的資源名稱,該資源名稱可供設定這個欄位的索引設定 (當 usesAncestorConfig 為 true 時);如果這個欄位沒有索引設定 (當 usesAncestorConfig 為 false 時),則應設定這個欄位。
|
reverting |
boolean
僅在輸出為 true 時,Field 的索引設定正在還原中。完成後,索引設定會轉換至與 ancestorField 指定欄位相同的狀態,此時 usesAncestorConfig 會是 true ,reverting 會是 false 。
|
方法 |
|
取得欄位的中繼資料和設定。 |
|
列出這個資料庫的欄位設定和中繼資料。 |
|
更新欄位設定。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-22 (世界標準時間)。
[null,null,["上次更新時間:2024-08-22 (世界標準時間)。"],[],[]]