On Tue, 11 Sep 2001, Wilson, Doug wrote:
> > Why will fetchrow_hashref change in the future
> > to return the same reference each time?
> The idea is that it takes time to create a new hash, and
> it is quicker to just reuse the old hash. If you are
> just fetching and processing one record at a time, then
> you will benefit.
This I understand. But it seems that the purpose of
fetchrow_hashref is to iterate through the results
without committing to grabbing them all. This seems
to imply more than one row, especially as there is
no selectrow_hashref.
If I want a hashref it seems that in all but exceptionally
well defined situations I would need a unique ref.
I suppose the idea is that it is handy to slide down
through your results throwing stuff away until you
find the one you want.
Given how fetchall_arrayref( $hash_ref) works (and relates
to fetchrow_hashref) such a change seems confusing.
Is there some thought that the actual hash will be partly
preserved, thus saving time?
> If you want to save the records (e.g. in an array), then
> you should probably be using one of the fetchall_* or
> selectall_* methods anyway, or you will need to copy
> the record before saving it.
rob Live the dream.