Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: DB

[Fwd: Re: Multiple databases connection]

 

 

Zope db RSS feed   Index | Next | Previous | View Threaded


banaouas.medialog at wanadoo

Jun 8, 2006, 12:57 AM

Post #1 of 4 (1810 views)
Permalink
[Fwd: Re: Multiple databases connection]

May be "dynamically database connection" means that we use the same "Z
SQL Method" with different database connections (in the same Zope
Instance, of course). So we can change "dynamically" from one database
to another (schema-equal).

In other words, is it possible to define "database connection" property
of a "Z SQL Method" like we do for parameters ?
thanks.



On mer, 2006-06-07 at 18:49 -0700, Infor Gates wrote:
> Is there anyway where we can have a dynamically database connection to
> each branch database with only one zope application (instead of
> multiples of the same application).
>
> We are using Zope 2.8.6, Postgresql 8.0.4 with Psycopg-1.1.21
> connector.

I don't understand what you mean by "dynamically database connection",
but Zope supports connections to multiple databases by simply creating
muiltiple connections objects ("Z Psycopg Connection" objects in your
case).

federico



_______________________________________________
Zope-DB mailing list
Zope-DB [at] zope
http://mail.zope.org/mailman/listinfo/zope-db


fog at initd

Jun 8, 2006, 12:59 AM

Post #2 of 4 (1739 views)
Permalink
Re: [Fwd: Re: Multiple databases connection] [In reply to]

On gio, 2006-06-08 at 09:57 +0200, m.banaouas wrote:
> May be "dynamically database connection" means that we use the same "Z
> SQL Method" with different database connections (in the same Zope
> Instance, of course). So we can change "dynamically" from one database
> to another (schema-equal).
>
> In other words, is it possible to define "database connection" property
> of a "Z SQL Method" like we do for parameters ?

I don't think so, but I am no (longer) a Zope wizard. :)

federico

--
Federico Di Gregorio http://people.initd.org/fog
Debian GNU/Linux Developer fog [at] debian
INIT.D Developer fog [at] initd
The reverse side also has a reverse side. -- Japanese proverb
Attachments: signature.asc (0.18 KB)


lists at zopyx

Jun 8, 2006, 1:12 AM

Post #3 of 4 (1726 views)
Permalink
Re: [Fwd: Re: Multiple databases connection] [In reply to]

--On 8. Juni 2006 09:59:28 +0200 Federico Di Gregorio <fog [at] initd> wrote:

>> In other words, is it possible to define "database connection" property
>> of a "Z SQL Method" like we do for parameters ?
>
> I don't think so, but I am no (longer) a Zope wizard. :)
>

I am pretty sure you can do it with little coding. Since the DA (or its
ID is just a property or attribute (check the implemenation) you should be
able to modify it.

Andreas

--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info [at] zopyx - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting


dieter at handshake

Jun 8, 2006, 9:52 AM

Post #4 of 4 (1720 views)
Permalink
Re: [Fwd: Re: Multiple databases connection] [In reply to]

Andreas Jung wrote at 2006-6-8 10:12 +0200:
> ...
>I am pretty sure you can do it with little coding. Since the DA (or its
>ID is just a property or attribute (check the implemenation) you should be
>able to modify it.

And someone already did this: he had implemented a special
"Z SQL Method" class that allows to compute the connection id
dynamically.

The code did not reach the Zope core -- and I forgot the name
for the extension. But your favorite search engine might
nevertheless find it.



--
Dieter
_______________________________________________
Zope-DB mailing list
Zope-DB [at] zope
http://mail.zope.org/mailman/listinfo/zope-db

Zope db RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.