Create a cursor on which queries may be performed. The optional cursorclass parameter is used to create the Cursor. By default, self.cursorclass=cursors.Cursor is used.
(self, cursorclass=None)
| 221 | _mysql.connection.autocommit(self, on) |
| 222 | |
| 223 | def cursor(self, cursorclass=None): |
| 224 | """ |
| 225 | |
| 226 | Create a cursor on which queries may be performed. The |
| 227 | optional cursorclass parameter is used to create the |
| 228 | Cursor. By default, self.cursorclass=cursors.Cursor is |
| 229 | used. |
| 230 | |
| 231 | """ |
| 232 | return (cursorclass or self.cursorclass)(self) |
| 233 | |
| 234 | def __enter__(self): |
| 235 | if self.get_autocommit(): |
no outgoing calls