| DBIx::Class::Storage::DBI::Oracle::Generic - Automatic primary key class for Oracle |
DBIx::Class::Storage::DBI::Oracle::Generic - Automatic primary key class for Oracle
# In your table classes __PACKAGE__->load_components(qw/PK::Auto Core/); __PACKAGE__->add_columns({ id => { sequence => 'mysequence', auto_nextval => 1 } }); __PACKAGE__->set_primary_key('id'); __PACKAGE__->sequence('mysequence');
This class implements autoincrements for Oracle.
Returns true if we have an open (and working) database connection, false if it is not (yet) open (or does not work). (Executes a simple SELECT to make sure it works.)
The reason this is needed is that the DBD::Oracle manpage's ping() does not do a real
OCIPing but just gets the server version, which doesn't help if someone killed
your session.
Returns the sequence name for an autoincrement column
This wraps the superclass version of this method to force table names to uppercase
This sets the proper DateTime::Format module for use with the DBIx::Class::InflateColumn::DateTime manpage.
Handle LOB types in Oracle. Under a certain size (4k?), you can get away with the driver assuming your input is the deprecated LONG type if you encode it as a hex string. That ain't gonna fly at larger values, where you'll discover you have to do what this does.
This method had to be overridden because we need to set ora_field to the actual column, and that isn't passed to the call (provided by Storage) to bind_attribute_by_data_type.
According to the DBD::Oracle manpage, the ora_field isn't always necessary, but adding it doesn't hurt, and will save your bacon if you're modifying a table with more than one LOB column.
Andy Grundman <andy@hybridized.org>
Scott Connelly <scottsweep@yahoo.com>
You may distribute this code under the same terms as Perl itself.
| DBIx::Class::Storage::DBI::Oracle::Generic - Automatic primary key class for Oracle |