Database-Abstraction
view release on metacpan or search on metacpan
lib/Database/Abstraction.pm view on Meta::CPAN
sub _trace {
my $self = shift;
$self->_log('trace', @_);
}
# Emit a warning message somewhere
sub _warn {
my $self = shift;
my $params = Params::Get::get_params('warning', \@_);
$self->_log('warn', $params->{'warning'});
Carp::carp(join('', grep defined, $params->{'warning'}));
}
# Die
sub _fatal {
my $self = shift;
my $params = Params::Get::get_params('warning', \@_);
$self->_log('error', $params->{'warning'});
Carp::croak(join('', grep defined, $params->{'warning'}));
}
=head1 AUTHOR
Nigel Horne, C<< <njh at nigelhorne.com> >>
=head1 SUPPORT
This module is provided as-is without any warranty.
Please report any bugs or feature requests to C<bug-database-abstraction at rt.cpan.org>,
or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Database-Abstraction>.
I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.
=head1 MESSAGES
The table below lists every error that the module can croak or carp, what
triggers it, and how to resolve it.
=over 4
=item C<< I<Class>: abstract class >>
Direct instantiation of C<Database::Abstraction> was attempted.
Create a subclass and instantiate that instead.
=item C<< I<Class>: where are the files? >>
Neither C<directory> nor C<dsn> was supplied to C<new()>.
=item C<< I<Class>: I</path> is not a directory >>
The C<directory> argument exists on disk but is not a directory.
=item C<< I<Class>: cannot connect: I<$DBI::errstr> >>
DBI failed to connect to the given C<dsn>. Check credentials and host.
=item C<< Can't find a file called 'I<name>' for the table I<T> in I<dir> >>
None of the probe extensions (C<.sql>, C<.psv>, C<.csv>, C<.db>, C<.xml>)
matched in C<directory>.
=item C<< I<Class>: prepare failed: I<$errstr> >>
C<prepare_cached()> returned false. Usually a syntax error in an internally
built query; file a bug if you see this from a normal API call.
=item C<< _build_where_conditions: unsafe column name 'I<name>' >>
A criteria key contained characters outside C<[A-Za-z0-9_.]>.
This is a SQL-injection guard. Use only valid SQL identifier characters.
=item C<< join: missing "table" >> / C<< join: missing "on" condition >>
A join spec hashref is incomplete. Both C<table> and C<on> are required.
=item C<< Invalid JOIN type: I<TYPE> >>
C<type> in a join spec was not one of C<INNER LEFT RIGHT FULL CROSS>.
=item C<< I<Class>: Unknown column I<col> >> / C<< I<Class>: AUTOLOAD disabled >>
An AUTOLOAD call was made for a column that does not exist, or AUTOLOAD
was disabled with C<< auto_load => 0 >>.
=item C<< Usage: set_logger(logger => $logger) >>
C<set_logger()> was called without a C<logger> argument.
=item C<< Usage: execute(query => $query) >>
C<execute()> was called without a C<query> argument.
=item C<< XML slurp: I<...> is not yet supported >>
The XML file structure is too complex for slurp mode.
Use C<< max_slurp_size => 0 >> to force the DBI/XMLSimple SQL path.
=item C<< I<Class>: I<method> is meaningless on a NoSQL database >>
A relational method (C<selectall_arrayref>, C<count>, C<execute>, etc.)
was called on a BerkeleyDB backend, which only supports key-value lookup
via C<fetchrow_hashref>.
=back
=head1 KNOWN LIMITATIONS
=over 4
=item *
B<Read-only.> No INSERT, UPDATE, or DELETE is provided. C<execute()>
runs raw read-only SQL.
=item *
( run in 0.722 second using v1.01-cache-2.11-cpan-f52f0507bed )