[Dbix-class] Accessing $dbh for blobs/large-objects
Jesper Krogh
jesper at krogh.cc
Tue May 9 11:33:45 CEST 2006
> I've only been using this toolkit for about a week,
> but I am also running Postgres8.1 and had had no trouble accessing BLOB
> type fields using a bytea data type and the normal DBIx accessors, like
> $"result_row->blob". However I haven't tried to store
> megabytes of stuff yet. So I think it 'just works' the way you might hope,
> although I am sure someone with more experience on the system will have
> more informed thoughts than I.
Storing data to BYTEA does _not_ work currently. Retrieving works
flawlessly, since there is not changes to be done. (perldoc DBD::Pg)
For storing BYTEA, I currently add a method to the individual class that
does the magic on the database-handle. Works flawlessly and gives me
"lazy" loading
of the BYTEA-columns too, which (I think) is generally desireable.
Jesper
--
Jesper Krogh
More information about the Dbix-class
mailing list