module Database.YamSql.Internal.Commons where
import Database.YamSql.Internal.Basic
data Variable = Variable
{ variableName :: SqlName
, variableDescription :: Maybe Text
, variableType :: SqlType
, variableDefault :: Maybe Text
} deriving (Generic, Show, Data)
instance FromJSON Variable where
parseJSON = parseYamSql
instance ToJSON Variable where
toJSON = toYamSqlJson
data Parameter = Parameter
{ parameterName :: SqlName
, parameterDescription :: Maybe Text
, parameterType :: SqlType
} deriving (Generic, Show, Data)
instance FromJSON Parameter where
parseJSON = parseYamSql
instance ToJSON Parameter where
toJSON = toYamSqlJson