I know sqlite3 has
data = {'test_col': 012345679}
sqlite3_conn.execute("""
UPDATE test_db SET test_col = :test_col
;""", data)
and mysql-connector-python has
data = {'test_col': 012345679}
mysql_conn.execute("""
UPDATE test_db SET test_col = %(test_col)s
;""", data)
but does pyodbc support any form of named parameters? I like being able to just pass a dict
to the execute method. It is very convenient, and with some of my queries, such as INSERT INTO ... ON DUPLICATE KEY UPDATE
, it is needed.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…