通过SQLAlchemy在cx_Oracle中处理未处理的数据类型元组

时间:2019-06-24 17:31:28

标签: python sqlalchemy cx-oracle

query = "SELECT * FROM TEST_TABLE WHERE ids IN :ids FETCH FIRST :records ROWS ONLY"
params = {'ids': (101, 102, 103), 'records': 10}
rec_connection = engine.connect()
data = rec_connection.execute(query, params)

错误:

  

2019-06-24 20:08:25(cx_Oracle.NotSupportedError)Variable_TypeByValue():未处理的数据类型元组[SQL:'SELECT * FROM TEST_TABLE WHERE IDs IN:IDS FETCH FIRST:仅记录ROWS'] [参数: {'ids':( 101、102、103),'records':10}]

0 个答案:

没有答案