IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
206 | 206 | |
207 | 207 | def get_connection_params(self): |
208 | 208 | conn_params = self.settings_dict['OPTIONS'].copy() |
209 | | if 'use_returning_into' in conn_params: |
210 | | del conn_params['use_returning_into'] |
| 209 | conn_params.pop('use_returning_into', None) |
| 210 | conn_params.pop('savepoint_check_constraints', None) |
211 | 211 | return conn_params |
212 | 212 | |
213 | 213 | def get_new_connection(self, conn_params): |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
63 | 63 | self.savepoint_state = 0 |
64 | 64 | # List of savepoints created by 'atomic'. |
65 | 65 | self.savepoint_ids = [] |
| 66 | self._savepoint_check_constraints = False |
66 | 67 | # Tracks if the outermost 'atomic' block should commit on exit, |
67 | 68 | # ie. if autocommit was active on entry. |
68 | 69 | self.commit_on_exit = True |
… |
… |
|
161 | 162 | self.in_atomic_block = False |
162 | 163 | self.savepoint_ids = [] |
163 | 164 | self.needs_rollback = False |
| 165 | self._savepoint_check_constraints = self.settings_dict['OPTIONS']\ |
| 166 | .get('savepoint_check_constraints', False) and \ |
| 167 | self.features.can_defer_constraint_checks |
164 | 168 | # Reset parameters defining when to close the connection |
165 | 169 | max_age = self.settings_dict['CONN_MAX_AGE'] |
166 | 170 | self.close_at = None if max_age is None else time.time() + max_age |
… |
… |
|
340 | 344 | return |
341 | 345 | |
342 | 346 | self.validate_thread_sharing() |
| 347 | self.savepoint_check_constraints() |
343 | 348 | self._savepoint_commit(sid) |
344 | 349 | |
345 | 350 | def clean_savepoints(self): |
… |
… |
|
465 | 470 | IntegrityError if any invalid foreign key references are encountered. |
466 | 471 | """ |
467 | 472 | pass |
| 473 | |
| 474 | def savepoint_check_constraints(self): |
| 475 | if self._savepoint_check_constraints: |
| 476 | self.check_constraints() |
| 477 | |
468 | 478 | |
469 | 479 | # ##### Connection termination handling ##### |
470 | 480 | |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
161 | 161 | } |
162 | 162 | conn_params.update(settings_dict['OPTIONS']) |
163 | 163 | conn_params.pop('isolation_level', None) |
| 164 | conn_params.pop('savepoint_check_constraints', None) |
164 | 165 | if settings_dict['USER']: |
165 | 166 | conn_params['user'] = settings_dict['USER'] |
166 | 167 | if settings_dict['PASSWORD']: |