MCPcopy Create free account
hub / github.com/PyMySQL/mysqlclient / cursor

Method cursor

src/MySQLdb/connections.py:273–280  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

271 _mysql.connection.autocommit(self, on)
272
273 def cursor(self, cursorclass=None):
274 """
275 Create a cursor on which queries may be performed. The
276 optional cursorclass parameter is used to create the
277 Cursor. By default, self.cursorclass=cursors.Cursor is
278 used.
279 """
280 return (cursorclass or self.cursorclass)(self)
281
282 def query(self, query):
283 # Since _mysql releases GIL while querying, we need immutable buffer.

Callers 15

tearDownMethod · 0.80
test_cursorMethod · 0.80
test_cursor_isolationMethod · 0.80
test_descriptionMethod · 0.80
test_rowcountMethod · 0.80
test_callprocMethod · 0.80
test_closeMethod · 0.80
test_executeMethod · 0.80
test_executemanyMethod · 0.80
test_fetchoneMethod · 0.80

Calls

no outgoing calls

Tested by 15

test_cursorMethod · 0.64
test_cursor_isolationMethod · 0.64
test_descriptionMethod · 0.64
test_rowcountMethod · 0.64
test_callprocMethod · 0.64
test_closeMethod · 0.64
test_executeMethod · 0.64
test_executemanyMethod · 0.64
test_fetchoneMethod · 0.64
test_fetchmanyMethod · 0.64