Return the FOR UPDATE SQL clause to lock rows for an update operation.
(self, nowait=False, skip_locked=False, of=(), no_key=False)
| 236 | return [] |
| 237 | |
| 238 | def for_update_sql(self, nowait=False, skip_locked=False, of=(), no_key=False): |
| 239 | """ |
| 240 | Return the FOR UPDATE SQL clause to lock rows for an update operation. |
| 241 | """ |
| 242 | return "FOR%s UPDATE%s%s%s" % ( |
| 243 | " NO KEY" if no_key else "", |
| 244 | " OF %s" % ", ".join(of) if of else "", |
| 245 | " NOWAIT" if nowait else "", |
| 246 | " SKIP LOCKED" if skip_locked else "", |
| 247 | ) |
| 248 | |
| 249 | def _get_limit_offset_params(self, low_mark, high_mark): |
| 250 | offset = low_mark or 0 |