The SQLite database is pregenerated for a release and contains only
reference information. It's read only to the web application. So I'm
wondering if it's worth even hooking the session into the transaction
manager at all. I have a request subclass, and to open a session I use
a reified method:
transaction.doom() is a good way. Another is to register a commit_veto hook in
pyramid_tm. It is a hook that is invoked any time it would be about to commit,
giving you a chance to stop it. Advantage of the veto is that you can register
it from settings globally.
- Michael
> On Aug 16, 2022,
On Tuesday, August 16, 2022 at 11:45:24 AM UTC-4 Mike Orr wrote:
> It is rolling back in some of my testing when there's no
> insert/delete/update, but I want to make sure it always does, just in
> case something somehow modifies the database when we didn't intend to.
> It's not that big a deal
It is rolling back in some of my testing when there's no
insert/delete/update, but I want to make sure it always does, just in
case something somehow modifies the database when we didn't intend to.
It's not that big a deal but it's what I'd like. I'm not sure if
SQLAlchemy is issuing rollback if
On Mon, Aug 15, 2022 at 3:46 PM Jonathan Vanasco wrote:
>
>
> I second what Michael said. The sqlalchemy starter template is the right way
> to go.
>
> The major thing this template does, is provide you with the glue between a
> SQLAlchemy "Session" and the pyramid request. See :
>