you'd want to put a unique constraint on your username column, then let the
transaction fail, do a rollback(), report the username isn't available. If
you'd like to do the rollback and then continue without losing other pending
changes, you'd use begin_nested().
On Oct 31, 2010, at 3:35 PM,
Thank you for this precision.
Now comes an other problem (I think) :
In fact I might have multiple columns with unique constraints or whatever
constraints.
Then I take a look at SQLAlchemy Exceptions, and I found that Note that
there is no guarantee that different DB-API implementations will
Hello,
I am using SQLAlchemy in a Pylons project and I like it.
However I am questioning about the best way to insert data into a
database.
I have a User class mapping my user table which has a Column
'username' which has a unique constraint.
So I have a form to add a new user when I submit