Quoting Matt S Trout [EMAIL PROTECTED]:
On Mon, Aug 04, 2008 at 10:32:31AM +0200, Tobias Kremer wrote:
Quoting Ash Berlin [EMAIL PROTECTED]:
A method on the storage object (which is subclassed to be the
particular type of DBI you are connecting to, eg
DBIx::Class::Storage::DBI::mysql)
On Mon, Aug 04, 2008 at 10:32:31AM +0200, Tobias Kremer wrote:
Quoting Ash Berlin [EMAIL PROTECTED]:
A method on the storage object (which is subclassed to be the
particular type of DBI you are connecting to, eg
DBIx::Class::Storage::DBI::mysql) which parses and encapsulates the
error as
Guys, any comments on how we are going to pull this off would be greatly
appreciated :)
Thanks!
--Tobias
Quoting Tobias Kremer [EMAIL PROTECTED]:
Quoting Ash Berlin [EMAIL PROTECTED]:
A method on the storage object (which is subclassed to be the
particular type of DBI you are connecting
Quoting Ash Berlin [EMAIL PROTECTED]:
A method on the storage object (which is subclassed to be the
particular type of DBI you are connecting to, eg
DBIx::Class::Storage::DBI::mysql) which parses and encapsulates the
error as returned from the database to mark its type, e.g. FK
constraint
On Fri, Aug 01, 2008 at 12:59:27PM +0200, Hartmaier Alexander wrote:
For Oracle that would be the ORA-numbers.
Imho lots of the db specific things belong into the DBD modules.
Sure. But if there's no predefined DBI API for 'em, then we put the
functionality in Storage first, battle test it so
For Oracle that would be the ORA-numbers.
Imho lots of the db specific things belong into the DBD modules.
-Alex
From: Oleg Pronin [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2008 11:40 PM
To: DBIx::Class user and developer list
Subject: Re: [Dbix-class] Race condition in find_or_create
Not quite right.
There are two general case:
1) when you except most of queries to not find the row. Then your example is
quite ok.
eval {create};
if error then find;
Most of cases there will be only 1 query.
2) when you expect to find (for example - updating daily stats once per
Do not forget that not all of the world has english databases. Some people
use localized postgresql or other. If so it may return errors in other
language :)
The best way is to use error codes (they are specific in various db
servers), but unfortunately, some databases (or database drivers) return