on master help sign in
Document Returning
commitd2a6262d927aaa5073ee181f56158c3cad30cf15 authorOllie Charles <ollie@ocharles.org.uk> dateWed 24 Mar 2021, 13:10 (6 years ago) parentb76ed4d
1 file changed+5
src/Rel8/Statement/Returning.hs+5
src/Rel8/Statement/Returning.hs+5
@@ -16,6 +16,11 @@ import Rel8.Table.Recontextualize ( Selects )
1616import Rel8.Table.Serialize ( Serializable )
1717
1818
19+-- | @INSERT@, @UPDATE@ and @DELETE@ all support returning either the number of
20+-- rows affected, or the actual rows modified. 'Projection' allows you to
21+-- project out of these returned rows, which can be useful if you want to log
22+-- exactly which rows were deleted, or to view a generated id (for example, if
23+-- using a column with an autoincrementing counter as a default value).
1924type Returning :: Type -> Type -> Type
2025data Returning names a where
2126 NumberOfRowsAffected :: Returning names Int64