Skip to content

Commit

Permalink
Add 'do' like in other examples
Browse files Browse the repository at this point in the history
  • Loading branch information
amitaibu committed Jul 4, 2023
1 parent ebcd68d commit d608430
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Guide/database.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,13 @@ the result, with an `Only` prefix. Here's an example of fetching only the IDs of
`Id Project`:
```haskell
allProjectUuids :: [Only UUID] <- sqlQuery "SELECT projects.id FROM projects" ()
do
allProjectUuids :: [Only UUID] <- sqlQuery "SELECT projects.id FROM projects" ()
let projectIds =
allProjectUuids
-- Extract the UUIDs, and convert to an ID.
|> map (\(Only uuid) -> Id uuid :: Id Project)
let projectIds =
allProjectUuids
-- Extract the UUIDs, and convert to an ID.
|> map (\(Only uuid) -> Id uuid :: Id Project)
```
### Scalar Results
Expand Down

0 comments on commit d608430

Please sign in to comment.