relax attoparsec upper bound
This commit is contained in:
parent
cd16b2b22f
commit
129b1734c3
@ -47,7 +47,7 @@ library
|
|||||||
build-depends:
|
build-depends:
|
||||||
base >=4.8 && <5.0
|
base >=4.8 && <5.0
|
||||||
, aeson >=1.0
|
, aeson >=1.0
|
||||||
, attoparsec >= 0.13 && < 0.14
|
, attoparsec >= 0.13 && < 0.15
|
||||||
, blaze-html
|
, blaze-html
|
||||||
, bytestring
|
, bytestring
|
||||||
, conduit >=1.3
|
, conduit >=1.3
|
||||||
|
|||||||
@ -6,6 +6,7 @@ packages:
|
|||||||
|
|
||||||
extra-deps:
|
extra-deps:
|
||||||
- lift-type-0.1.0.1
|
- lift-type-0.1.0.1
|
||||||
|
- attoparsec-0.14.1
|
||||||
- persistent-2.13.0.0
|
- persistent-2.13.0.0
|
||||||
- persistent-sqlite-2.13.0.0
|
- persistent-sqlite-2.13.0.0
|
||||||
- persistent-mysql-2.13.0.0
|
- persistent-mysql-2.13.0.0
|
||||||
|
|||||||
@ -34,6 +34,8 @@ module Common.Test
|
|||||||
, cleanUniques
|
, cleanUniques
|
||||||
, RunDbMonad
|
, RunDbMonad
|
||||||
, Run
|
, Run
|
||||||
|
, updateRethrowingQuery
|
||||||
|
, selectRethrowingQuery
|
||||||
, p1, p2, p3, p4, p5
|
, p1, p2, p3, p4, p5
|
||||||
, l1, l2, l3
|
, l1, l2, l3
|
||||||
, u1, u2, u3, u4
|
, u1, u2, u3, u4
|
||||||
@ -2578,3 +2580,17 @@ selectRethrowingQuery query =
|
|||||||
`catch` \(SomeException e) -> do
|
`catch` \(SomeException e) -> do
|
||||||
(text, _) <- renderQuerySelect query
|
(text, _) <- renderQuerySelect query
|
||||||
liftIO . throwIO . userError $ Text.unpack text <> "\n\n" <> show e
|
liftIO . throwIO . userError $ Text.unpack text <> "\n\n" <> show e
|
||||||
|
|
||||||
|
updateRethrowingQuery
|
||||||
|
::
|
||||||
|
( MonadUnliftIO m
|
||||||
|
, PersistEntity val
|
||||||
|
, BackendCompatible SqlBackend (PersistEntityBackend val)
|
||||||
|
)
|
||||||
|
=> (SqlExpr (Entity val) -> SqlQuery ())
|
||||||
|
-> SqlWriteT m ()
|
||||||
|
updateRethrowingQuery k =
|
||||||
|
update k
|
||||||
|
`catch` \(SomeException e) -> do
|
||||||
|
(text, _) <- renderQueryUpdate (from k)
|
||||||
|
liftIO . throwIO . userError $ Text.unpack text <> "\n\n" <> show e
|
||||||
|
|||||||
@ -1423,6 +1423,26 @@ main = do
|
|||||||
testJSONInsertions
|
testJSONInsertions
|
||||||
testJSONOperators
|
testJSONOperators
|
||||||
testLateralQuery
|
testLateralQuery
|
||||||
|
testUpdateWithExperimental
|
||||||
|
|
||||||
|
testUpdateWithExperimental :: Spec
|
||||||
|
testUpdateWithExperimental = fdescribe "Update/Experimental" $ do
|
||||||
|
it "works" $ do
|
||||||
|
run $ do
|
||||||
|
p1k <- insert p1
|
||||||
|
updateRethrowingQuery $ \p -> do
|
||||||
|
(p0 :& p1) <- Experimental.from $
|
||||||
|
Table @Person
|
||||||
|
`InnerJoin`
|
||||||
|
Table @Person
|
||||||
|
`Experimental.on` do
|
||||||
|
\(p0 :& p1) ->
|
||||||
|
p0 ^. PersonName ==. p1 ^. PersonName
|
||||||
|
|
||||||
|
set p [ PersonName =. val "asdf" ]
|
||||||
|
where_ $ p0 ^. PersonName ==. p ^. PersonName
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
run, runSilent, runVerbose :: Run
|
run, runSilent, runVerbose :: Run
|
||||||
runSilent act = runNoLoggingT $ run_worker act
|
runSilent act = runNoLoggingT $ run_worker act
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user