Paul Makepeace wrote:
I had a look in various places (cookbook, faq, ::resultset) and
couldn't find whether there's a way to see if any SQL would be
generated due to a call to update().

  my $rv = $obj->update(\%stuff);
  $messages->($rv->XXX ? "updated" : "unchanged");

The docs* contain an enigmatic reference to "storage_rv" (that doesn't
appear anywhere in the doc) and "true if the update succeeded or false
if no records were updated". Which is it, success or $storage_rv? :-)

"Return value will be true if the update succeeded or false if no
records were updated; exact type of success value is storage-dependent."

The exact type of success value is storage dependent, hence,
$storage_rv.  For example, one storage engine might return 1; another
might return the number of rows updated.

Ronald


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]

Reply via email to