DBD-Oracle
view release on metacpan or search on metacpan
The changes should fix build problems for Oracle 7.3.x.
Requires DBI 0.83.
Oraperl now uses DBI->connect and thus works with DBI 0.81 to
automatically support Apache without requiring script changes.
Reworked parameter binding in preparation for future changes.
- mutated placeholder values are now automatically rebound.
- in/out vars that become undef/null after binding now work.
- transparent support for longs should be easier to implement.
Added Win32 support from Jeff Urlwin.
Added some documentation to DBD::Oracle for 'perldoc DBD::Oracle'.
Most tests now converted to standard t/*.t format.
Added $sth->{NULLABLE}->[$field].
Added private plsql_errstr method: $txt=$dbh->func('plsql_errstr')
to fetch PL/SQL error messages. Thanks to Bob Menteer.
Added $sth->{ora_pad_empty} and ORAPERL_PAD_EMPTY env var
README.mkdn view on Meta::CPAN
## Locator Data Interface
### Simple Usage
When fetching LOBs with this interface a 'LOB Locator' is created then used to get the lob with the LongReadLen and LongTruncOk attributes.
The value for 'LongReadLen' is dependent on the version and settings of the Oracle DB you are using. In theory it ranges from 8GBs
in 9iR1 up to 128 terabytes with 11g but you will also be limited by the physical memory of your PERL instance.
When inserting or updating LOBs some _major_ magic has to be performed
behind the scenes to make it transparent. Basically the driver has to
insert a 'LOB Locator' and then refetch the newly inserted LOB
Locator before being able to write the data into it. However, it works
well most of the time, and I've made it as fast as possible, just one
extra server-round-trip per insert or update after the first. For the
time being, only single-row LOB updates are supported.
To insert or update a large LOB using a placeholder, DBD::Oracle has to
know in advance that it is a LOB type. So you need to say:
$sth->bind_param($field_num, $lob_value, { ora_type => ORA_CLOB });
lib/DBD/Oracle.pm view on Meta::CPAN
=head2 Locator Data Interface
=head3 Simple Usage
When fetching LOBs with this interface a 'LOB Locator' is created then used to get the lob with the LongReadLen and LongTruncOk attributes.
The value for 'LongReadLen' is dependent on the version and settings of the Oracle DB you are using. In theory it ranges from 8GBs
in 9iR1 up to 128 terabytes with 11g but you will also be limited by the physical memory of your PERL instance.
When inserting or updating LOBs some I<major> magic has to be performed
behind the scenes to make it transparent. Basically the driver has to
insert a 'LOB Locator' and then refetch the newly inserted LOB
Locator before being able to write the data into it. However, it works
well most of the time, and I've made it as fast as possible, just one
extra server-round-trip per insert or update after the first. For the
time being, only single-row LOB updates are supported.
To insert or update a large LOB using a placeholder, DBD::Oracle has to
know in advance that it is a LOB type. So you need to say:
$sth->bind_param($field_num, $lob_value, { ora_type => ORA_CLOB });
OCIHandleFree_log_stat(imp_sth, imp_sth->dschp, OCI_HTYPE_DESCRIBE, status);
imp_sth->lob_refetch = lr; /* structure copy */
return 1;
}
int
post_execute_lobs(SV *sth, imp_sth_t *imp_sth, ub4 row_count) /* XXX leaks handles on error */
{
/* To insert a new LOB transparently (without using 'INSERT . RETURNING .') */
/* we have to insert an empty LobLocator and then fetch it back from the */
/* server before we can call OCILobWrite on it! This function handles that. */
dTHX;
sword status;
int i;
OCIError *errhp = imp_sth->errhp;
lob_refetch_t *lr;
D_imp_dbh_from_sth;
SV *dbh = (SV*)DBIc_MY_H(imp_dbh);
( run in 0.508 second using v1.01-cache-2.11-cpan-0a6323c29d9 )