Open jimmy-lt opened 4 years ago
In retrospect it would have been better to add a savepoints=True
parameter to register rather than try to guess based on database drivername. As noted by ajung in that file, support varies by database version and sqlite savepoints now work. I think it would make sense to fix this.
Following SQLAchemy's documentation, savepoint with SQLite is supported (excluding some minro issues with the pysqlite driver where a workaround is avaible).
When trying to use SAVEPOINT with SQLite, the following error is raised:
This is due because SQLite is explicitly declared as not supported:
https://github.com/zopefoundation/zope.sqlalchemy/blob/ae4745cd85f5b04445929e8c1761e1a60e02a441/src/zope/sqlalchemy/datamanager.py#L59 https://github.com/zopefoundation/zope.sqlalchemy/blob/ae4745cd85f5b04445929e8c1761e1a60e02a441/src/zope/sqlalchemy/datamanager.py#L150-L155
However, if I remove
sqlite
from the set, my transaction is acting as expected:My environment: