On Aug 9, 2006, at 5:04 PM, Jonathan Ballet wrote:

>
>
> Leonardo wrote:
>> Ok, Thanks!!
>>
>> if possible,
>> it analyzes my code and it sees if he is correct, the  
>> implementation is
>> best or bad ?
>>
>> Thanks
>
> Your solution seems to be correct.
>
> However, I'm not sure of the interest of your 'TModPostgreSQL' class :
> why don't you use directly the pyPgSQL objects ? I'm not sure the
> 'encapsulation' you provide in this class is and will be very  
> useful ...

That code is totally not correct wrt threading. It will break if more  
than one thread is used. In other words it will work in the default  
development configuration, but nowhere else. It also doesn't know how  
to reconnect.

A better way would be to just acquire the pg database connection  
object from the SQLObject or SQLAlchemy hub.

-bob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to