Cursors returning raw data
Registered by
Geert JM Vanderkelen
We need a Cursor-class which would return result sets not converted to Python types. This would be more performant and might be handy if one does the conversion in the application.
Blueprint information
- Status:
- Not started
- Approver:
- Geert JM Vanderkelen
- Priority:
- Undefined
- Drafter:
- Geert JM Vanderkelen
- Direction:
- Needs approval
- Assignee:
- Geert JM Vanderkelen
- Definition:
- Drafting
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
We can set the raw parameter when setting up the connection
>>> import mysql.connector as db
>>> cnx = db.connect(
>>> cur = cnx.cursor()
>>> cur.execute("SELECT NOW()")
-1
>>> print cur.fetchall()
[('2010-05-23 14:59:19',)]
But we should also be able to set the raw per cursor. Continueing from
the example above:
>>> cur2 = cnx.cursor(
>>> cur2.execute(
>>> print cur2.fetchall()
[(datetime.
It should be available for both buffered and non-buffered cursors.
(?)