Index

Dir

Who is Online
Человек на сайте: 3

go to:


[Linux] - Persistent::Oracle 0.50
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";
}

ABSTRACT

This 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



Download


Раздел: Linux Back







 

Тендерная система снабжения WWW.SAMARASNAB.RU Интерактивные системы снабжения www.allsnab.ru



Украинская Баннерная Сеть
CMS sPaiZ-Nuke     Design by IDEAL-DESIGN.ru