Persistent::Oracle

Persistent::Oracle is a persistent class implemented using an Oracle database.
Download

Persistent::Oracle Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • David Winters
  • Publisher web site:
  • http://search.cpan.org/~dwinters/Persistent-mSQL-0.50/lib/Persistent/mSQL.pm

Persistent::Oracle Tags


Persistent::Oracle Description

Persistent::Oracle is a persistent class implemented using an Oracle database. Persistent::Oracle is a persistent class implemented using an Oracle database.SYNOPSIS use Persistent::Oracle; use English; # import readable variable names like $EVAL_ERROR eval { ### in case an exception is thrown ### ### allocate a persistent object ### my $emp = new Persistent::Oracle('dbi:Oracle:ORCL', 'scott', 'tiger', 'emp'); ### define attributes of the object ### $emp->add_attribute('empno', 'ID', 'Number', undef, 4); $emp->add_attribute('ename', 'Persistent', 'VarChar', undef, 10); $emp->add_attribute('job', 'Persistent', 'VarChar', undef, 9); $emp->add_attribute('mgr', 'Persistent', 'Number', undef, 4); $emp->add_attribute('hiredate', 'Persistent', 'DateTime', undef); $emp->add_attribute('sal', 'Persistent', 'Number', undef, 7, 2); $emp->add_attribute('comm', 'Persistent', 'Number', undef, 7, 2); $emp->add_attribute('deptno', 'Persistent', 'Number', undef, 2); ### query the datastore for some objects ### $emp->restore_where(qq{ sal > 1000 and job = 'CLERK' and ename LIKE 'M%' }, "sal, ename"); while ($emp->restore_next()) { printf "ename = %s, emp# = %s, sal = %s, hiredate = %sn", $emp->ename, $emp->empno, $emp->sal, $emp->hiredate; } }; if ($EVAL_ERROR) { ### catch those exceptions! ### print "An error occurred: $EVAL_ERRORn"; }ABSTRACTThis is a Persistent class that uses an Oracle database table to store and retrieve objects. This class can be instantiated directly or subclassed. The methods described below are unique to this class, and all other methods that are provided by this class are documented in the Persistent documentation. The Persistent documentation has a very thorough introduction to using the Persistent framework of classes. Requirements: · Perl


Persistent::Oracle Related Software