Get a bookmark from database by its ID. Parameters ---------- index : int DB index of bookmark record. lock : bool Whether to restrict concurrent access (True by default). Returns ------- BookmarkVar or None
(self, index: int, *, lock: bool = True)
| 650 | return self._fetch(f'SELECT * FROM bookmarks ORDER BY {self._order(order, ignore_case)}', lock=lock) |
| 651 | |
| 652 | def get_rec_by_id(self, index: int, *, lock: bool = True) -> Optional[BookmarkVar]: |
| 653 | """Get a bookmark from database by its ID. |
| 654 | |
| 655 | Parameters |
| 656 | ---------- |
| 657 | index : int |
| 658 | DB index of bookmark record. |
| 659 | lock : bool |
| 660 | Whether to restrict concurrent access (True by default). |
| 661 | |
| 662 | Returns |
| 663 | ------- |
| 664 | BookmarkVar or None |
| 665 | Bookmark data, or None if index is not found. |
| 666 | """ |
| 667 | |
| 668 | return self._fetch_first('SELECT * FROM bookmarks WHERE id = ?', index, lock=lock) |
| 669 | |
| 670 | def get_rec_all_by_ids(self, indices: Ints, *, lock: bool = True, order: List[str] = ['id']): |
| 671 | """Get all the bookmarks in the database. |