zio / zio-quill

Compile-time Language Integrated Queries for Scala

Home Page:https://zio.dev/zio-quill

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect SQL for inserting optional JsonbValue

lachezar opened this issue · comments

ZIO-protoquill 4.6.0

If I have Option[JsonbValue[_]] the generated query fails

ERROR: column "attributes" is of type jsonb but expression is of type character varying
  Hint: You will need to rewrite or cast the expression.
  Position: 225

As a workaround I can do JsonbValue[Option[_]], but it is not optimal.