return $exp;
});
});
- my $expand_setop = $self->cb(sub {
- my ($self, $setop, $args) = @_;
- +{ "-${setop}" => {
- %$args,
- queries => [ map $self->expand_expr($_), @{$args->{queries}} ],
- } };
- });
- $sqla->expanders(map +($_ => $expand_setop), qw(union intersect except));
$sqla->clause_renderer('select.setop' => $self->cb(sub {
my ($self, undef, $setop) = @_;
$self->render_aqt($setop);
}));
- $sqla->renderer($_ => $self->cb('_render_setop'))
- for qw(union intersect except);
+ foreach my $setop (qw(union intersect except)) {
+ $sqla->expander($setop => $self->cb('_expand_setop'));
+ $sqla->renderer($setop => $self->cb('_render_setop'));
+ }
my $setop_expander = $self->cb(sub {
my ($self, $setop, $args) = @_;
);
}
+sub _expand_setop {
+ my ($self, $setop, $args) = @_;
+ +{ "-${setop}" => {
+ %$args,
+ queries => [ map $self->expand_expr($_), @{$args->{queries}} ],
+ } };
+}
+
sub _render_setop {
my ($self, $setop, $args) = @_;
$self->join_query_parts(