[JDBC-68] Optional 'identifer' kwarg should be responsible to keywordize row keys Created: 14/Aug/13 Updated: 01/Jun/16 Resolved: 15/Sep/13
|Reporter:||Shantanu Kumar||Assignee:||Sean Corfield|
Optional 'identifier' kwarg only transforms the string column name to another string; the row keys are always keywordized. In some result parsing cases, where a different transformation may be required the default keywordization would be unnecessary.
A possible solution is to expand the responsibility of 'identifier' to keywordize (default behavior) when required. This solution is attached as a patch to this issue, and passes all tests.
|Comment by Sean Corfield [ 14/Aug/13 3:34 PM ]|
The problem with this approach is that anyone using the `identifiers` approach - overriding the default behavior - will now have broken code. I'll give it more thought. I think a :keyword? true|false argument, passed thru everything is the only way to maintain backward compatibility but that's a lot of churn so breaking backward compatibility may be the less painful approach (esp. since 0.3.0 is a whole new API anyway).
|Comment by Sean Corfield [ 15/Sep/13 4:15 PM ]|
java.jdbc has always converted column identifiers to keywords and having keys in maps be keywords is idiomatic in Clojure. If some folks want non-keywords, they can post-process the results.
Adding another option to turn keywords on and off will make the API more complex and breaking compatibility by suddenly not turning the column names into keywords, and forcing a lot of existing code to change, is not acceptable at this point.