Docs, compatibility fixes again, 0.1 release
This commit is contained in:
parent
69262992ca
commit
7b0ba45346
15 changed files with 121 additions and 15 deletions
67
FU/Pg.pm
67
FU/Pg.pm
|
|
@ -28,6 +28,11 @@ __END__
|
|||
|
||||
FU::Pg - The Ultimate (synchronous) Interface to PostgreSQL
|
||||
|
||||
=head1 EXPERIMENTAL
|
||||
|
||||
This module is still in development and there will likely be a few breaking API
|
||||
changes, see the main L<FU> module for details.
|
||||
|
||||
=head1 SYNOPSYS
|
||||
|
||||
use FU::Pg;
|
||||
|
|
@ -40,7 +45,7 @@ FU::Pg - The Ultimate (synchronous) Interface to PostgreSQL
|
|||
$conn->q('INSERT INTO books (title) VALUES ($1)', 'The Invincible')->exec;
|
||||
|
||||
for my ($id, $title) ($conn->q('SELECT * FROM books')->flat->@*) {
|
||||
print "$id: $title\n";
|
||||
print "$id: $title\n";
|
||||
}
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
@ -628,7 +633,65 @@ I<TODO:> Custom per-type configuration.
|
|||
|
||||
=head2 Errors
|
||||
|
||||
I<TODO>
|
||||
All methods can throw an exception on error. When possible, the error message
|
||||
is constructed using L<Carp>'s C<confess()>, including a full stack trace.
|
||||
|
||||
SQL errors and other errors from I<libpq> are reported with a C<FU::Pg::error>
|
||||
object, which has the following fields:
|
||||
|
||||
=over
|
||||
|
||||
=item action
|
||||
|
||||
The action that was attempted, "connect", "prepare" or "exec".
|
||||
|
||||
=item query
|
||||
|
||||
The query that was being prepared or executed, if any.
|
||||
|
||||
=item message
|
||||
|
||||
Human-readable error message.
|
||||
|
||||
=item verbose_message
|
||||
|
||||
More verbose message, usually consisting of multiple lines.
|
||||
|
||||
=item severity
|
||||
|
||||
=item detail
|
||||
|
||||
=item hint
|
||||
|
||||
=item statement_position
|
||||
|
||||
=item internal_position
|
||||
|
||||
=item internal_query
|
||||
|
||||
=item context
|
||||
|
||||
=item schema_name
|
||||
|
||||
=item table_name
|
||||
|
||||
=item column_name
|
||||
|
||||
=item datatype_name
|
||||
|
||||
=item constraint_name
|
||||
|
||||
=item source_file
|
||||
|
||||
=item source_line
|
||||
|
||||
=item source_function
|
||||
|
||||
These correspond to error fields from
|
||||
L<PQresultErrorField()|https://www.postgresql.org/docs/current/libpq-exec.html#LIBPQ-PQRESULTERRORFIELD>.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 LIMITATIONS
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue