Make an initial pass across a set of states for DELETE. This includes calling out before_delete and obtaining key information for each state including its dictionary, mapper, the connection to use for the execution per state.
(base_mapper, states, uowtransaction)
| 300 | |
| 301 | |
| 302 | def _organize_states_for_delete(base_mapper, states, uowtransaction): |
| 303 | """Make an initial pass across a set of states for DELETE. |
| 304 | |
| 305 | This includes calling out before_delete and obtaining |
| 306 | key information for each state including its dictionary, |
| 307 | mapper, the connection to use for the execution per state. |
| 308 | |
| 309 | """ |
| 310 | for state, dict_, mapper, connection in _connections_for_states( |
| 311 | base_mapper, uowtransaction, states |
| 312 | ): |
| 313 | mapper.dispatch.before_delete(mapper, connection, state) |
| 314 | |
| 315 | if mapper.version_id_col is not None: |
| 316 | update_version_id = mapper._get_committed_state_attr_by_column( |
| 317 | state, dict_, mapper.version_id_col |
| 318 | ) |
| 319 | else: |
| 320 | update_version_id = None |
| 321 | |
| 322 | yield (state, dict_, mapper, connection, update_version_id) |
| 323 | |
| 324 | |
| 325 | def _collect_insert_commands( |
no test coverage detected