Add record-mapping section.

This commit is contained in:
Kei Hibino 2015-01-08 20:02:38 +09:00
parent d9ad3efc56
commit 734bb6fe93

View File

@ -109,6 +109,13 @@ module Database.Relational.Query.Documentation (
restriction',
union',
-- ** Record Mapping
-- $recordMapping
ProductConstructor,
ProjectableFunctor (..),
ProjectableApplicative (..),
(><),
-- ** Database Statements
-- $databaseStatements
relationalQuery,
@ -299,6 +306,16 @@ Module "Database.Relational.Query.Relation" and "Database.Relational.Query.Effec
contains documentation of other placeholder flavor operators.
-}
{- $recordMapping
Applicative stype record mapping is supported, for 'Projection', 'Pi' and 'PlaceHolders'.
'|$|' operator can be used on 'ProjectableFunctor' context, and
'|*|' operator can be used on 'ProjectableApplicative' context with 'ProductConstructor',
like /Foo |$| projection1 |*| projection2 |*| projection3/
, /Foo |$| placeholders1 |*| placeholders2 |*| placeholders3/, and so on.
'><' operator constructs pair result. /x >< y/ is the same as /(,) |$| x |*| y/.
-}
{- $databaseStatements
Some functions are defined to expand query structure
into flat SQL statements to be used by database operation.