in reply to Re: Class::DBI::Oracle and views
in thread Class::DBI::Oracle and views
And here's code from Modules.pl -- I'm not using Class::DBI::View in this version of the code, obviously. (Relevant info: this is a view containing enrollment data for a course.)#!/usr/bin/perl -w use strict; require Modules.pl; my @students = TestPkg::View->retrieve_all; # returns the same error as search() would warn Dumper(\@students);
The view is just generated from a command likepackage TestPkg::DBI; use base 'Class::DBI::Oracle'; TestPkg::DBI->set_db('Main', 'dbi:Oracle:devdv', 'username', 'password +'); package TestPkg::View; use base TestPkg::DBI; __PACKAGE__->table('course_enrollment'); __PACKAGE__->columns( All => qw/id username year term name_first name_ +last/ ); # and just for kicks, here's another package that's working just fine # it points to a table, not a view package TestPkg::Permissions; use base TestPkg::DBI; __PACKAGE__->table('permissions'); __PACKAGE__->columns( All => qw/id student_id access_level/);
(it's of course much longer and nastier -- but I can select things from it on the command line just fine.)CREATE OR REPLACE VIEW course_enrollment AS SELECT [...]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Class::DBI::Oracle and views
by perrin (Chancellor) on Sep 28, 2003 at 23:11 UTC | |
by janjan (Beadle) on Sep 28, 2003 at 23:23 UTC | |
by perrin (Chancellor) on Sep 29, 2003 at 01:20 UTC | |
by janjan (Beadle) on Sep 29, 2003 at 05:29 UTC |