Re: [Zope] product organization

2005-07-28 Thread Nicholas Wieland
But how do I get the connection id ? Actually I get it when I instance the product in Zope. What I think is something like class Foo def __init__ (self, conn): self.conn = conn myquery = SQL ('doMyQuery', '', self.conn, '', 'select * from table') but obviously it will not work. TIA, ngw

Re: [Zope] product organization

2005-07-27 Thread Marco Bizzarri
Nicholas Wieland wrote: As usual, my question is rather simple :) I'd like to know what are the best practices for product organization - for example I have _tons_ of queries to sqlserver, and my main class is becoming less manageble every time I look at it :/ I like the way SQL integrates in

Re: [Zope] product organization

2005-07-27 Thread Nicholas Wieland
Well, not exactly - just a way to separate access to data from everything else in the product. Maybe a separate class that needs the connection asargument and that just returns the data I need in appropriate data structures by calling class methods. class DataModel (object): def __init__

Re: [Zope] product organization

2005-07-27 Thread J Cameron Cooper
Nicholas Wieland wrote: As usual, my question is rather simple :) I'd like to know what are the best practices for product organization - for example I have _tons_ of queries to sqlserver, and my main class is becoming less manageble every time I look at it :/ I like the way SQL integrates in

Re: [Zope] product organization

2005-07-27 Thread Dieter Maurer
Nicholas Wieland wrote at 2005-7-27 13:54 +0200: Well, not exactly - just a way to separate access to data from everything else in the product. Maybe a separate class that needs the connection as argument and that just returns the data I need in appropriate data structures by calling class