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.
T
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
>
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
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 methods.
class DataModel (object):
def __init__ (s
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 integrate
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 Zope, what I don't like is ha