This class is inheriting from
cursor.MySQLCursor and if needed automatically
retrieves rows after an operation has been executed.
MySQLCursorBuffered can be useful in situations
where two queries, with small result sets, need to be combined or
computed with each other.
import mysql.connector cnx = mysql.connector.connect() # Only this particular cursor will be buffering results cursor.cursor(buffered=True) # All cursors are by default buffering cnx = mysql.connector.connect(buffered=True)
See Section 188.8.131.52, “Tutorial: Raise Employee's Salary Using a Buffering Cursor” for a practical use case.