eclipse-vertx / eclipse-vertx/vertx-sql-client
PostgreSQL case in where clause errror
- Dominant language
- Java
- Stars
- 912
- Forks
- 212
- Avg merge
- 17h 30m
- Merged PRs (30d)
- 3
Description
### Version
5.0.0
### Context
Wile working on Hibernate Reactive I noticed that
using PostgreSQL the query using `client.preparedQuery(sql).execute(parameters)`:
```sql
select f1_0.id,f1_0.age,f1_0.rating,f1_0.title
from Film f1_0
where f1_0.age<=case when (f1_0.rating=$1) then $2 when (f1_0.rating=$3) then $4 else $5 end
order by f1_0.id
```
with parameters `[1,2,3,4,5]`.
It throws:
```
operator does not exist: integer <= text (42883)] [select
f1_0.id,f1_0.age,f1_0.rating,f1_0.title from Film f1_0 where f1_0.age<=case when (f1_0.rating=$1) then $2 when (f1_0.rating=$3) then $4 else $5 end order by f1_0.id]
```
### Steps to reproduce
_No response_
### Do you have a reproducer?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.