| Server IP : 23.94.149.180 / Your IP : 216.73.216.147 Web Server : nginx/1.20.1 System : Linux deadrock 5.14.0-741.22.1.el9_9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 12 15:18:14 UTC 2026 x86_64 User : apache ( 48) PHP Version : 8.6.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /files/www/lawyerbabe/mblog/extlib/Data/ObjectDriver/ |
Upload File : |
# $Id: Errors.pm 270 2006-08-25 23:24:16Z mpaschal $
package Data::ObjectDriver::Errors;
use strict;
use warnings;
use constant UNIQUE_CONSTRAINT => 1;
1;
__END__
=head1 NAME
Data::ObjectDriver::Errors - container class for common database error codes
=head1 SYNOPSIS
eval { $driver->insert($obj); };
if ($@ && $driver->last_error() == Data::ObjectDriver::Errors->UNIQUE_CONSTRAINT) {
...
=head1 DESCRIPTION
I<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 C<map_error_code> methods.
=head1 DEFINED ERROR CODES
=over 4
=item * C<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.
=back
=head1 SEE ALSO
C<Data::ObjectDriver::Driver::DBD::map_error_code>
=head1 LICENSE
I<Data::ObjectDriver> is free software; you may redistribute it and/or modify
it under the same terms as Perl itself.
=head1 AUTHOR & COPYRIGHT
Except where otherwise noted, I<Data::ObjectDriver> is Copyright 2005-2006
Six Apart, cpan@sixapart.com. All rights reserved.
=cut