fix: allow cast on types with underscores/numbers
e.g. select=oid_array::_int4
This commit is contained in:
committed by
Steve Chavez
parent
867f2569a0
commit
d88b16e5ab
@@ -365,6 +365,13 @@ spec actualPgVersion = do
|
||||
, matchHeaders = []
|
||||
}
|
||||
|
||||
it "can cast types with underscore and numbers" $
|
||||
get "/oid_test?select=id,oid_col::int,oid_array_col::_int4"
|
||||
`shouldRespondWith` [json|
|
||||
[{"id":1,"oid_col":12345,"oid_array_col":[1,2,3,4,5]}]
|
||||
|]
|
||||
{ matchHeaders = [matchContentTypeJson] }
|
||||
|
||||
it "requesting parents and children" $
|
||||
get "/projects?id=eq.1&select=id, name, clients(*), tasks(id, name)" `shouldRespondWith`
|
||||
[json|[{"id":1,"name":"Windows 7","clients":{"id":1,"name":"Microsoft"},"tasks":[{"id":1,"name":"Design w7"},{"id":2,"name":"Code w7"}]}]|]
|
||||
|
||||
Reference in New Issue
Block a user