Fork me on GitHub

Playing with next.jdbc, newbie Q, but the column names returned via queries / inserts are lowercase vs uppercase depending on the DB


while I'm here, is there way grab the options back out of the built datasource?


@darioszr Yeah, apparently draft releases can only be seen within the org -- TIL. Here's the change log instead (not all changes in 1.0.2 are in issues @thenonameguy)

clj 4

@jonpither If you want case consistent across DBs, you'll probably need {:builder-fn rs/as-lower-maps} but that can also cause problems with DBs that are both case-sensitive and return UPPER CASE names... RDBMS is such a hot mess of non-standard and/or inconsistent behavior 😞


And finding next.jdbc nice so far


Unqualified lower case was the default in If you have to work across multiple incompatible DBs, it's probably the easier option there too.


We use MySQL and it's case-sensitive in table names but not column names, so as-maps is a change for us, but we're slowly shifting over and new code is written with next.jdbc and that default. Where we have to interact with older code, we are trying to use as-unqualified-maps and just ensure our code is case insensitive


(we have to be careful that table names stay as-is because of MySQL but it doesn't matter whether column names are mixed or lower case, luckily -- then we just have accessor functions for mixed case column names -- a practice we stopped some years ago, but we have a lot of legacy DB tables with mixed case!)