2{-# language StandaloneKindSignatures #-}
4module Rel8.Statement.Returning
10import Data.Int ( Int64 )
11import Data.Kind ( Type )
15import Rel8.Table.Recontextualize ( Selects )
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).
24type Returning :: Type -> Type -> Type
25data Returning names a where
26 NumberOfRowsAffected :: Returning names Int64
27 Projection :: (Selects names exprs, Serializable projection a)
28 => (exprs -> projection)
29 -> Returning names [a]
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list