[Zope] Python scripts & DA objects

Andrew Veitch andrew@logicalprogression.net
Tue, 31 Dec 2002 17:34:18 +0000


On 31/12/02 3:24 pm, "Jeff Sacksteder" <jwsacksteder@ramprecision.com>
wrote:

> I have an specific need to manipulate Database objects directly with a
> python script, rather than by ZSQL methods.
> 
> I notice methods called manage_insert, manage_join, and manage_update in the
> source, but I can't quite get the syntax right. Zope Labs doesn't have any
> example code for this that I can find. Has anyone done something like this?
> 
> Alternately, Since I can't introspect through the ZMI- where can I find a
> list of all the methods a DA object supports?

If you want to use databases in Zope through Python the choices are to: (a)
use ZSQL methods or (b) connect to whatever database you are using directly
through the Python driver. But if the choose (b) make sure you know what
you're doing and package up the transactions properly.

I guess you could try to re-write the ZSQL method yourself and go directly
to the DA but I don't know why you'd want to do that.

Also a good idea to check out the zope-db@zope.org list where questions
about relational databases should go - the archives might be helpful too.

A

-- 
Logical Progression Ltd, 3 Randolph Crescent, Edinburgh, EH3 7TH, UK
Tel: +44 (0)131 466 9585 Web: http://www.logicalprogression.net/