From d608430c76e53c602323ee8519ec8d8e78235e5c Mon Sep 17 00:00:00 2001 From: Amitai Burstein Date: Tue, 4 Jul 2023 22:31:04 +0300 Subject: [PATCH] Add 'do' like in other examples --- Guide/database.markdown | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Guide/database.markdown b/Guide/database.markdown index 5455ccaf9..e9cf1fcc3 100644 --- a/Guide/database.markdown +++ b/Guide/database.markdown @@ -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