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

Method close

pymysql/cursors.py:52–63  ·  view source on GitHub ↗

Closing a cursor just exhausts all remaining data.

(self)

Source from the content-addressed store, hash-verified

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

Callers 15

__exit__Method · 0.95
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
test_single_tupleMethod · 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