Skip to content

Research adding support for savepoints #428

Description

@simonw

https://www.sqlite.org/lang_savepoint.html

Savepoints are like regular transactions except they have names and can be nested.

Would there be any value in adding support to them to sqlite-utils, potentially as some kind of context manager? Something like this:

with db.savepoint("name"):
    # do stuff
    with db.savepoint("name2"):
        # do more stuff
        raise Release # Rolls back to before "name2" savepoint

I've never used this feature so I'm not comfortable adding anything like this without a bunch of extra research.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions