[Catalyst-commits] r14495 - in CatalystX-CRUD/CatalystX-CRUD/trunk: . lib/CatalystX/CRUD lib/CatalystX/CRUD/Model
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Thu Feb 27 22:35:22 GMT 2014
Author: karpet
Date: 2014-02-27 22:35:22 +0000 (Thu, 27 Feb 2014)
New Revision: 14495
Modified:
CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
CatalystX-CRUD/CatalystX-CRUD/trunk/Makefile.PL
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm
Log:
add use_lower feature to Module::Utils
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2013-12-27 20:44:08 UTC (rev 14494)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2014-02-27 22:35:22 UTC (rev 14495)
@@ -4,7 +4,10 @@
- remove : character from rxOp param in internal Search::QueryParser::SQL
constructor. This allows for finding url values like http://foo/bar
which previously would be parsed as http=//foo/bar
+ - add 'use_lower' feature to Module::Utils to support Search::QueryParser::SQL
+ version 0.010.
+
0.55 28 Jan 2013
- add Iterator->serialize() method.
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/Makefile.PL
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/Makefile.PL 2013-12-27 20:44:08 UTC (rev 14494)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/Makefile.PL 2014-02-27 22:35:22 UTC (rev 14495)
@@ -20,7 +20,7 @@
'MooseX::Emulate::Class::Accessor::Fast' => 0,
'Data::Dump' => 0, # for testing
'Sort::SQL' => 0.07,
- 'Search::QueryParser::SQL' => 0.005,
+ 'Search::QueryParser::SQL' => 0.010,
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm 2013-12-27 20:44:08 UTC (rev 14494)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm 2014-02-27 22:35:22 UTC (rev 14495)
@@ -7,7 +7,7 @@
use Search::QueryParser::SQL;
use Carp;
-__PACKAGE__->mk_accessors(qw( use_ilike ne_sign ));
+__PACKAGE__->mk_accessors(qw( use_ilike use_lower ne_sign ));
our $VERSION = '0.56';
@@ -303,8 +303,9 @@
next unless grep {m/\S/} @v;
- # we don't want to "double encode" $like because it will
- # be re-parsed as a word not an op, so we have our a modified
+ # we don't want to "double encode" $like
+ # or $use_lower because it will
+ # be re-parsed as a word not an op, so we have a modified
# parser for per-field queries.
my %args = (
like => '=',
@@ -340,6 +341,7 @@
my %args = (
like => $like,
fuzzify => $fuzzy,
+ lower => $self->use_lower,
columns => \%columns,
default_column => (
@default_columns
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm 2013-12-27 20:44:08 UTC (rev 14494)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm 2014-02-27 22:35:22 UTC (rev 14495)
@@ -111,7 +111,11 @@
$r->{query} = $q->();
}
else {
- $q->{query_obj} .= ""; # stringify the Query object
+ # stringify the Query object, overwrite 'query'.
+ # we do this because some internal objects do not serialize.
+ delete $q->{query};
+ $q->{where} = delete $q->{query_obj};
+ $q->{where} .= '';
$r->{query} = $q;
}
More information about the Catalyst-commits
mailing list