Revision 13ef1fa5 src/Ganeti/Query/Query.hs
b/src/Ganeti/Query/Query.hs | ||
---|---|---|
50 | 50 |
, queryCompat |
51 | 51 |
, getRequestedNames |
52 | 52 |
, nameField |
53 |
, uuidField |
|
53 | 54 |
) where |
54 | 55 |
|
55 | 56 |
import Control.DeepSeq |
... | ... | |
121 | 122 |
nameField (ItemTypeOpCode QRExport) = "node" |
122 | 123 |
nameField _ = "name" |
123 | 124 |
|
125 |
-- | Computes the uuid field, or the best possible substitute, for different |
|
126 |
-- query types. |
|
127 |
uuidField :: ItemType -> FilterField |
|
128 |
uuidField (ItemTypeLuxi QRJob) = nameField (ItemTypeLuxi QRJob) |
|
129 |
uuidField (ItemTypeOpCode QRExport) = nameField (ItemTypeOpCode QRExport) |
|
130 |
uuidField _ = "uuid" |
|
131 |
|
|
124 | 132 |
-- | Extracts all quoted strings from a list, ignoring the |
125 | 133 |
-- 'NumericValue' entries. |
126 | 134 |
getAllQuotedStrings :: [FilterValue] -> [String] |
Also available in: Unified diff