pgtools/pgmanager.py
changeset 1 ddce8990b976
parent 0 eaae9539e910
child 4 80634cb1c65b
equal deleted inserted replaced
0:eaae9539e910 1:ddce8990b976
   101 
   101 
   102     def execute(self, query, args=None):
   102     def execute(self, query, args=None):
   103         try:
   103         try:
   104             return super(Cursor, self).execute(query, args)
   104             return super(Cursor, self).execute(query, args)
   105         finally:
   105         finally:
   106             log.debug(self.query)
   106             log.debug(self.query.decode('utf8'))
   107 
   107 
   108     def callproc(self, procname, args=None):
   108     def callproc(self, procname, args=None):
   109         try:
   109         try:
   110             return super(Cursor, self).callproc(procname, args)
   110             return super(Cursor, self).callproc(procname, args)
   111         finally:
   111         finally:
   112             log.debug(self.query)
   112             log.debug(self.query.decode('utf8'))
   113 
   113 
   114     def row_dict(self, row, lstrip=None):
   114     def row_dict(self, row, lstrip=None):
   115         adjustname = lambda a: a
   115         adjustname = lambda a: a
   116         if lstrip:
   116         if lstrip:
   117             adjustname = lambda a: a.lstrip(lstrip)
   117             adjustname = lambda a: a.lstrip(lstrip)