[sqlalchemy] [ANN] - Monetdb backend

2007-11-28 Thread m h
Folks- Just thought I'd spam the list here (in case anyone who hasn't seen my IRC spam recently). I'm working on a monetdb[0] backend for SQLAlchemy. Monetdb is a column oriented db[1]. Basically that means it's not fast at transactions per se, but can be 10+X faster on select queries. So if

[sqlalchemy] Re: concurent modification

2007-11-28 Thread Michael Bayer
On Nov 28, 2007, at 3:29 PM, imgrey wrote: > >> it seems like youre doing something else in there that youre not >> supposed to (like accessing SessionTransaction perhaps ? dont use >> the >> old 0.3 patterns anymore). > > First heard about SessionTransaction. Also I've looked through changes

[sqlalchemy] Overriding mapper relation

2007-11-28 Thread Ronald Lew
I have a customer table which has a 1-to-n relation with a phone table. The phone table has the following columns: integer id, string number, and boolean is_fax. Is there a way to override the phones collection so I can return a boolean if the customer contains at least 1 phone record with a is_

[sqlalchemy] Re: concurent modification

2007-11-28 Thread imgrey
> it seems like youre doing something else in there that youre not > supposed to (like accessing SessionTransaction perhaps ? dont use the > old 0.3 patterns anymore). First heard about SessionTransaction. Also I've looked through changes between 0.3 and 0.4 versions and made changes. > heres

[sqlalchemy] Re: concurent modification

2007-11-28 Thread Michael Bayer
On Nov 28, 2007, at 12:03 PM, imgrey wrote: > >> the 0.4 pattern for using scoped_session is: >> >> session = scoped_session(sessionmaker(transactional=(True|False), >> autoflush=(True|False))) > > defined globaly: > session = scoped_session(sessionmaker(transactional=True, > autoflush=False)) >

[sqlalchemy] Re: concurent modification

2007-11-28 Thread imgrey
> the 0.4 pattern for using scoped_session is: > > session = scoped_session(sessionmaker(transactional=(True|False), > autoflush=(True|False))) defined globaly: session = scoped_session(sessionmaker(transactional=True, autoflush=False)) result: Exception in thread Thread-3: Traceback (most rece

[sqlalchemy] Re: concurent modification

2007-11-28 Thread Michael Bayer
On Nov 28, 2007, at 10:39 AM, imgrey wrote: > >> I'm probably completely wrong about this, but in your example >> above, I >> don't think the statement f_table.insert().execute() necessarily uses >> the same connection as the ORM-level transaction and queries. > > If I got it right, then, as f

[sqlalchemy] Re: concurent modification

2007-11-28 Thread imgrey
> I'm probably completely wrong about this, but in your example above, I > don't think the statement f_table.insert().execute() necessarily uses > the same connection as the ORM-level transaction and queries. If I got it right, then, as far as I know, two transactions is impossible in one connect

[sqlalchemy] Re: concurent modification

2007-11-28 Thread Michael Bayer
On Nov 27, 2007, at 2:40 PM, imgrey wrote: > >> default isolation mode settings usually dont need any changes. we >> dont have an official API for that yet, so you can apply it to all >> connections using a custom connect() function sent to create_engine, >> or you can try setting it individual

[sqlalchemy] Re: concurent modification

2007-11-28 Thread King Simon-NFHD78
imgrey wrote: > > Based on my observations it happens only with concurent inserts/ > updates. > One thread : > > {{{ > f_table.insert().execute() > session.flush() > transaction = session.begin() > nested = session.begin_nested() > try: > f_table.insert().execute() > except IntegrityError: >