On Sat, 16 Jan 2010, Oliver Jowett wrote:
> John T. Dow wrote:
>
>> Certainly that piece of code can be made more efficient. One query ought to
>> be able to return all the primary keys.
>
> It's not the PKs it is after (it's already worked those out earlier), it's
> the column names to select to populate the rest of the resultset.
>
> But yes, it could be more efficient. We'd need a static String[]
> Field.getColumnNames(Connection,Field[]) method or similar.
>
I've adjusted the fetching of all of the ResultSetMetaData attributes to
happen in one query for the entire ResultSet instead of one attribute of
one column at a time. I've adjusted the updateable ResultSet code to use
ResultSetMetaData to take advantage of this, so refreshRow should be much
faster now.
Kris Jurka