From: Matt S Trout Date: Tue, 1 Oct 2019 03:39:12 +0000 (+0000) Subject: consolidate other things X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e67751dd9effc7f5066e264c1d6149613a7efa42;p=scpubgit%2FQ-Branch.git consolidate other things --- diff --git a/lib/SQL/Abstract/ExtraClauses.pm b/lib/SQL/Abstract/ExtraClauses.pm index e4750a9..39e6f51 100644 --- a/lib/SQL/Abstract/ExtraClauses.pm +++ b/lib/SQL/Abstract/ExtraClauses.pm @@ -56,10 +56,18 @@ sub register_extensions { 'select.having' => sub { $_[0]->expand_expr($_[2]) }, ], - (map +("${_}er" => [ do { my $x = $_; (map +($_ => "_${x}_${_}"), qw(join from_list alias)) } ]), qw(expand render)), + (map +( + "${_}er" => [ + do { + my $x = $_; + (map +($_ => "_${x}_${_}"), qw(join from_list alias)) + } + ] + ), qw(expand render)), + binop_expander => [ as => '_expand_op_as' ], + renderer => [ as => '_render_as' ], + expander => [ cast => '_expand_cast' ], ); - $sqla->binop_expander(as => $self->cb('_expand_op_as')); - $sqla->renderer(as => $self->cb('_render_as')); $sqla->clauses_of(update => sub { my ($self, @clauses) = @_; @@ -120,8 +128,6 @@ sub register_extensions { $sqla->clause_renderer("${stmt}.with" => $w_rdr); } - $sqla->expander(cast => $self->cb('_expand_cast')); - $sqla->clause_expanders( "select.from", $self->cb('_expand_from_list'), "update.target", $self->cb('_expand_update_clause_target'),