db.SchemaVersion

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Jun 18 13:49:01 CDT 2007


On 17/6/07 8:21 PM, "Jochen Kötter" <jochen-koetter at gmx.de> wrote:

Hi Jochen, 

> I read the articles about db.Schemaversion in the Wiki and working
> with API-classes would be:

> 1) to write an updateSchema_1_2  method

yes

> 2) to write an UpdateSchema method

Yes it is dispatcher, later will call also updateSchema_2_3()

> 3) to write the OnDatabaseOpen -Method (by the way, where do I find
> this OnDatabaseOpenEvent ? Wiki Search "OnDatabaseOpen" has no matches )

This is MY OWN method, exactly as updateSchema_1_2()

> 4) to add the alteration of tables/fields to the subclasses of
> VDatabase and VTable

yes

> 5) to change the DataModel-Classes

Yes of course. You do this in any case.


------------ 
> Imagine there would be a way to update a schema designed with API-
> Classes like this:

> 1) add the alteration of tables/fields to the properties of the
> DbSchema defining subclasses of VDatabase and VTable

> 2) to open of the Database with db.open( kForUpdate ): Valentina
> reads the tblCreateMethod and implements all stuff in the Database
> that does not exist yet.

> 3) to change the Datamodel Classes
> 
> Wouldn't this be a very nice classes way?

Interesting idea ...

But second time you need open without kForUpdate ...
Well, okay, this is controlled by
    if( db.SchemaVersion )
 ...

Ivan, we need talk about such feature...
It seems we can do it.


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list