[Bps-public-commit] dbix-searchbuilder branch, experimental, updated. 1.61-33-g27c04d5

Ruslan Zakirov ruz at bestpractical.com
Mon Mar 26 05:33:29 EDT 2012


The branch, experimental has been updated
       via  27c04d5f3a28bcdc617fb6325e324a4c0b1b7ebe (commit)
       via  4ef2a9161acc4eb9d5c2dedd4b62281e24c99110 (commit)
       via  3669b51b45dabea72909d5c53b5336c468839277 (commit)
       via  ce9dbe3a045f1a98b26202edfcb6cfbf635a7745 (commit)
       via  d7b3d6d04e71f9c830a9e620b30a0fdc24468437 (commit)
      from  826fcdb69155508ce0ff4ddc39a0c2bcf7d18bc3 (commit)

Summary of changes:
 .gitignore                        |    1 +
 Changes                           |    4 +
 META.yml                          |   11 ++--
 Makefile.PL                       |    1 +
 inc/Module/AutoInstall.pm         |  121 +++++++++++++++++++++++++++++++++----
 inc/Module/Install.pm             |    4 +-
 inc/Module/Install/AutoInstall.pm |   13 ++++-
 inc/Module/Install/Base.pm        |    2 +-
 inc/Module/Install/Can.pm         |    2 +-
 inc/Module/Install/Fetch.pm       |    2 +-
 inc/Module/Install/Include.pm     |    2 +-
 inc/Module/Install/Makefile.pm    |   11 ++--
 inc/Module/Install/Metadata.pm    |   22 ++++---
 inc/Module/Install/Win32.pm       |    2 +-
 inc/Module/Install/WriteAll.pm    |    2 +-
 lib/DBIx/SearchBuilder.pm         |   32 +++++++++-
 lib/DBIx/SearchBuilder/Handle.pm  |    2 +-
 t/01searches.t                    |   48 ++++++++++++++-
 18 files changed, 237 insertions(+), 45 deletions(-)

- Log -----------------------------------------------------------------
commit 4ef2a9161acc4eb9d5c2dedd4b62281e24c99110
Merge: 826fcdb 3669b51
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sat Mar 10 02:08:09 2012 +0400

    Merge branch 'in-operator' into experimental
    
    Conflicts:
    	t/01searches.t

diff --cc META.yml
index c5c5e12,d07e732..20d624d
--- a/META.yml
+++ b/META.yml
@@@ -30,7 -31,6 +31,6 @@@ requires
    DBIx::DBSchema: 0
    Encode: 1.99
    Want: 0
-   capitalization: 0.03
  resources:
    license: http://dev.perl.org/licenses/
 -version: 1.61
 +version: 1.61_01
diff --cc lib/DBIx/SearchBuilder.pm
index 35eef62,11836b3..0f4c28a
--- a/lib/DBIx/SearchBuilder.pm
+++ b/lib/DBIx/SearchBuilder.pm
@@@ -839,15 -841,30 +845,37 @@@ sub Limit 
          elsif ( $args{'OPERATOR'} =~ /ENDSWITH/i ) {
              $args{'VALUE'}    = "%" . $args{'VALUE'};
          }
+         elsif ( $args{'OPERATOR'} =~ /\bIN$/i ) {
+             if ( blessed $args{'VALUE'} && $args{'VALUE'}->isa(__PACKAGE__) ) {
+                 # if no columns selected then select id
+                 local $args{'VALUE'}{'columns'} = $args{'VALUE'}{'columns'};
+                 $args{'VALUE'}->Column( FIELD => 'id' );
+                 $args{'VALUE'} = '('. $args{'VALUE'}->BuildSelectQuery .')';
+                 $args{'QUOTEVALUE'} = 0;
+             }
+             elsif ( ref $args{'VALUE'} ) {
+                 if ( $args{'QUOTEVALUE'} ) {
+                     my $dbh = $self->_Handle->dbh;
+                     $args{'VALUE'} = join ', ', map $dbh->quote( $_ ), @{ $args{'VALUE'} };
+                 } else {
+                     $args{'VALUE'} = join ', ', @{ $args{'VALUE'} };
+                 }
+                 $args{'VALUE'} = "($args{VALUE})";
+                 $args{'QUOTEVALUE'} = 0;
+             }
+             else {
+                 # otherwise behave in backwards compatible way
+             }
+         }
          $args{'OPERATOR'} =~ s/(?:MATCHES|ENDSWITH|STARTSWITH)/LIKE/i;
  
 +        if ( $args{'OPERATOR'} =~ /IS/i ) {
 +            $args{'VALUE'} = 'NULL';
 +            $args{'QUOTEVALUE'} = 0;
 +        }
 +    }
 +
 +    if ( $args{'QUOTEVALUE'} ) {
          #if we're explicitly told not to to quote the value or
          # we're doing an IS or IS NOT (null), don't quote the operator.
  
diff --cc t/01searches.t
index 664fcb7,467f10b..34bda5e
--- a/t/01searches.t
+++ b/t/01searches.t
@@@ -7,7 -7,7 +7,7 @@@ use Test::More
  BEGIN { require "t/utils.pl" }
  our (@AvailableDrivers);
  
- use constant TESTS_PER_DRIVER => 122;
 -use constant TESTS_PER_DRIVER => 127;
++use constant TESTS_PER_DRIVER => 132;
  
  my $total = scalar(@AvailableDrivers) * TESTS_PER_DRIVER;
  plan tests => $total;

commit 27c04d5f3a28bcdc617fb6325e324a4c0b1b7ebe
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Mar 13 01:47:22 2012 +0400

    bump experimental version, 1.61_02

diff --git a/META.yml b/META.yml
index 20d624d..740e628 100644
--- a/META.yml
+++ b/META.yml
@@ -11,7 +11,7 @@ configure_requires:
   ExtUtils::MakeMaker: 6.36
 distribution_type: module
 dynamic_config: 1
-generated_by: 'Module::Install version 1.04'
+generated_by: 'Module::Install version 1.06'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -30,7 +30,8 @@ requires:
   DBI: 0
   DBIx::DBSchema: 0
   Encode: 1.99
+  Scalar::Util: 0
   Want: 0
 resources:
   license: http://dev.perl.org/licenses/
-version: 1.61_01
+version: 1.61_02
diff --git a/lib/DBIx/SearchBuilder.pm b/lib/DBIx/SearchBuilder.pm
index 0f4c28a..83bc23f 100755
--- a/lib/DBIx/SearchBuilder.pm
+++ b/lib/DBIx/SearchBuilder.pm
@@ -4,7 +4,7 @@ package DBIx::SearchBuilder;
 use strict;
 use warnings;
 
-our $VERSION = "1.61_01";
+our $VERSION = "1.61_02";
 
 use Clone qw();
 use Encode qw();

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list