Looks like my builder macro worked. So now for some more black magic - can I make any assumptions regarding the order in which the columns return? getObject(String)
is slower than getObject(int)
@ben.sless Well, the columns are in a particular order — the “natural” query order — but your builder can’t know that without going into the ResultSetMetaData
and getting the column names (which seems to be part of what you are trying to avoid).
Maybe I can do it once then cache the result, unless that can theoretically change every time I run the query? My queries are pretty static, if it makes any difference
The order should match the query.
select *
Ugh!
tell me about it
select
’ing explicit column names is going to be better/faster than *
(which requires some level of introspection).
(on both sides of the SQL/JDBC boundary!)
I'm aiming at minimal friction with the existing code base
But it looks like *
returns the columns in the order they are specified when creating the table
cooking with gas / 10