I'm writing a Dropwizard app that needs to connect to the database, and using SQL objects to query the DB, per the Dropwizard docs.
The issue I'm running into is when my query is using a type specifier (::
) being confused for a binding variable. Something like
SELECT
(a,
b,
c)::user_type
FROM ...
WHERE id = :id
The parser is reading ::user_type
as a parameter placeholder. When I've escaped them with \
, it says the query is not returning any rows, but if I run the query through psql
, it does, so I'm guessing it's not so simple. Any help would be appreciated.
Thanks! :D