Re: autogenerating has_a and has_many from foreign keys

[prev] [thread] [next] [Date index for 2004/12/13]

From: merlyn (Randal L. Schwartz)
Subject: Re: autogenerating has_a and has_many from foreign keys
Date: 15:55 on 13 Dec 2004
>>>>> "Tony" == Tony Bowden <tony-cdbitalk@xxxxx.xxx> writes:

Tony> On Mon, Dec 13, 2004 at 07:46:21AM -0800, Randal L. Schwartz wrote:
Tony> Are you planning to release any of this to CPAN?
>> I would like to, but I'm not quite sure how much of it needs to be
>> pluggable, or whether any part of it will work on anything other than
>> postgresql.

Tony> I think it's always going to need to be database specific. Sure, there are
Tony> things that can be abstracted slightly at the top level where subclasses
Tony> could override or hook in, but that could always be factored out later.

Tony> Just having it as a Pg specific thing is probably useful enough to
Tony> start with, and should hopefully provoke other people to add/create the
Tony> equivalents for DBs that support such.

Well, other than the weird inheritance stuff, which I could have
handled as a callback because it's my problem, not the database
problem, there's nothing Pg specific in the code.  The ->foreign_keys
method is a standard DBI thing.  And CDBI::Loader is already smart
enough to vary its behavior based on the database type too.

        -- 
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxx.xxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

autogenerating has_a and has_many from foreign keys
merlyn (Randal L. Schwartz) 15:30 on 13 Dec 2004

Re: autogenerating has_a and has_many from foreign keys
merlyn (Randal L. Schwartz) 15:46 on 13 Dec 2004

Re: autogenerating has_a and has_many from foreign keys
merlyn (Randal L. Schwartz) 15:55 on 13 Dec 2004

Re: autogenerating has_a and has_many from foreign keys
Sebastian Riedel 21:04 on 14 Dec 2004

Re: autogenerating has_a and has_many from foreign keys
merlyn (Randal L. Schwartz) 21:09 on 14 Dec 2004

Re: autogenerating has_a and has_many from foreign keys
Sebastian Riedel 21:22 on 14 Dec 2004

Re: autogenerating has_a and has_many from foreign keys
merlyn (Randal L. Schwartz) 16:01 on 13 Dec 2004

Generated at 11:30 on 23 Feb 2005 by mariachi v0.52