packages feed

relational-record 0.1.0.1 → 0.1.1.0

raw patch · 2 files changed

+43/−10 lines, 2 filesdep ~relational-query

Dependency ranges changed: relational-query

Files

relational-record.cabal view
@@ -1,5 +1,5 @@ name:                relational-record-version:             0.1.0.1+version:             0.1.1.0 synopsis:            Meta package of Relational Record description:         Meta package to install Relational Record quickly homepage:            http://khibino.github.io/haskell-relational-record/@@ -17,7 +17,7 @@                      Database.Relational.Query.Documentation    build-depends:       base <5-                     , relational-query+                     , relational-query >=0.3                      , relational-query-HDBC    hs-source-dirs:    src
src/Database/Relational/Query/Documentation.hs view
@@ -30,6 +30,9 @@    having, +  distinct,+  all',+   (<-#),    -- *** Direct Join Operators@@ -98,7 +101,7 @@   sumMaybe,    -- ** Placeholders-  -- $placeholder+  -- $placeholders   query',   left',   relation',@@ -106,14 +109,27 @@   restriction',   union', +  -- ** Record Mapping+  -- $recordMapping+  ProductConstructor,+  ProjectableFunctor (..),+  ProjectableApplicative (..),+  (><),+   -- ** Database Statements   -- $databaseStatements   relationalQuery,   typedInsert,+  typedInsertQuery,   typedUpdate,   typedDelete,   typedKeyUpdate, +  derivedInsert,+  derivedInsertQuery,+  derivedUpdate,+  derivedDelete,+   -- * Database Operations   -- $databaseOperations @@ -184,11 +200,13 @@ 'query' and 'queryMaybe' operators grow query product of monadic context like join operation of SQL. 'on' operator appends a new condition into recent join product condition. -'groupBy' operator aggregates flat projection value.+'groupBy' operator aggregates flat projection value, and can be used only in 'MonadAggregate' context.  'wheres' and 'having' operators appends a new condition into whole query condition.-'having' only accepts aggregated projection value.+'having' only accepts aggregated projection value, and can be used only in 'MonadRestrict' 'Aggregated' context. +'distinct' operator and 'all'' operator specify SELECT DISTINCT or SELECT ALL, the last specified in monad is used.+ '(<-#)' operator assigns update target column and projection value to build update statement structure.  -} @@ -284,16 +302,26 @@ contain documentation of other 'Maybe' flavor projection operators.  -} -{- $placeholder-Placeholder flavor of operators against query operation and set operation are also provided, to realize type safe placeholder.+{- $placeholders+Placeholders' flavor of operators against query operation and set operation are also provided, to realize type safe placeholders.  'query'', 'left'', 'relation'', 'updateTarget'', 'restriction'', and 'union''-operator are placeholder flavor 'query', 'left', 'relation', 'updateTarget', 'restriction' and 'union'.+operator are placeholders' flavor 'query', 'left', 'relation', 'updateTarget', 'restriction' and 'union'.  Module "Database.Relational.Query.Relation" and "Database.Relational.Query.Effect"-contains documentation of other placeholder flavor operators.+contains documentation of other placeholders' 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.@@ -302,12 +330,17 @@  'typedInsert' function converts 'Pi' key type info flat SQL INSERT statement. +'typedInsertQuery' function converts 'Pi' key type and 'Relation' type info flat SQL INSERT ... SELECT ... statement.+ 'typedUpdate' function converts 'UpdateTarget' type into flat SQL UPDATE statement.  'typedDelete' function converts 'Restriction' into flat SQL DELETE statement.  'typedKeyUpdate' function converts 'Pi' key type info flat SQL UPDATE statement.--}++Some handy table type infered functions are provided,+'derivedInsert', 'derivedInsertQuery', 'derivedUpdate' and 'derivedDelete'.+ -}   {- $databaseOperations