[Dbix-class] Accessing $dbh for blobs/large-objects

Toby Corkindale tjc at wintrmute.net
Tue May 9 13:40:51 CEST 2006


On Mon, May 08, 2006 at 08:23:10PM +0100, Matt S Trout wrote:
> Toby Corkindale wrote:
> > Hi,
> > I'm trying to do some work with large objects (blobs) in PostgreSQL, via a
> > DBIx::Class::Schema-based database.
> > Is this the correct way to get at the $dbh to use?
> > my $dbh = $c->model('DB')->schema->storage->_dbh;
> 
> No, ->dbh is the method you'd want.
> 
> More importantly, why do you need to get at the dbh for this anyway?

I want access to read/write/seek/tell on the blob fh.

Is there a DBIx class method to do this already? I couldn't find anything with
Google or CPAN when I was searching yesterday, but sometimes it's all about
just knowing the right thing to search for..

tjc

-- 
Turning and turning in the widening gyre/The falcon cannot hear the falconer;
Things fall apart, the centre cannot hold/Mere anarchy is loosed upon the world
(gpg --keyserver www.co.uk.pgp.net --recv-key B1CCF88E)



More information about the Dbix-class mailing list