[ZODB-Dev] AdaptableStorage and OR mapping strategy

Roché Compaan roche@upfrontsystems.co.za
Mon, 24 Feb 2003 09:13:30 +0200


On Sun, 23 Feb 2003 14:23:37 +0200
Steve Alexander <steve@cat-box.net> wrote:

> 
> >     class SQLProperties:
> > 
> >         __implements__ = IGateway
> > 
> >         schema = RowSequenceSchema()
> >         schema.addField('id', 'string', 1)
> >         schema.addField('type', 'string')
> >         schema.addField('data', 'string')
> > 
> >         table_base_name = 'properties'
> 
> Maybe use a Zope3 schema?
> 
>    class ISQLProperties(Interface):
> 
>        id = SQLField('id', 'string', 1)
> 
>        type = SQLField('type', 'string')
> 
>        data = SQLField('data', 'string')
> 
>        table_base_name = 'properties'
> 
> 
> You'd have to define SQLField to do the right thing, but this should do 
> what you need in terms of specification.

Shane has already worked out some schema details specific to
AdaptableStorage, so the only thing I suggested was to simplify gateway
classes to only contain the schema definition and have the base class do
more work.

I think using Zope3 schemas will have its benefits but does Zope 2.6 and
Zope3 use the same Interfaces package since Zope3 schemas depends
heavily on it.

-- 
Roché Compaan
Upfront Systems                 http://www.upfrontsystems.co.za