Re: [CDBI] Class::DBI::Loader question

[prev] [thread] [next] [Date index for 2004/10/14]

From: Kingsley Kerce
Subject: Re: [CDBI] Class::DBI::Loader question
Date: 14:26 on 14 Oct 2004
Regarding Class::DBI::Loader, Peter Speltz wrote:
 > > > Would it be kind of nice it it dumped "Class::DBI" code (ie
 > > > the table and column declarations to a file for each table?  I
 > > > think that may be handy for me but am not sure yet. Anyone
 > > > written code to make it do that?

Kingsley Kerce replied:
 > > I've also wanted this, but such a dump would probably best be taken at
 > > least one step farther, to a lower level, such that the dump contains
 > > the results of all your table(), columns(), has_many(), has_a(),
 > > might_have(), etc., calls.
 
Perrin Harkins replied to Kingsley:
 > You would be better off doing this with SQL::Translator.  It can 
 > generate Class::DBI code for you as well.

Subsequently, Perrin Harkins wrote:
 > Enhancing SQL::Translator sounds easier to me than making big changes to
 > Class::DBI::Loader.  SQL::Translator creates an abstract model of your
 > database and relationships and then lets you generate things like
 > Class::DBI code from it by running it through templates.  It also
 > understands things like table relationships which I don't think
 > Class::DBI::Loader covers yet.

 > I just think you're going to end up duplicating effort if you try to
 > wedge a bunch of things into Class::DBI::Loader.

I've personally not argued in this thread for adding anything to
CDBI::Loader.

Perrin also wrote:
 > SQL::Translator can give you all kinds of different formats - XML, YAML,
 > etc.

I repeat: I'm interested in a low-level dump of Class::DBI's runtime
structures.  I'm not interested in, e.g., an SQL to YAML translation.

The idea is to begin with an SQL schema (and maybe some additional
hints for Class::DBI setup), run a process to load and setup the
Class::DBI runtime structures, and dump those structures to file.
Later, another process could simply load the dump rather than perform
the entire schema load and Class::DBI setup.

To put it another way:

An initial process does this:
load SQL schema > create code for Class::DBI setup > Class::DBI runtime > dump

Subsequent processes only have to do this:
load dump to recreate Class::DBI runtime

So, rephrasing my initial question: 
Can the state of Class::DBI in one process easily be dumped and
reinstantiated in another process?  This question probably translates
to "Would such a dumper module be a small project for someone with
knowledge of Class::DBI's (and its brethrens') internals?"

Thanks,
Kingsley

(message missing)

domain cross talk...?
Michael Jensen 06:47 on 06 Oct 2004

Re: domain cross talk...?
William McKee 14:41 on 06 Oct 2004

Re: domain cross talk...?
Perrin Harkins 14:47 on 06 Oct 2004

Re: domain cross talk...?
William McKee 14:51 on 06 Oct 2004

Re: domain cross talk...?
Perrin Harkins 15:06 on 06 Oct 2004

Re: domain cross talk...?
William McKee 15:32 on 06 Oct 2004

Re: domain cross talk...?
Perrin Harkins 15:36 on 06 Oct 2004

Re: domain cross talk...?
Michael Jensen 16:03 on 06 Oct 2004

Re: domain cross talk...?
Michael Jensen 16:16 on 06 Oct 2004

Re: domain cross talk...?
Perrin Harkins 16:27 on 06 Oct 2004

Re: domain cross talk...?
Carl Johnstone 23:17 on 06 Oct 2004

Re: domain cross talk...?
William McKee 15:53 on 06 Oct 2004

Re: domain cross talk...?
merlyn (Randal L. Schwartz) 16:17 on 06 Oct 2004

Re: domain cross talk...?
Perrin Harkins 16:31 on 06 Oct 2004

[CDBI] Class::DBI::Loader question
Peter Speltz 00:31 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Kingsley Kerce 02:57 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Perrin Harkins 04:12 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Kingsley Kerce 18:43 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Clayton L. Scott 17:08 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Peter Speltz 17:32 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Perrin Harkins 18:58 on 12 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Kingsley Kerce 14:26 on 14 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Perrin Harkins 15:17 on 14 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Tony Bowden 15:39 on 14 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Kingsley Kerce 14:26 on 14 Oct 2004

Re: [CDBI] Class::DBI::Loader question
Tim Bunce 16:22 on 14 Oct 2004

Re: [CDBI] Class::DBI::Loader question
merlyn (Randal L. Schwartz) 17:24 on 14 Oct 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52