Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1 #264

Open
johannegger opened this issue May 4, 2023 · 1 comment

Comments

@johannegger
Copy link

johannegger commented May 4, 2023

Version: (e.g. 4.6.0.1)
Module: (e.g. quill-jdbc)
Database: (e.g. postgresql)

Expected behavior

I have a table with a column of type nullable uuid (i map postgres uuid -> java.util.UUID)
inserting of rows works as expected but filtering by this field when it's empty results in this error:

org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1

calling translate and executing the resulting query from the command-line works just fine.

I created this snippet but as since the problem is related to the jdbc driver it's not happening there.

Workaround

using String instead of java.util.UUID works

@getquill/maintainers

@timzaak
Copy link
Contributor

timzaak commented Dec 8, 2023

add code like this, it has a doc: https://zio.dev/zio-quill/extending-quill

import ctx._
import java.util.UUID

implicit val encodeUUID = MappedEncoding[UUID, String](_.toString)
implicit val decodeUUID = MappedEncoding[String, UUID](UUID.fromString(_))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants