[Zope-DB] Re: Database connection in a file system product

Andreas Jung lists at zopyx.com
Thu Apr 27 06:08:45 EDT 2006



--On 27. April 2006 11:56:39 +0200 Jonas Nielsen <jonasn at mail.tele.dk> 
wrote:

> Andreas Jung wrote:
>> Jonas Nielsen wrote:
>>
>>> Is it possible to store a database connection (i.e. a "Z MySQL Database
>>> Connection") in a file system product ? How ?
>>
>> What is the sense? You can not store persistent objects. You might store
>> a reference to the object using some _v_ variables to avoid getting
>> the DA everytime through acquisition (this makes only sense
>> if you have performance issues, do you?).
>
> The sense is that I would like to find an easy way to install my product
> without setting up the database connection manually. I guess the way to
> do it is to add some code in install.py then ?
>

huh? Either you expect a DA under a particular ID and use acquisition to 
get hold of it or you except a certain meta_type and use superValues() to 
search for instances of this particular meta_type.

-aj

-- 
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info at zopyx.com - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-db/attachments/20060427/5ac2ebd3/attachment.bin


More information about the Zope-DB mailing list