1 {-# LANGUAGE TemplateHaskell #-}
    2 module Databrary.Model.Slot.SQL
    3   ( selectSlotId
    4   , slotKeys
    5   ) where
    6 
    7 import Databrary.Model.SQL.Select
    8 import Databrary.Model.Slot.Types
    9 
   10 selectSlotId :: String -> Selector
   11 selectSlotId table = selectColumns 'SlotId table ["container", "segment"]
   12 
   13 slotKeys :: String -- ^ @'Slot'@
   14   -> [(String, String)]
   15 slotKeys o =
   16   [ ("container", "${containerId $ containerRow $ slotContainer " ++ o ++ "}")
   17   , ("segment", "${slotSegment " ++ o ++ "}")
   18   ]