On 11/28/05, Sean Davis <[EMAIL PROTECTED]> wrote:
> Is there a way to pass the make_classes params via RDBO::Loader->new?
> Instead of doing:
>
> My $loader = RDBO::Loader->new()
>
> Then
>
> $loader->make_classes(include_tables => 'xyz')
>
> Doing something like:
>
> My $loader = RDBO::Loader->new(make_classes => {exclude_tables => 'xyz'});
>
> $loader->make_classes();

Nope.  I debated how many params to make object attrs and how any to
leave as args to make_classes.  In the end, I decided that the
include/exclude stuff should be args to make_classes.  The usage
scenario I imagined is setting up a loader once and then running it a
few times with different include/exclude args to make classes with and
without managers, for example, for different sets of tables.

Is there a reason you want to set up the include/exclude stuff in the
loader itself instead of passing args to make_classes?

> Another unrelated question--how does one get a list of the "loaded" tables
> from the loader after the creation is completed?  Does something like
> $loader->classes exists?

No, since the classes created are not object data.  They're just the
result of a particular call to make_classes().  If you want to see the
list of tables, catch the classes returned by make_classes() and then
call $class->meta->table on each Rose::DB::Object-derived class made.

-John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to