On Mon, Jan 19, 2004 at 11:19:04PM +0000, Tim Bunce wrote:
> On Mon, Jan 19, 2004 at 02:32:17PM -0500, John Siracusa wrote:
> > On 1/19/04 2:22 PM, Tim Bunce wrote:
> > > Short answer: no.
> > 
> > Can I please have the long answer? :)
> 
> I have no time, I've a plane to catch. Perhaps others can share
> there views and examples.
> 
> > Passing code
> > refs to bind_columns() calls is not what I'd consider "convenient."
> 
> When I said "But I do think a "column type system" is needed to
> provide the hooks that'll enable you to do what you want" I'm
> thinking in terms of some way to say "use this code ref by default
> for all fields with a TYPE value of SQL_DATE, for example.

Just to flesh that out a little more... something like:

  # Override types for which you don't want the default of SQL_VARCHAR
  $dbh->{BindColumnTypes} = {
    SQL_DATE => SQL_DATE,
    SQL_DATETIME => { TYPE => SQL_DATETIME, OnFetch => \&my_inflate_thingy },
  }

Tim.

Reply via email to