什么相当于cur.mogrify
mysql 上的 psycopg?
来自:http: //initd.org/psycopg/docs/cursor.html
mogrify(operation[, parameters]) 在参数绑定后返回一个查询字符串。返回的字符串正是将发送到运行 execute() 方法或类似方法的数据库的字符串。
>cur.mogrify("INSERT INTO test (num, data) VALUES (%s, %s)", (42, 'bar'))
>"INSERT INTO test (num, data) VALUES (42, E'bar' )"DB API 扩展 mogrify() 方法是 DB API 2.0 的 Psycopg 扩展。
提前致谢。