10.2.6 Method MySQLConnection.cursor()


cursor = cnx.cursor([arg=value[, arg=value]...])

This method returns a MySQLCursor() object, or a subclass of it depending on the passed arguments. The returned object is a cursor.CursorBase instance. For more information about cursor objects, see Section 10.5, “Class cursor.MySQLCursor”, and Section 10.6, “cursor.MySQLCursor Subclasses”.

Arguments may be passed to the cursor() method to control what type of cursor to create:

The returned object depends on the combination of the arguments. Examples: