[Zope] unsubscribe

George Milliken gmilliken@farm9.com
Tue, 8 May 2001 10:40:48 -0700


unsubscribe

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
Oliver Bleutgen
Sent: Tuesday, May 08, 2001 9:52 AM
To: zope@zope.org
Subject: Re: [Zope] Changing of the SQL guard


> Greets all,

> I have installed a newer version of postgres on my linux box, along with
> the
> newer PoPy adapter and I have done some work in splitting out tables to
> separate dbs... The problem I'm faced with is that I have to reidentify
> all
> of the connections that each ZSQL method addresses to the adapter. Instead
> of manually changing each one (which are too many to count), is there a
> way
> I can do them all at once? The second db I use is very isolated so if I
> could just tell an entire tree to goto on db connection, that would be
> nice... I even tried using the same object name, but Im sure there is more
> hidden stuff behind its ID that this doesnt work...

I think could write a python script (or dtml-method) which recurses
through the subfolder and searches for ZSQL-methods.
If it finds one it calls
manage_edit(self, title, connection_id, arguments, template)
with the right arguments.

from zope 2.3.2's help:
manage_edit(self, title, connection_id, arguments, template)
    Change database method properties.
    The connection_id argument is the id of a database connection that
resides in the
    current folder or in a folder above the current folder. The database
should understand SQL.
    The arguments argument is a string containing an arguments
specification,
    as would be given in the SQL method cration form.
    The template argument is a string containing the source for the SQL
Template.

cheers,
oliver





_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )