sql2o is a small library, which makes it easy to convert the result of your sql-statements into objects. No resultset hacking required. Kind of like an orm, but without the sql-generation capabilities. Supports named parameters.
I need to use IN clause in a query. We're using version 1.5.4 version of sql2o. When I bind a list of strings to the query, I am getting the below exception
java.lang.RuntimeException: Error adding parameter 'ids' - Invalid column type at org.sql2o.Query.addParameterInternal(Query.java:137) at org.sql2o.Query.addParameter(Query.java:173) at org.sql2o.Query.addParameter(Query.java:194)
I had then updated the sql2o version to 1.6 and I am successfully able to bind a list to IN clause in the query.
query.addParameter("ids", List<String> ids);
With the new 1.6 version, I am trying to a perform a modify operation when performs an update query. The executeUpdate() is throwing an exception "Operation not allowed". But the same code works with 1.5.4 version of sql2o.
Is this a known issue? Is there any work around where I can use "IN" clause with 1.5.4 version. Please suggest. Thank you
I need to use IN clause in a query. We're using version 1.5.4 version of sql2o. When I bind a list of strings to the query, I am getting the below exception
java.lang.RuntimeException: Error adding parameter 'ids' - Invalid column type at org.sql2o.Query.addParameterInternal(Query.java:137) at org.sql2o.Query.addParameter(Query.java:173) at org.sql2o.Query.addParameter(Query.java:194)
I had then updated the sql2o version to 1.6 and I am successfully able to bind a list to IN clause in the query.
query.addParameter("ids", List<String> ids);
With the new 1.6 version, I am trying to a perform a modify operation when performs an update query. The executeUpdate() is throwing an exception "Operation not allowed". But the same code works with 1.5.4 version of sql2o.
Is this a known issue? Is there any work around where I can use "IN" clause with 1.5.4 version. Please suggest. Thank you