This method returns a MySQLCursor() object,
or a subclass of it depending on the passed arguments.
When buffered is True, the
cursor fetches all rows after the operation is executed. This is
useful when queries return small result sets. Setting
raw skips the conversion from MySQL data
types to Python types when fetching rows. Raw is usually used
when you want to have more performance and/or you want to do the
conversion yourself.
The cursor_class argument can be used to pass
a class to use for instantiating a new cursor. It has to be a
subclass of cursor.CursorBase.
The returned object depends on the combination of the
buffered and raw
arguments.
If not buffered and not raw:
cursor.MySQLCursor
If buffered and not raw:
cursor.MySQLCursorBuffered
If buffered and raw:
cursor.MySQLCursorBufferedRaw
If not buffered and raw:
cursor.MySQLCursorRaw
Returns a CursorBase instance.

User Comments
Add your own comment.