[Bps-public-commit] dbix-searchbuilder branch combine-search-and-count updated. 1.71-6-g32baf97
BPS Git Server
git at git.bestpractical.com
Fri Aug 26 19:30:26 UTC 2022
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "dbix-searchbuilder".
The branch, combine-search-and-count has been updated
via 32baf97e886d90324cfde7417ace9a4ea809bbe5 (commit)
from 7d7844b2713da76eb3564c645e24b9cd74832163 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 32baf97e886d90324cfde7417ace9a4ea809bbe5
Author: sunnavy <sunnavy at bestpractical.com>
Date: Sat Aug 27 02:38:44 2022 +0800
Redo search only if ORDER/GROUP BY is really updated
diff --git a/lib/DBIx/SearchBuilder.pm b/lib/DBIx/SearchBuilder.pm
index 0fb6e1f..b86fc32 100755
--- a/lib/DBIx/SearchBuilder.pm
+++ b/lib/DBIx/SearchBuilder.pm
@@ -1244,8 +1244,12 @@ sub OrderByCols {
my $self = shift;
my @args = @_;
+ my $old_value = $self->_OrderClause;
$self->{'order_by'} = \@args;
- $self->RedoSearch();
+
+ if ( $self->_OrderClause ne $old_value ) {
+ $self->RedoSearch();
+ }
}
=head2 _OrderClause
@@ -1311,8 +1315,12 @@ sub GroupByCols {
my $self = shift;
my @args = @_;
+ my $old_value = $self->_GroupClause;
$self->{'group_by'} = \@args;
- $self->RedoSearch();
+
+ if ( $self->_GroupClause ne $old_value ) {
+ $self->RedoSearch();
+ }
}
=head2 _GroupClause
-----------------------------------------------------------------------
Summary of changes:
lib/DBIx/SearchBuilder.pm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
hooks/post-receive
--
dbix-searchbuilder
More information about the Bps-public-commit
mailing list