[Zope3-Users] Using SQLOS

Luca Manini manini.luca at tiscali.it
Thu Feb 17 03:21:20 EST 2005


Hi, 

I've some classes (i.e.: Account) that use SQLObject for (PostgreSQL)
persistence. They works from plain Python :-)

I would like to use them in Zope 3.  Listing existing instances
(Account.select()) works also from inside Zope :-)

Now I want to have them integrated in Zope, that is: I need to have
them workin inside containers (list, add, delete, update and the
like).

For that I'm trying to use SQLOS and its SQLObjectContainer object.
I've read the docs and I managed (more or less) to define interfaces
and classes and to write the ZCML part. 

But it does not work and my example is in a 'confused' state at the
moment so I have no clear code to show you so I'll go with two
questions:

  1) is there a small, but complete (I mean easy instaqllable and
     running) example of using SQLOS?

  2) one piece that can be wrong in my zcml stuff is the 'connection':
     in the SQLOS readme there is this snippet:

  <sqlos:connectionName name='pgsql' />

  <!-- Here you configure the dsn for a given connection -->
  <rdb:provideConnection
   name='pgsql'
   component='psycopgda.adapter.PsycopgAdapter'
   dsn='dbi://zope3:123@localhost:5432/zope3'
   />

    Is the connectionName 'pgsql' "fixed" or should/could be
    different.  Is it used somewhere else or it just 'relate' the two
    sections (sql and rdb).  Should I 'put'/use it somewhere in my
    code?


	Thanks in advance for any help

-- 
    bye, Luca


More information about the Zope3-users mailing list