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

Method close

src/MySQLdb/cursors.py:98–106  ·  view source on GitHub ↗

Close the cursor. No further queries will be possible.

(self)

Source from the content-addressed store, hash-verified

96 con.discard_result()
97
98 def close(self):
99 """Close the cursor. No further queries will be possible."""
100 try:
101 if self.connection is None:
102 return
103 self._discard()
104 finally:
105 self.connection = None
106 self._result = None
107
108 def __enter__(self):
109 return self

Callers 15

__exit__Method · 0.95
__exit__Method · 0.80
tearDownMethod · 0.80
test_connectMethod · 0.80
test_commitMethod · 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

Calls 1

_discardMethod · 0.95

Tested by 15

test_connectMethod · 0.64
test_commitMethod · 0.64
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