Re: Why are my col names lowercased?
[prev]
[thread]
[next]
[Date index for 2004/10/13]
On Wed, 2004-10-13 at 17:08, Sean Quinlan wrote:
> > I'm guessing it was to normalize column names because they can come
> back
> > with the capitalization used in the query in some databases which are
> > not case-sensitive.
>
> If the database is not case sensitive, what would it matter to change
> the column names? I think I misunderstood you.
The database might not be case-sensitive, but Perl hashes are, so having
column names in the object with capitalization that differs from the
column names returned by a particular statement handle is a big problem.
> I suppose it would
> have been more concise to write something like 'I really don't want to
> hand-code the column names inside an otherwise generalized method'.
That makes sense.
> I am of course making the assumption here that values are returned in
> the same order as the array of column names. But the docs and a few
> tests seem to support that assumption.
Seems safe to me. You can always switch to an each() style iterator if
it doesn't work.
- Perrin