WriteLOBs storage component and 2 implementations
Factor out the LOB Writing code through an API from ::Sybase::ASE into a
generic component, ::Storage::DBI::WriteLOBs which requires the
composing class to implement just two methods, _write_lobs and _empty_lob
and implements insert, update and insert_bulk as well as a bunch of low
level methods (which are private.) These methods are documented in the
component as top comments.
::DBI::Oracle::Generic and ::Sybase::ASE implement this component.
The implementation is stackable, so that a composing class override of
LOB handling using the low level methods will not conflict with the
inherited methods, however for performance reasons a flag has been
added:
local $self->{_skip_writelobs_impl} = 1;
to shortcircuit the implementation even faster. This flag is not
documented and will be replaced using the capability system in the
future, it is used in the ASE implementation of insert_bulk because of
the special identities handling it requires.
This refactor addresses a number of issues:
- rows can now be identified by unique constraints, not just PKs for
LOB ops
- ASE UPDATEs with LIKE queries on TEXT columns in the WHERE condition
now work
- LOB ops now work in Oracle with quoting turned on
- LOB ops work in Oracle with DBD::Oracle 1.23
- insert_bulk now works with LOBs for Oracle, as long as the slices can
be uniquely identified