Esempio n. 1
0
 def cursor(self):
     if (self.use_debug_cursor
             or (self.use_debug_cursor is None and settings.DEBUG)):
         cursor = self.make_debug_cursor(self._cursor())
     else:
         cursor = util.CursorWrapper(self._cursor(), self)
     return cursor
Esempio n. 2
0
 def cursor(self):
     self.validate_thread_sharing()
     if (self.use_debug_cursor or
         (self.use_debug_cursor is None and settings.DEBUG)):
         cursor = self.make_debug_cursor(self._cursor())
     else:
         cursor = util.CursorWrapper(self._cursor(), self)
     return cursor
Esempio n. 3
0
 def cursor(self):
     """
     Creates a cursor, opening a connection if necessary.
     """
     self.validate_thread_sharing()
     if (self.use_debug_cursor
             or (self.use_debug_cursor is None and settings.DEBUG)):
         cursor = self.make_debug_cursor(self._cursor())
     else:
         cursor = util.CursorWrapper(self._cursor(), self)
     return cursor