[JDBC-87] Laziness on metadata-result results in closed resultset under Microsoft SQL Created: 06/Jan/14 Updated: 01/Jun/16 Resolved: 30/Jan/14
|Reporter:||Niels van Klaveren||Assignee:||Sean Corfield|
Getting a collection of tables, and then using these to get the columns inside the tables work swimmingly under Oracle, but throws an exception under Microsoft SQL (driver 4.0.2206.100)
CompilerException com.microsoft.sqlserver.jdbc.SQLServerException: The result set is closed., compiling:(form-init602030969958815921.clj:2:3)
The problem lies in the mapcat part. Using only map works fine, but there's no way to concat before the doall, since that results in the same exception.
Changing metadata-result from
fixes things, but I'm not entirely sure of the consequences that would entail in case laziness would be intended.
|Comment by Niels van Klaveren [ 06/Jan/14 7:23 AM ]|
Giving metadata-result a result-set-fn parameter defaulting to either identity or doall would work, I guess.
|Comment by Sean Corfield [ 06/Jan/14 11:15 AM ]|
Yes, I think that is probably the right solution. I'll review it in the context of query etc and make sure it would create a consistent API. It might be worthwhile having :row-fn as well but I need to compare the functions and think carefully about the impact of those changes.
Thanx for spotting the problem!
|Comment by Sean Corfield [ 30/Jan/14 1:34 AM ]|
Add :row-fn and :result-set-fn to metadata-result