@@ -16,6 +16,11 @@ import Rel8.Table.Recontextualize ( Selects )
16import Rel8.Table.Serialize ( Serializable )
16import Rel8.Table.Serialize ( Serializable )
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).
19type Returning :: Type -> Type -> Type
24type Returning :: Type -> Type -> Type
20data Returning names a where
25data Returning names a where
21 NumberOfRowsAffected :: Returning names Int64
26 NumberOfRowsAffected :: Returning names Int64