module Network.TableStorage.Query where
import Data.Time
import Network.TableStorage.Types
edmBinary :: String -> Entity -> Maybe String
edmBinary key en = do
col <- lookup key $ entityColumns en
case col of
EdmBinary s -> s
_ -> Nothing
edmString :: String -> Entity -> Maybe String
edmString key en = do
col <- lookup key $ entityColumns en
case col of
EdmString s -> s
_ -> Nothing
edmBoolean :: String -> Entity -> Maybe Bool
edmBoolean key en = do
col <- lookup key $ entityColumns en
case col of
EdmBoolean s -> s
_ -> Nothing
edmDateTime :: String -> Entity -> Maybe UTCTime
edmDateTime key en = do
col <- lookup key $ entityColumns en
case col of
EdmDateTime s -> s
_ -> Nothing
edmDouble :: String -> Entity -> Maybe Double
edmDouble key en = do
col <- lookup key $ entityColumns en
case col of
EdmDouble s -> s
_ -> Nothing
edmGuid :: String -> Entity -> Maybe String
edmGuid key en = do
col <- lookup key $ entityColumns en
case col of
EdmGuid s -> s
_ -> Nothing
edmInt32 :: String -> Entity -> Maybe Int
edmInt32 key en = do
col <- lookup key $ entityColumns en
case col of
EdmInt32 s -> s
_ -> Nothing
edmInt64 :: String -> Entity -> Maybe Int
edmInt64 key en = do
col <- lookup key $ entityColumns en
case col of
EdmInt64 s -> s
_ -> Nothing