Get the last session ID currently in the database. Within IPython, this should be the same as the value stored in :attr:`HistoryManager.session_number`.
(self)
| 430 | |
| 431 | @catch_corrupt_db |
| 432 | def get_last_session_id(self) -> Optional[int]: |
| 433 | """Get the last session ID currently in the database. |
| 434 | |
| 435 | Within IPython, this should be the same as the value stored in |
| 436 | :attr:`HistoryManager.session_number`. |
| 437 | """ |
| 438 | for record in self.get_tail(n=1, include_latest=True): |
| 439 | return record[0] |
| 440 | return None |
| 441 | |
| 442 | @catch_corrupt_db |
| 443 | def get_tail( |