[ZODB-Dev] AdaptableStorage and OR mapping strategy

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


>     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.

--
Steve Alexander