Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursors as context managers #99

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Commits on Mar 26, 2016

  1. Allow to use cursors as context managers

    This adds methods __enter__ and __exit__ to a cursor, providing it with
    context manager functionality. Leaving a cursor context will close the
    cursor.
    
    It is important to close cursors in a multi-threaded or multi-process
    SQLite situation with writers present, as open cursors will keep read
    locks on the database and timely garbage-collection cannot be counted
    on.
    onnokort committed Mar 26, 2016
    Configuration menu
    Copy the full SHA
    8974ed3 View commit details
    Browse the repository at this point in the history
  2. Test for using cursor as context manager

    This adds a simple test of cursors as context managers to the test suite.
    onnokort committed Mar 26, 2016
    Configuration menu
    Copy the full SHA
    3c78bac View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c42d333 View commit details
    Browse the repository at this point in the history