Revision b3d17f52 htools/Ganeti/Query/Filter.hs

b/htools/Ganeti/Query/Filter.hs
48 48
  ( compileFilter
49 49
  , evaluateFilter
50 50
  , requestedNames
51
  , makeSimpleFilter
51 52
  ) where
52 53

  
53 54
import Control.Applicative
......
185 186
    then Just [val]
186 187
    else Nothing
187 188
requestedNames _ _ = Nothing
189

  
190
-- | Builds a simple filter from a list of names.
191
makeSimpleFilter :: String -> [String] -> Filter FilterField
192
makeSimpleFilter _ [] = EmptyFilter
193
makeSimpleFilter namefield vals =
194
  OrFilter $ map (EQFilter namefield . QuotedString) vals

Also available in: Unified diff