Re: Why are my col names lowercased?

[prev] [thread] [next] [Date index for 2004/10/13]

From: Perrin Harkins
Subject: Re: Why are my col names lowercased?
Date: 21:15 on 13 Oct 2004
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

Why are my col names lowercased?
Sean Quinlan 18:56 on 13 Oct 2004

Re: Why are my col names lowercased?
Perrin Harkins 19:26 on 13 Oct 2004

Re: Why are my col names lowercased?
Sean Quinlan 21:08 on 13 Oct 2004

Re: Why are my col names lowercased?
Perrin Harkins 21:15 on 13 Oct 2004

Re: Why are my col names lowercased?
Daniel Wijnands 19:29 on 13 Oct 2004

Re: Why are my col names lowercased?
Sean Quinlan 21:07 on 13 Oct 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52