diff --git a/src/Database/Esqueleto.hs b/src/Database/Esqueleto.hs index 59830de..cb62206 100644 --- a/src/Database/Esqueleto.hs +++ b/src/Database/Esqueleto.hs @@ -322,32 +322,35 @@ import qualified Database.Persist -- from $ \\p -> do -- where_ (p ^. PersonAge <. just (val 14)) -- @ --- +-- -- The results of queries can also be used for insertions. -- In @SQL@, we might write the following, inserting a new blog -- post for every user: --- +-- -- @ -- INSERT INTO BlogPost -- SELECT ('Group Blog Post', id) -- FROM Person -- @ --- +-- -- In @esqueleto@, we may write the same query above as: --- +-- -- @ -- insertSelect $ from $ \p-> -- return $ BlogPost \<# \"Group Blog Post\" \<&\> (p ^. PersonId) -- @ --- --- Individual insertions can be performed through Persistent's --- 'insert' function, reexported for convenience. +-- +-- Individual insertions can be performed through Persistent's +-- 'insert' function, reexported for convenience. + + ---------------------------------------------------------------------- -- $reexports -- --- We re-export many symbols from @persistent@ for convenince +-- We re-export many symbols from @persistent@ for convenince: +-- -- * \"Store functions\" from "Database.Persist". -- -- * Everything from "Database.Persist.Class" except for