Re: [sqlalchemy] SQLAlchemy 0.7.5 Released

2012-01-30 Thread Fayaz Yusuf Khan
On Saturday 28 Jan 2012 6:05:51 PM Michael Bayer wrote: > SQLAlchemy 0.7.5 is now available. Where's the documentation (pdf)? Or has nothing changed there since 0.7.4? http://media.readthedocs.org/pdf/sqlalchemy/latest/sqlalchemy.pdf still gives the older pdf. -- Fayaz Yusuf Khan Cloud developer

Re: [sqlalchemy] Extending sqlalchemy.schema.Column

2012-01-30 Thread Martijn Moeling
The below example works, except if a Foreign key is given. On those columns -e.g. orderId = MySpecialColumn(Integer, ForeignKey('Order.Id'))- To fix this I have added stuff, see comments in code below: As long as the Non SA Column arguments are named it is OK. On Jan 30, 2012, at 17:46 , Mich

Re: [sqlalchemy] Extending sqlalchemy.schema.Column

2012-01-30 Thread Martijn Moeling
Michael, Interesting stuff, The first part I had "almost" covered, I did not have the _constructor part. It wil be part of something more complex… Thankx, Martijn On Jan 30, 2012, at 17:46 , Michael Bayer wrote: > > On Jan 30, 2012, at 9:49 AM, Martijn Moeling wrote: > >> sorry I have to

Re: [sqlalchemy] Re: Two-phase commit from different sessions

2012-01-30 Thread Michael Bayer
On Jan 30, 2012, at 12:07 PM, Joril wrote: > On Jan 30, 5:02 pm, Michael Bayer wrote: > >> What's happening above is the session is not in a transaction due to >> autocommit, so when you call session.connection(), that connection is thrown >> away as far as the Session is concerned. If you

[sqlalchemy] Re: Two-phase commit from different sessions

2012-01-30 Thread Joril
On Jan 30, 5:02 pm, Michael Bayer wrote: > What's happening above is the session is not in a transaction due to > autocommit, so when you call session.connection(), that connection is thrown > away as far as the Session is concerned.   If you wanted to do it the > "external" way like that, you

[sqlalchemy] Best practices for saas application

2012-01-30 Thread Samir
Hello, I have an application SaaS with mongodb and I need to change to sqlalchemy using postgresql or mysql. My requirements are: What the best options for SaaS app with sqlalchemy? - Should I use 1 database per customer. - Sharding. - Schema per customer (postgresql) with subdomain (my current a

Re: [sqlalchemy] Extending sqlalchemy.schema.Column

2012-01-30 Thread Michael Bayer
On Jan 30, 2012, at 9:49 AM, Martijn Moeling wrote: > sorry I have to get back on this. I renamed all Columns in my application > definitions to MyColumn a while back. and everything worked. > Now that I'm starting to use functionality of MyColumn. (The reason I needed > this) I run into some t

Re: [sqlalchemy] Two-phase commit from different sessions

2012-01-30 Thread Michael Bayer
On Jan 30, 2012, at 5:49 AM, Joril wrote: > Hi everyone! > I'm trying to do a two-phase commit using SQLalchemy 0.6.8 with > Postgresql 8.3.4, but I think I'm missing something... > The workflow goes like this: > > session = sessionmaker(engine)(autocommit=True) > tx = session.connection().begin

Re: [sqlalchemy] Extending sqlalchemy.schema.Column

2012-01-30 Thread Martijn Moeling
Michael (Or anyone else), sorry I have to get back on this. I renamed all Columns in my application definitions to MyColumn a while back. and everything worked. Now that I'm starting to use functionality of MyColumn. (The reason I needed this) I run into some trouble. What do I want: I want to

[sqlalchemy] Two-phase commit from different sessions

2012-01-30 Thread Joril
Hi everyone! I'm trying to do a two-phase commit using SQLalchemy 0.6.8 with Postgresql 8.3.4, but I think I'm missing something... The workflow goes like this: session = sessionmaker(engine)(autocommit=True) tx = session.connection().begin_twophase(xid) # Doesn't issue any SQL session.begin() # I