Re: [sqlalchemy] How to identify unique constraint violation without dependency on a specific database driver?

2020-09-18 Thread Vitaly Krug
Thank you, I was afraid of that. Best, Vitaly On Fri, Sep 18, 2020, 12:08 PM Mike Bayer wrote ... you have you set up a catch that will apply regular expressions to match > the error conditions you want. there's no platform agnostic registry > maintained of these right now (it would be

Re: [sqlalchemy] How to identify unique constraint violation without dependency on a specific database driver?

2020-09-18 Thread Mike Bayer
On Fri, Sep 18, 2020, at 3:34 PM, Vitaly Kruglikov wrote: > My table has a unique index on the column named "tag". When I attempt to > insert a row with a tag value that already exists in the table, sqlalchemy > raises the generic exception `IntegrityError`. > > `IntegrityError` may be raised

[sqlalchemy] How to identify unique constraint violation without dependency on a specific database driver?

2020-09-18 Thread Vitaly Kruglikov
My table has a unique index on the column named "tag". When I attempt to insert a row with a tag value that already exists in the table, sqlalchemy raises the generic exception `IntegrityError`. `IntegrityError` may be raised for various scenarios, including Foreign Key Violation and Unique