Add FromRow instance to readme example
This commit is contained in:
parent
423f28f0a2
commit
66a5f54153
@ -45,6 +45,8 @@ For example, if we wanted to figure out how user age influences their score:
|
|||||||
```haskell
|
```haskell
|
||||||
data ScoreByAge = ScoreByAge { t :: Double, m :: Double }
|
data ScoreByAge = ScoreByAge { t :: Double, m :: Double }
|
||||||
deriving (Eq, Generic, Show)
|
deriving (Eq, Generic, Show)
|
||||||
|
|
||||||
|
instance Opium.FromRow ScoreByAge where
|
||||||
|
|
||||||
getScoreByAge :: Connection -> IO ScoreByAge
|
getScoreByAge :: Connection -> IO ScoreByAge
|
||||||
getScoreByAge conn = do
|
getScoreByAge conn = do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user