equal
deleted
inserted
replaced
1221 return res |
1221 return res |
1222 |
1222 |
1223 def rqliter(self, rql, kwargs=None, ask_confirm=True): |
1223 def rqliter(self, rql, kwargs=None, ask_confirm=True): |
1224 return ForRqlIterator(self, rql, None, ask_confirm) |
1224 return ForRqlIterator(self, rql, None, ask_confirm) |
1225 |
1225 |
1226 def cmd_deactivate_verification_hooks(self): |
|
1227 self.config.disabled_hooks_categories.add('integrity') |
|
1228 |
|
1229 def cmd_reactivate_verification_hooks(self): |
|
1230 self.config.disabled_hooks_categories.remove('integrity') |
|
1231 |
|
1232 # broken db commands ###################################################### |
1226 # broken db commands ###################################################### |
1233 |
1227 |
1234 def cmd_change_attribute_type(self, etype, attr, newtype, commit=True): |
1228 def cmd_change_attribute_type(self, etype, attr, newtype, commit=True): |
1235 """low level method to change the type of an entity attribute. This is |
1229 """low level method to change the type of an entity attribute. This is |
1236 a quick hack which has some drawback: |
1230 a quick hack which has some drawback: |
1276 for sql in tablesql.split(';'): |
1270 for sql in tablesql.split(';'): |
1277 if sql.strip(): |
1271 if sql.strip(): |
1278 self.sqlexec(sql) |
1272 self.sqlexec(sql) |
1279 if commit: |
1273 if commit: |
1280 self.commit() |
1274 self.commit() |
|
1275 |
|
1276 @deprecated("[3.7] use session.disable_hooks_category('integrity')") |
|
1277 def cmd_deactivate_verification_hooks(self): |
|
1278 self.session.disable_hooks_category('integrity') |
|
1279 |
|
1280 @deprecated("[3.7] use session.enable_hooks_category('integrity')") |
|
1281 def cmd_reactivate_verification_hooks(self): |
|
1282 self.session.enable_hooks_category('integrity') |
1281 |
1283 |
1282 |
1284 |
1283 class ForRqlIterator: |
1285 class ForRqlIterator: |
1284 """specific rql iterator to make the loop skipable""" |
1286 """specific rql iterator to make the loop skipable""" |
1285 def __init__(self, helper, rql, kwargs, ask_confirm): |
1287 def __init__(self, helper, rql, kwargs, ask_confirm): |