[Zope] Zope Products and SQL

Farrell, Troy troy.farrell@wilcom.com
Mon, 2 Apr 2001 09:17:09 -0500


Thanks, Dieter.

1) Is fine, assuming the ZSQL method is there.
2) The best of my options - I didn't even think of it.
3) Uh, that sounds like some deep zope wizardry.  I'm still working on
OFS.SimpleItem :)
4) I suppose I could even make my product inherit from an ObjectManager and
let it contain ZSQL Methods - didnt' think of this one either, 'till now.

Thanks,
Troy

-----Original Message-----
From: Dieter Maurer [mailto:dieter@handshake.de]
Sent: Sunday, April 01, 2001 2:29 PM
To: Farrell, Troy
Cc: zope@zope.org
Subject: Re: [Zope] Zope Products and SQL


Farrell, Troy writes:
 > Is there any way (aside from importing database modules ie PoPy) to
execute
 > SQL from a Zope Product?  Is it feasible to make the product inherit from
 > ZSQL methods and have them that way, or it is just easiest to use
ZClasses?
You can have many types of use of Z SQL methods from products:

 * use a Z SQL method instance located and managed in
   the Zope hierarchy.
   Such instances would usually be accessed through acquisition.

 * instantiate a new Z SQL method instance as part
   of your product instances

 * derive one of your product classes from Z SQL methods
   (though I think this is rather rare)