Problem fixed with delete *threaded* parameter on Flask, sorry
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for
вторник, 9 января 2018 г., 9:08:22 UTC+3 пользователь Tolstov Sergey
написал:
>
> I use transactions and sometimes it must be *session.rollback*.
> Sometimes i get a AttributeError: 'NoneType' object has no attribute
> 'twophase'
> That error raises, when one transaction open and processed,
Thanks Mike!
Your last suggestion was the best (ans easiest) solution, I guess I
just needed someone to point that out to me ;-) Since I want the whole
transaction to either succeed or fail, there's no need to use
SAVEPOINTs.
Cheers, Simon
On 3 Jul., 19:55, Michael Bayer [EMAIL PROTECTED]
On Jul 3, 2008, at 1:09 PM, Simon wrote:
Hi all,
I have a transactional session which save()s multiple objects to
multiple tables where each object potentially violates a unique
primary key or just a unique key constraint. At flush() time, MySQL
returns an IntegrityError which specifies
Wow, thanks for the detailed response!
That was very helpful (and I'm going to do some more reading now on
database transactions in general, and then dig deeper into how
SQLAlchemy can use the different options).
On Jun 8, 7:23 am, Kyle Schaffrick [EMAIL PROTECTED] wrote:
On Sat, 7 Jun 2008
On Saturday 07 June 2008 21:35:35 Tomer wrote:
If I am just issuing a read-only query, and I want to make sure
that nothing will change in the middle, do I need a transaction? If
so, what do I do with it when I'm done - commit or rollback?
For example, I want to do this:
for user in
Thanks. What would happen if I didn't do anything (I've seen lots of
examples online that will just issue a query like
Session.query(User).all() and that's all). Will that query start a
transaction if it's a transactional session?
On Jun 7, 11:58 am, [EMAIL PROTECTED] wrote:
On Saturday 07 June
On Saturday 07 June 2008 22:50:36 Tomer wrote:
Thanks. What would happen if I didn't do anything (I've seen lots
of examples online that will just issue a query like
Session.query(User).all() and that's all). Will that query start a
transaction if it's a transactional session?
no idea, never
On Sat, Jun 7, 2008 at 2:50 PM, Tomer [EMAIL PROTECTED] wrote:
Thanks. What would happen if I didn't do anything (I've seen lots of
examples online that will just issue a query like
Session.query(User).all() and that's all). Will that query start a
transaction if it's a transactional
On Jun 7, 2008, at 3:50 PM, Tomer wrote:
Thanks. What would happen if I didn't do anything (I've seen lots of
examples online that will just issue a query like
Session.query(User).all() and that's all). Will that query start a
transaction if it's a transactional session?
when you use the
Thanks for the detailed response.
I have two follow-up questions:
1) From what I understand, if I read an object (eg, Student) from
the database, modify that object or other objects, and then commit, I
have no guarantee that the object didn't change between the time I
read it and the time I
yes, you should, and your commented-out code looks fine
On 1/20/07, jose [EMAIL PROTECTED] wrote:
Hi all,
I have a question about transactions
I need to insert data into two tables (anag and user), sice I need to
insert the generated primary key of anag into user.
I have to flush anag
Jonathan Ellis wrote:
yes, you should, and your commented-out code looks fine
thank you, Jonathan.
On 1/20/07, jose [EMAIL PROTECTED] wrote:
Hi all,
I have a question about transactions
I need to insert data into two tables (anag and user), sice I need to
insert the generated
You may want to turn on logging to see exactly what SQL is being issued:
try adding
import logging
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
to the top of your test script
On 1/5/07, Paul Johnston [EMAIL PROTECTED] wrote:
Hi,
The following program outputs 1; I thought
14 matches
Mail list logo