Author: turnstep
Date: Mon Jun 23 07:02:50 2008
New Revision: 11442

Modified:
   DBD-Pg/trunk/Pg.pm

Log:
Expand do() documentation, per Shaplov <[EMAIL PROTECTED]> on RT #37015.


Modified: DBD-Pg/trunk/Pg.pm
==============================================================================
--- DBD-Pg/trunk/Pg.pm  (original)
+++ DBD-Pg/trunk/Pg.pm  Mon Jun 23 07:02:50 2008
@@ -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 
-to the server without the overhead of creating a statement handle and 
+Prepare and execute a single statement. Returns the number of rows affected if 
the 
+query was successful, returns undef if an error occurred, and returns -1 if 
the 
+number of rows is unknown or not available. Note that this method will return 
'0E0' instead
+of 0 for 'no rows were affected', in order to always return a 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 (a 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);

Reply via email to