You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I execute a query that has a comment that contains a colon, kotliquery attempts to use that colon as a bind parameter and we get the following error:
The column index is out of range: 1, number of columns: 0.
org.postgresql.util.PSQLException: The column index is out of range: 1, number of columns: 0.
at org.postgresql.jdbc.PgPreparedStatement.setNull(PgPreparedStatement.java:192)
at kotliquery.Session.populateParams$lambda-1(Session.kt:291)
at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:721)
at kotliquery.Session.populateParams(Session.kt:91)
at kotliquery.Session.createPreparedStatement(Session.kt:116)
at kotliquery.Session.execute(Session.kt:204)
at kotliquery.action.ExecuteQueryAction.runWithSession(ExecuteQueryAction.kt:9)
at kotliquery.Session.run(Session.kt:231)
Oh, was my comment confusing? To make my above comment clearer, I meant that the named parameter feature should be improved to support comment parts properly. I'm sure that we are on the same page.
If I execute a query that has a comment that contains a colon, kotliquery attempts to use that colon as a bind parameter and we get the following error:
Reproduction:
Executing the same code straight against Postgres does not fail, as the commented out code is properly ignored.
Kotliquery version: 1.6.1
The text was updated successfully, but these errors were encountered: