خرید بک لینک

Vote count: 0

What is a good automatic/general way to check whether there are any data changes left 'dangling' and unflushed in SQLAlchemy at the conclusion of any request in Flask anywhere in the application?

In other words, I want to catch any SQLAlchemy model changes that are just "swept under the carpet" at the conclusion of request, because this suggests a bug in programming that is being concealed by the fact that the particular request is ending (and all uncommitted unflushed changes are destroyed with the session).

(The reason I thought of this problem is that I tued autoflush ON, and suddenly on an API endpoint I saw that some model changes which I was not aware of, and were unintended were being flushed when a subsequent query later in the same API endpoint was run!)

asked 3 mins ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 9 ارديبهشت 1395 ساعت: 4:54

صفحه بندی