Fork me on GitHub
Lyn Headley23:10:30

Using honeysql and sqlite: If I do a (select :*) (from :a) where :a has column 'name', and then join two more tables each with a 'name' column, I get name_1 name_2 name_3 in the result map. Am I guranteed that name_3 is from the third table (second join table)?


That's done inside I'd have to check the source code to see whether you can rely on the order but I would advise not relying on that order.


next.jdbc does not attempt to make columns unique like this -- but the default behavior is to make qualified column names using the table name (if available) for each column.

Lyn Headley23:10:55

Ok so I guess I need to manually name the resulting columns and include every column I want explicitly in the select clause.


Just looked, the columns are processed in order, based on how they come back in the JDBC ResultSet object -- so you're guaranteed ordering if that is part of the JDBC spec I suppose (I have no idea whether it is).


You could try using next.jdbc and work with qualified column names instead -- that would make it unambiguous.


(I have no plans to work on in future, except for fixing show stopping bugs, so next.jdbc is where all active development is now)