如何使我的光标成为一个预先准备好的语句和一个字典。 我有以下内容。在
cursor(cursor_class = MySQLCursorPrepared)
prints <class 'mysql.connector.cursor.MySQLCursorPrepared'>
cursor(dictionary = True)
prints <class 'mysql.connector.cursor.MySQLCursorDict'>
所以我用字典重写准备好的语句。我正在使用python3的mysql连接器。在
我试过了
^{pr2}$那个错误
Cursor not available with given criteria: dictionary, prepared
有趣的是
cursor(cursor_class = MySQLCursorPrepared,dictionary = True)
我没有错误,但数据不是字典型的。在
我也有同样的问题。准备好的和字典不在一起。在
我报告了错误:https://bugs.mysql.com/bug.php?id=92700
现在我们等待;)
这种天真的解决方法似乎对我有效-如果我禁用SSL,我可以在“strace”输出中看到,多个相同的查询只被发送到服务器一次,而且当我迭代光标的行时,我肯定会得到字典:
相关问题 更多 >
编程相关推荐