[Dbix-class] Postgresql and binary data support

Nathan Gray kolibrie at graystudios.org
Fri Nov 10 21:14:31 GMT 2006


On Fri, Nov 10, 2006 at 12:43:03PM -0800, John Napiorkowski wrote:
> --- Nathan Gray <kolibrie at graystudios.org> wrote:
> > 
> > Would that be an InflateColumn plugin similar to
> > DBIx::Class::InflateColumn::DateTime?
> 
> If I can create a transaction here that would be a
> good place for it.  But I think the main trouble is
> that all the databases have quite varied approaches to
> this, so I am starting be be doubtful I can create
> something that can be used across the board. I am
> guessing I need to create something like an in/deflate
> plugin that supports various plugins below it for the
> different databases.  That way I can do the postgresql
> one for my client but put something in place other
> people could add into.  Just not sure what direction
> others have taken in this, so I thought to ask for
> thoughts

I think that could work.  The _datetime_parser method in
DBIx::Class::InflateColumn::DateTime fetches from

  $self->result_source->storage

which is one of:

  DBIx::Class::Storage::DBI::*

There seems to be a 'sqlt_type' method in each storage object, which
may or may not be useful.

So you should definitely know which database type you are connected
to, and can dispatch to the correct database-specific plugin.

-kolibrie




More information about the Dbix-class mailing list