mirror of
https://github.com/nikita-volkov/hasql.git
synced 2024-11-26 11:57:01 +03:00
Reproduce the empty array issue (#46)
This commit is contained in:
parent
4f23fe5908
commit
c883289be3
@ -22,6 +22,27 @@ tree =
|
||||
localOption (NumThreads 1) $
|
||||
testGroup "All tests"
|
||||
[
|
||||
testCase "Empty array" $
|
||||
let
|
||||
io =
|
||||
do
|
||||
x <- Connection.with (Session.run session)
|
||||
assertEqual (show x) (Right (Right [])) x
|
||||
where
|
||||
session =
|
||||
Session.query () query
|
||||
where
|
||||
query =
|
||||
Query.statement sql encoder decoder True
|
||||
where
|
||||
sql =
|
||||
"select array[]::int8[]"
|
||||
encoder =
|
||||
Encoders.unit
|
||||
decoder =
|
||||
Decoders.singleRow (Decoders.value (Decoders.array (Decoders.arrayDimension replicateM (Decoders.arrayValue Decoders.int8))))
|
||||
in io
|
||||
,
|
||||
testCase "Failing prepared statements" $
|
||||
let
|
||||
io =
|
||||
|
Loading…
Reference in New Issue
Block a user