packages feed

postgresql-syntax 0.4.0.2 → 0.4.1

raw patch · 5 files changed

+35/−6 lines, 5 files

Files

hedgehog-test/Main/Gen.hs view
@@ -24,8 +24,13 @@     [ SelectPreparableStmt <$> selectStmt,       InsertPreparableStmt <$> insertStmt,       UpdatePreparableStmt <$> updateStmt,-      DeletePreparableStmt <$> deleteStmt+      DeletePreparableStmt <$> deleteStmt,+      CallPreparableStmt <$> callStmt     ]++-- * Call++callStmt = CallStmt <$> funcApplication  -- * Insert 
library/PostgresqlSyntax/Ast.hs view
@@ -17,12 +17,20 @@ --   |  InsertStmt --   |  UpdateStmt --   |  DeleteStmt+--   |  CallStmt -- @ data PreparableStmt   = SelectPreparableStmt SelectStmt   | InsertPreparableStmt InsertStmt   | UpdatePreparableStmt UpdateStmt   | DeletePreparableStmt DeleteStmt+  | CallPreparableStmt CallStmt+  deriving (Show, Generic, Eq, Ord)++-- * Call++newtype CallStmt+  = CallStmt FuncApplication   deriving (Show, Generic, Eq, Ord)  -- * Insert
library/PostgresqlSyntax/Parsing.hs view
@@ -122,10 +122,20 @@ -- * PreparableStmt  preparableStmt =-  SelectPreparableStmt <$> selectStmt-    <|> InsertPreparableStmt <$> insertStmt-    <|> UpdatePreparableStmt <$> updateStmt-    <|> DeletePreparableStmt <$> deleteStmt+  asum+    [ SelectPreparableStmt <$> selectStmt,+      InsertPreparableStmt <$> insertStmt,+      UpdatePreparableStmt <$> updateStmt,+      DeletePreparableStmt <$> deleteStmt,+      CallPreparableStmt <$> callStmt+    ]++-- * Call++callStmt = do+  keyword "call"+  space1+  CallStmt <$> funcApplication  -- * Insert 
library/PostgresqlSyntax/Rendering.hs view
@@ -50,6 +50,12 @@   InsertPreparableStmt a -> insertStmt a   UpdatePreparableStmt a -> updateStmt a   DeletePreparableStmt a -> deleteStmt a+  CallPreparableStmt a -> callStmt a++-- * Call++callStmt (CallStmt a) =+  "CALL " <> funcApplication a  -- * Insert 
postgresql-syntax.cabal view
@@ -1,5 +1,5 @@ name: postgresql-syntax-version: 0.4.0.2+version: 0.4.1 category: Database, PostgreSQL, Parsing synopsis: PostgreSQL AST parsing and rendering description: