From 1cf8d00d4a97787012c574044b40e34ac1c88660 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 4 Nov 2008 22:46:49 +0000 Subject: [PATCH] document return values of WebGUI::SQL->write and WebGUI::SQL::ResultSet->execute --- lib/WebGUI/SQL.pm | 3 ++- lib/WebGUI/SQL/ResultSet.pm | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/WebGUI/SQL.pm b/lib/WebGUI/SQL.pm index 6238f0d17..3683d5d99 100644 --- a/lib/WebGUI/SQL.pm +++ b/lib/WebGUI/SQL.pm @@ -972,7 +972,8 @@ sub unconditionalRead { =head2 write ( sql, params ) -A method specifically designed for writing to the database in an efficient manner. +A method specifically designed for writing to the database in an efficient manner. Returns +the number of rows effected. =head3 sql diff --git a/lib/WebGUI/SQL/ResultSet.pm b/lib/WebGUI/SQL/ResultSet.pm index 0e0bf7b28..86480a538 100644 --- a/lib/WebGUI/SQL/ResultSet.pm +++ b/lib/WebGUI/SQL/ResultSet.pm @@ -118,9 +118,11 @@ sub errorMessage { =head2 execute ( [ placeholders ] ) -Executes a prepared SQL statement. +Executes a prepared SQL statement. For SELECT queries, returns a true value on success. For +other queries, returns the number of rows effected. Return value will always evaluate as true +even if zero rows were effected. -=head3 placeholders +=head3 placeholders An array reference containing a list of values to be used in the placeholders defined in the SQL statement.