Documentation Home
Connectors and APIs Manual
Download this Manual

7.9.6.3 cursor.MySQLCursorBufferedRaw Class

The MySQLCursorBufferedRaw class inherits from MySQLCursor.

A MySQLCursorBufferedRaw cursor is like a MySQLCursorRaw cursor, but is buffered: After executing a query, it fetches the entire result set from the server and buffers the rows. For information about the implications of buffering, see Section 7.9.6.1, “cursor.MySQLCursorBuffered Class”.

To create a buffered raw cursor, use the raw and buffered arguments when calling a connection's cursor() method. Alternatively, to make all cursors created from the connection raw and buffered by default, use the raw and buffered connection arguments.

Example:

import mysql.connector
cnx = mysql.connector.connect()
# Only this particular cursor will be raw and buffered
cursor = cnx.cursor(raw=True, buffered=True)
# All cursors created from cnx2 will be raw and buffered by default
cnx2 = mysql.connector.connect(raw=True, buffered=True)

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.