Consider a query as follows:
select 1 from sometable where somecolumn = ?;
Calling getBindValues() on the org.jooq.Query object constructed for this query returns 2 values - the first one being 1 and the second one being the parameterized value for 'somecolumn' corresponding to the '?'.
This causes a problem when iterating through the bind values and invoking the setObject(int parameterIndex, Object x) of java.sql.PreparedStatement - this will cause an exception such as:
org.postgresql.util.PSQLException: The column index is out of range: 2, number of columns: 1.
Can someone suggest how to handle such a scenario? i.e. some way to ignore the constants which are not substitute-able indexed parameters.
Thanks