relational-record 0.0.1.2 → 0.1.0.0
raw patch · 2 files changed
+71/−29 lines, 2 files
Files
relational-record.cabal view
@@ -1,5 +1,5 @@ name: relational-record-version: 0.0.1.2+version: 0.1.0.0 synopsis: Meta package of Relational Record description: Meta package to install Relational Record quickly homepage: http://khibino.github.io/haskell-relational-record/
src/Database/Relational/Query/Documentation.hs view
@@ -12,13 +12,13 @@ -- * Concepts -- $concepts - -- ** Relational Query Building DSL+ -- * Relational Query Building DSL -- $queryBuildingDSL - -- *** Monadic Query Context Building+ -- ** Monadic Query Context Building -- $monadicContext - -- **** Monadic Operators+ -- *** Monadic Operators -- $monadicOperator query, queryMaybe,@@ -30,20 +30,26 @@ having, - -- **** Direct Join Operators+ (<-#),++ -- *** Direct Join Operators -- $directJoin inner, left, right, full, on', - -- **** Finalize Context+ -- *** Finalize Context -- $finalize+ Relation, relation, aggregateRelation, - -- *** Projection+ UpdateTarget, updateTarget,+ Restriction, restriction,++ -- ** Projection -- $projection - -- **** Projection Type+ -- *** Projection Type -- $projectionType Projection, @@ -51,11 +57,11 @@ Exists, OverWindow, - -- **** Projection Path+ -- *** Projection Path -- $projectionPath Pi, (!), (<.>), - -- **** Projection Operators+ -- *** Projection Operators -- $projectionOperators (.=.), (.<.), (.<=.), (.>.), (.>=.), (.<>.), casesOrElse, case',@@ -68,7 +74,7 @@ (.||.), (.+.), (.-.), (./.), (.*.), negate', fromIntegral', showNum, - -- *** Aggregate and Window Functions+ -- ** Aggregate and Window Functions -- $aggregateFunctions sum', avg, max', min',@@ -76,11 +82,11 @@ rank, denseRank, rowNumber, percentRank, cumeDist, - -- *** Set Operators+ -- ** Set Operators -- $setOperators union, except, intersect, - -- *** Maybe Projections+ -- ** Maybe Projections -- $maybeProjection (?!), (?!?), (<?.>), (<?.?>),@@ -89,50 +95,60 @@ negateMaybe, sumMaybe, - -- *** Placeholders+ -- ** Placeholders -- $placeholder query', left', relation',+ updateTarget',+ restriction', union', - -- ** Database Operations+ -- ** Database Statements+ -- $databaseStatements+ relationalQuery,+ typedInsert,+ typedUpdate,+ typedDelete,+ typedKeyUpdate,++ -- * Database Operations -- $databaseOperations - -- *** Generalized Statement+ -- ** Generalized Statement -- $generalizedStmt prepareNoFetch, bind, execute, executeNoFetch, - -- *** Select+ -- ** Select -- $select prepareQuery, fetch, runQuery, - -- *** Insert Values+ -- ** Insert Values -- $insertValue prepareInsert, runInsert, - -- *** Insert Select Results+ -- ** Insert Select Results -- $insertSelect prepareInsertQuery, runInsertQuery, - -- *** Update+ -- ** Update -- $update prepareUpdate, runUpdate, - -- *** Delete+ -- ** Delete -- $delete prepareDelete, runDelete, - -- *** Update by Key+ -- ** Update by Key -- $keyUpdate prepareKeyUpdate, bindKeyUpdate,@@ -170,12 +186,15 @@ 'wheres' and 'having' operators appends a new condition into whole query condition. 'having' only accepts aggregated projection value.++'(<-#)' operator assigns update target column and projection value to build update statement structure. -} {- $directJoin Not monadic style join is supported by some direct join operators. 'inner', 'left', 'right', 'full' operators can construct join products directly like SQL.+'inner' operator is INNER JOIN of SQL, 'left' operator is LEFT OUTER JOIN of SQL, and so on. 'on'' operator specifies condition of join product. -} @@ -184,6 +203,14 @@ 'relation' operator finalizes flat (not aggregated) query monadic context, and 'aggregateRelation' operator finalizes aggregated query monadic context.+Both operator convert monadic context into 'Relation' type,+and finalized 'Relation' can be reused as joining and sub-quering in another queries.++'updateTarget' operator finalize monadic context into 'UpdateTarget' type+which can be used as update statement.++'restriction' operator finalize monadic context into 'Restriction' type+which can be used as delete statement. -} {- $projection@@ -249,23 +276,38 @@ 'nagateMaybe' operator is maybe flavor of 'nagate', 'sumMaybe' operator is maybe flavor of 'sum''. -Module "Database.Relational.Query.Projectable" contains documentation of-other 'Maybe' flavor projection operators.+Module "Database.Relational.Query.Projectable" and "Database.Relational.Query.ProjectableExtended"+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. -'query'', 'left'', 'relation'' and 'union''-operator is placeholder flavor 'query', 'left', 'relation' and union.+'query'', 'left'', 'relation'', 'updateTarget'', 'restriction'', and 'union''+operator are placeholder flavor 'query', 'left', 'relation', 'updateTarget', 'restriction' and 'union'. -Module "Database.Relational.Query.Relation" contains documentation of-other placeholder flavor operators.+Module "Database.Relational.Query.Relation" and "Database.Relational.Query.Effect"+contains documentation of other placeholder flavor operators. -} +{- $databaseStatements+Some functions are defined to expand query structure+into flat SQL statements to be used by database operation. +'relationalQuery' function converts 'Relation' type info flat SQL query like SELECT statement.++'typedInsert' function converts 'Pi' key type info flat SQL INSERT 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.+-}++ {- $databaseOperations-Some actions are defined for database side effects.+Some HDBC actions are defined for database side effects. -} {- $generalizedStmt