MCPcopy
hub / github.com/PyMySQL/PyMySQL / close

Method close

pymysql/cursors.py:51–62  ·  view source on GitHub ↗

Closing a cursor just exhausts all remaining data.

(self)

Source from the content-addressed store, hash-verified

49 self._rows = None
50
51 def close(self):
52 """
53 Closing a cursor just exhausts all remaining data.
54 """
55 conn = self.connection
56 if conn is None:
57 return
58 try:
59 while self.nextset():
60 pass
61 finally:
62 self.connection = None
63
64 def __enter__(self):
65 return self

Callers 15

__exit__Method · 0.95
example.pyFile · 0.45
test_sha256_no_passwordFunction · 0.45
test_sha256_passwordFunction · 0.45
test_sha256_password_sslFunction · 0.45
test_init_commandMethod · 0.45
test_defer_connectMethod · 0.45

Calls 1

nextsetMethod · 0.95

Tested by 15

test_sha256_no_passwordFunction · 0.36
test_sha256_passwordFunction · 0.36
test_sha256_password_sslFunction · 0.36
test_init_commandMethod · 0.36
test_defer_connectMethod · 0.36
test_single_tupleMethod · 0.36
test_no_fileMethod · 0.36