Skip Menu |
 

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 37015
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: Nobody in particular
Requestors: n [...] shaplov.ru
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: 2.8.2



Subject: [PATCH] extend manual for 'do' method
Download (untitled) / with headers
text/plain 267b
I'd like to offer a small patch that extends the manual entry for do method. With this patch one can understand what does this function returns, without reading DBI manual. May be it should be edited by native English speaker... But I did my best writing it ;-)
Subject: Pg.pm.diff
Download Pg.pm.diff
text/x-diff 1.2k
--- Pg.pm.etalon 2008-06-23 13:33:39.000000000 +0400 +++ Pg.pm 2008-06-23 14:05:02.000000000 +0400 @@ -2467,13 +2467,19 @@ $rv = $dbh->do($statement, \%attr, @bind_values); -Prepare and execute a single statement. Note that an empty statement -(string with no length) will not be passed to the server; if you -want a simple test, use "SELECT 123" or the ping() function. If -neither attr nor bind_values is given, the query will be sent directly +Prepare and execute a single statement. Returns the number of rows affected if the +query were successful, undef if error occurred or -1 if the number of rows is +not known, not applicable, or not available. Note that "do" will return '0E0' instead +of 0 for 'no rows were affected', in order to always return true value if no error. + +If neither attr nor bind_values is given, the query will be sent directly to the server without the overhead of creating a statement handle and running prepare and execute. +Note that an empty statement (string with no length) will not be passed to +the server; if you want a simple test, use "SELECT 123" or the ping() +function. + =item B<last_insert_id> $rv = $dbh->last_insert_id($catalog, $schema, $table, $field);
Applied in r11442 with minor revisions. Thanks, good idea.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.