From: Dagfinn Ilmari Mannsåker Date: Sun, 21 Dec 2014 14:43:28 +0000 (+0000) Subject: Add _update_returning method for UPDATE … RETURNING X-Git-Tag: v1.81_01~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=20bb2ad5e9a2a87653cc1deff0eabfdb1e5f6327;p=dbsrgits%2FSQL-Abstract.git Add _update_returning method for UPDATE … RETURNING It just calls _returning, but allows subclasses to override UPDATE … RETURNING independently from INSERT … RETURNING --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 3adfc01..7e12187 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -419,7 +419,7 @@ sub update { } if ($options->{returning}) { - my ($returning_sql, @returning_bind) = $self->_returning ($options); + my ($returning_sql, @returning_bind) = $self->_update_returning ($options); $sql .= $returning_sql; push @all_bind, @returning_bind; } @@ -427,6 +427,7 @@ sub update { return wantarray ? ($sql, @all_bind) : $sql; } +sub _update_returning { shift->_returning(@_) }