On Thu, Apr 01, 2010 at 06:18:35AM -0300, Juan Manuel Santos wrote:
>  1/Query   :  CREATE TABLE meta_dir (
>  [...]
>  1/QueryR  :  CREATE TABLE meta_dir (
>  [...]
> 
> Any idea why debug gets printed twice, but the second time with a capital 'r' 
> after "Query"? :P
> > 
> Two debugging output are from
> > different methods.

$ grep -F printDebug sqlobject/dbconnection.py

    def _executeRetry(self, conn, cursor, query):
        if self.debug:
            self.printDebug(conn, query, 'QueryR')
        return cursor.execute(query)

    def _query(self, conn, s):
        if self.debug:
            self.printDebug(conn, s, 'Query')
        self._executeRetry(conn, conn.cursor(), s)

    def _queryAll(self, conn, s):
        if self.debug:
            self.printDebug(conn, s, 'QueryAll')
[skip]
        if self.debugOutput:
            self.printDebug(conn, value, 'QueryAll', 'result')

   ._query(), ._executeRetry(), etc can be called from different methods in
a different order so these extra debugging allows to trace the call stack.

Oleg.
-- 
     Oleg Broytman            http://phd.pp.ru/            p...@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to