logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Data::ObjectDriver::Errors - container class for common database error codes

Defined Error Codes

       •   "UNIQUE_CONSTRAINT"

           The  application  issued  an  insert  or  update  that  would  violate the uniqueness constraint on a
           particular column, such as attempting to save a duplicate value to an indexed key field.

Description

Data::ObjectDriver::Errors is a container class for error codes resulting from DBI database operations.
       Database drivers can map particular database servers' DBI errors to these constants with their
       "map_error_code" methods.

License

Data::ObjectDriver is free software; you may redistribute it and/or modify it under  the  same  terms  as
       Perl itself.

Name

       Data::ObjectDriver::Errors - container class for common database error codes

See Also

       "Data::ObjectDriver::Driver::DBD::map_error_code"

Synopsis

           eval { $driver->insert($obj); };
           if ($@ && $driver->last_error() == Data::ObjectDriver::Errors->UNIQUE_CONSTRAINT) {
               ...

See Also