MCPcopy Index your code
hub / github.com/davispuh/MySQL-for-Python-3 / fetchone

Method fetchone

MySQLdb/cursors.py:428–436  ·  view source on GitHub ↗

Fetches a single row from the cursor.

(self)

Source from the content-addressed store, hash-verified

426 def _get_result(self): return self._get_db().use_result()
427
428 def fetchone(self):
429 """Fetches a single row from the cursor."""
430 self._check_executed()
431 r = self._fetch_row(1)
432 if not r:
433 self._warning_check()
434 return None
435 self.rownumber = self.rownumber + 1
436 return r[0]
437
438 def fetchmany(self, size=None):
439 """Fetch up to size rows from the cursor. Result set may be smaller

Callers 7

nextMethod · 0.95
fetchoneDictMethod · 0.45
test_fetchoneMethod · 0.45
test_mixedfetchMethod · 0.45
test_nextsetMethod · 0.45
test_fetchoneMethod · 0.45
test_nextsetMethod · 0.45

Calls 3

_check_executedMethod · 0.80
_fetch_rowMethod · 0.80
_warning_checkMethod · 0.80

Tested by 5

test_fetchoneMethod · 0.36
test_mixedfetchMethod · 0.36
test_nextsetMethod · 0.36
test_fetchoneMethod · 0.36
test_nextsetMethod · 0.36