From: Dagfinn Ilmari Mannsåker Date: Mon, 3 Apr 2017 10:25:29 +0000 (+0100) Subject: Comment why each of the RETURNING clauses have their own method X-Git-Tag: v1.83~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=60f3fd3f62543eeefdf2ec711b085e360fe89c6e;p=dbsrgits%2FSQL-Abstract.git Comment why each of the RETURNING clauses have their own method --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 1b2fb07..611e7ac 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -227,7 +227,8 @@ sub insert { return wantarray ? ($sql, @bind) : $sql; } -# Used by DBIx::Class::SQLMaker->insert +# So that subclasses can override INSERT ... RETURNING separately from +# UPDATE and DELETE (e.g. DBIx::Class::SQLMaker::Oracle does this) sub _insert_returning { shift->_returning(@_) } sub _returning { @@ -436,6 +437,8 @@ sub update { return wantarray ? ($sql, @all_bind) : $sql; } +# So that subclasses can override UPDATE ... RETURNING separately from +# INSERT and DELETE sub _update_returning { shift->_returning(@_) } @@ -486,6 +489,8 @@ sub delete { return wantarray ? ($sql, @bind) : $sql; } +# So that subclasses can override DELETE ... RETURNING separately from +# INSERT and UPDATE sub _delete_returning { shift->_returning(@_) }