Revision f94a9680 htools/Ganeti/Query/Types.hs
b/htools/Ganeti/Query/Types.hs | ||
---|---|---|
28 | 28 |
|
29 | 29 |
module Ganeti.Query.Types |
30 | 30 |
( FieldGetter(..) |
31 |
, QffMode(..) |
|
31 | 32 |
, FieldData |
32 | 33 |
, FieldList |
33 | 34 |
, FieldMap |
... | ... | |
50 | 51 |
| FieldConfig (ConfigData -> a -> ResultEntry) |
51 | 52 |
| FieldUnknown |
52 | 53 |
|
54 |
-- | Type defining how the value of a field is used in filtering. This |
|
55 |
-- implements the equivalent to Python's QFF_ flags, except that we |
|
56 |
-- don't use OR-able values. |
|
57 |
data QffMode = QffNormal -- ^ Value is used as-is in filters |
|
58 |
| QffTimestamp -- ^ Value is a timestamp tuple, convert to float |
|
59 |
deriving (Show, Eq) |
|
60 |
|
|
61 |
|
|
53 | 62 |
-- | Alias for a field data (definition and getter). |
54 |
type FieldData a b = (FieldDefinition, FieldGetter a b) |
|
63 |
type FieldData a b = (FieldDefinition, FieldGetter a b, QffMode)
|
|
55 | 64 |
|
56 | 65 |
-- | Alias for a field data list. |
57 | 66 |
type FieldList a b = [FieldData a b] |
Also available in: Unified diff