Hello,
I am using MySQL as my backend store. I have declared a field like
this in one of my tables:
Field("OFFER_TITLE", "string", length=255, notnull=True, default=None,
unique=True)

Now, I have written a cron job which will do DB insertions using DAL.
The problem now is that when I insert a row that violates the unique
constraint of OFFER_TITLE, it returns
_mysql_exceptions.IntegrityError, which is a DB specific error. I was
expecting DAL to wrap such low-level DB exceptions for me. The idea is
that I want to handle integrity exceptions in my code. Now I don't
want to write mySQL specific code in my cron module.
Can someone please let me know anyone faced a similar situation, and
got a solution for this?

--
Thanks
Narendran

Reply via email to