gnue-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNUe-dev] Some questions about Introspection


From: Reinhard Mueller
Subject: Re: [GNUe-dev] Some questions about Introspection
Date: Tue, 08 Jun 2004 22:52:31 +0200

Am Die, den 08.06.2004 schrieb Jason Cater um 22:42:
> > We had this idea of providing a function that accepts a "should-be"
> > description of the db schema, and changes the current state into the
> > should-be state.
> >
> > That is, this function would first compare the wanted schema with the
> > existing schema and then decide which tables have to be added, which
> > tables have to be extended etc.
> 
> Ok, that makes a little more sense.  But even then, I see this as the 
> Creation 
> class using the introspection instance to get the data it needs. I personally 
> think it'd be better to keep these separated, as there's still little overlap 
> 
> Aside from Creation asking Introspection for the description of a table, how 
> would they interact?

Not at all IMHO.
So your point to still keep them as separate as possible might be valid.

There even might be a kind of third (db-independent) piece of code that
asks Introspection for the current state and then tells Creation what to
change.

> The original plans for gnue-schema included support for this. I feel that the 
> process of writing the schema modifications to the database and the process 
> of creating the schema definitions should probably be kept separate.  Or at 
> least have the writing process be optional; i.e., have different methods in 
> the class for creating the sql versus actually doing the updates.

I agree. However, the generation of the SQL code is the really hard
process. Whether you push that SQL to a connection or write it into a
file doesn't make much difference.

The key point is that schema *updates* (with analysis of current state
and necessary changes) won't work without a live db connection.

Thanks,
-- 
Reinhard Mueller
GNU Enterprise project
http://www.gnue.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
No army can stop an idea whose time has come.
        -- Victor Hugo, 1802-1885

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


reply via email to

[Prev in Thread] Current Thread [Next in Thread]