问题
using bulk_update_mappings, the approach is:
All those keys which are present and are not part of the primary key are applied to the SET clause of the UPDATE statement; the primary key values, which are required, are applied to the WHERE clause.
Is there any way to change this rule?
I mean to specify a custom where clause as:
update Bar set name='a' where family='b' and code = 10
update Bar set name='b' where family='c' and code = 11
update Bar set name='c' where family='d' and code = 12
........
update Bar set name='aaaa' where family='bbbb' and code = 10000
来源:https://stackoverflow.com/questions/57534134/sqlalchemy-bulk-update-with-custom-where-clause