连接器和 API 手册 / 第 6 章 MySQL 连接器/Python 开发人员指南 / 6.9 连接器/Python API 参考 / 6.9.6 子类 cursor.MySQLCursor /
6.9.6.7 cursor.MySQLCursorBufferedNamedTuple 类
该类MySQLCursorBufferedNamedTuple
继承自
MySQLCursor
. 此类自 Connector/Python 2.0.0 起可用。
MySQLCursorBufferedNamedTuple
游标类似于
游标,但
有MySQLCursorNamedTuple
缓冲:执行查询后,它从服务器获取整个结果集并缓冲行。有关缓冲影响的信息,请参阅
第 6.9.6.1 节,“cursor.MySQLCursorBuffered Class”。
要获得返回命名元组的缓冲游标,请
buffered
在实例化新的命名元组游标时添加参数:
Press CTRL+C to copycursor = cnx.cursor(named_tuple=True, buffered=True)