Commit 7250b1f
authored
refactor(sqlite): add check_cursor_valid method for cursor state validation (RustPython#6342)
Extract cursor validity check into a separate method that doesn't hold
the lock. This is useful for executescript which only needs to verify
the cursor state but doesn't need to modify CursorInner.
- Add check_cursor_valid() method that checks if cursor is initialized
and not closed without retaining the mutex guard
- Use check_cursor_valid() in executescript instead of inner() since
executescript doesn't modify CursorInner1 parent 42d497a commit 7250b1f
1 file changed
+25
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1589 | 1589 | | |
1590 | 1590 | | |
1591 | 1591 | | |
1592 | | - | |
1593 | | - | |
1594 | | - | |
1595 | | - | |
1596 | | - | |
1597 | | - | |
1598 | | - | |
1599 | | - | |
1600 | | - | |
1601 | | - | |
1602 | | - | |
1603 | | - | |
1604 | | - | |
1605 | | - | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
1606 | 1600 | | |
1607 | 1601 | | |
1608 | | - | |
| 1602 | + | |
1609 | 1603 | | |
1610 | 1604 | | |
1611 | 1605 | | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
1612 | 1621 | | |
1613 | 1622 | | |
1614 | 1623 | | |
| |||
1771 | 1780 | | |
1772 | 1781 | | |
1773 | 1782 | | |
1774 | | - | |
| 1783 | + | |
1775 | 1784 | | |
1776 | 1785 | | |
1777 | 1786 | | |
| |||
0 commit comments