diff --git a/package.json b/package.json index 9984961..a85d799 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "decimal.js": "^10.0.0", "g": "^2.0.1", "global": "^4.3.2", - "pg": "^6.1.2" + "pg": "^6.1.2", + "pulp": "^12.3.0" } } diff --git a/test/Main.purs b/test/Main.purs index a94236f..6dfb7c4 100644 --- a/test/Main.purs +++ b/test/Main.purs @@ -33,7 +33,7 @@ import Test.Unit.Main (runTest) withRollback ∷ ∀ a - . Connection + . Connection → Aff a → Aff Unit withRollback conn action = do @@ -135,6 +135,15 @@ main = void $ launchAff do """) Row0 liftEffect <<< assert $ names == [Row2 "pork" true, Row2 "rookworst" true] + test conn "delete column subset" $ do + insertFood + deleted <- query conn (Query """ + DELETE FROM foods + WHERE delicious + RETURNING name, delicious + """) Row0 + liftEffect <<< assert $ deleted == [Row2 "pork" true, Row2 "rookworst" true] + test conn "handling instant value" $ do before <- liftEffect $ (unwrap <<< unInstant) <$> now insertFood