Hello community,

here is the log from the commit of package perl-Data-ObjectDriver for 
openSUSE:Factory checked in at 2019-03-20 13:19:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Data-ObjectDriver (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Data-ObjectDriver.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Data-ObjectDriver"

Wed Mar 20 13:19:00 2019 rev:2 rq:684917 version:0.17

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Data-ObjectDriver/perl-Data-ObjectDriver.changes
    2017-10-09 19:47:03.386655300 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Data-ObjectDriver.new.28833/perl-Data-ObjectDriver.changes
 2019-03-20 13:19:06.341346551 +0100
@@ -1,0 +2,6 @@
+Wed Mar 13 15:55:07 UTC 2019 - Stephan Kulow <[email protected]>
+
+- updated to 0.17
+   see /usr/share/doc/packages/perl-Data-ObjectDriver/Changes
+
+-------------------------------------------------------------------

Old:
----
  Data-ObjectDriver-0.15.tar.gz

New:
----
  Data-ObjectDriver-0.17.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Data-ObjectDriver.spec ++++++
--- /var/tmp/diff_new_pack.zYdnhN/_old  2019-03-20 13:19:06.921346410 +0100
+++ /var/tmp/diff_new_pack.zYdnhN/_new  2019-03-20 13:19:06.921346410 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Data-ObjectDriver
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,18 +12,18 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           perl-Data-ObjectDriver
-Version:        0.15
+Version:        0.17
 Release:        0
 %define cpan_name Data-ObjectDriver
 Summary:        Simple, transparent data interface, with caching
 License:        Artistic-2.0
 Group:          Development/Libraries/Perl
-Url:            http://search.cpan.org/dist/Data-ObjectDriver/
+Url:            https://metacpan.org/release/%{cpan_name}
 Source0:        
https://cpan.metacpan.org/authors/id/S/SI/SIXAPART/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildArch:      noarch
@@ -59,7 +59,7 @@
 %setup -q -n %{cpan_name}-%{version}
 
 %build
-%{__perl} Build.PL --installdirs=vendor
+perl Build.PL --installdirs=vendor
 ./Build build --flags=%{?_smp_mflags}
 
 %check

++++++ Data-ObjectDriver-0.15.tar.gz -> Data-ObjectDriver-0.17.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Data-ObjectDriver-0.15/Changes 
new/Data-ObjectDriver-0.17/Changes
--- old/Data-ObjectDriver-0.15/Changes  2017-04-19 03:21:44.000000000 +0200
+++ new/Data-ObjectDriver-0.17/Changes  2019-03-12 05:26:32.000000000 +0100
@@ -1,4 +1,15 @@
-0.15 2017-04-19T01:21:41Z
+0.17 2019-03-12T04:26:25Z
+
+0.17 2019-03-12T04:24:20Z
+
+    - Bump version
+
+0.16 2019-03-07T07:07:14Z
+
+    - Avoid SQL syntax error: column IN () (charsbar) #26
+    - Add disconnect method explicitly to pass tests for windows (twata1) #25
+
+0.15 2017-04-19T01:41:02Z
 
     - Fix failed tests with Perl 5.25.11 (miniuchi) #24
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Data-ObjectDriver-0.15/META.json 
new/Data-ObjectDriver-0.17/META.json
--- old/Data-ObjectDriver-0.15/META.json        2017-04-19 03:21:44.000000000 
+0200
+++ new/Data-ObjectDriver-0.17/META.json        2019-03-12 05:26:32.000000000 
+0100
@@ -4,7 +4,7 @@
       "-2006"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Minilla/v3.0.10",
+   "generated_by" : "Minilla/v3.1.4",
    "license" : [
       "artistic_2"
    ],
@@ -70,7 +70,7 @@
    "provides" : {
       "Data::ObjectDriver" : {
          "file" : "lib/Data/ObjectDriver.pm",
-         "version" : "0.15"
+         "version" : "0.17"
       },
       "Data::ObjectDriver::BaseObject" : {
          "file" : "lib/Data/ObjectDriver/BaseObject.pm"
@@ -159,32 +159,37 @@
          "web" : "https://github.com/sixapart/data-objectdriver";
       }
    },
-   "version" : "0.15",
+   "version" : "0.17",
    "x_authority" : "cpan:SIXAPART",
    "x_contributors" : [
-      "Mart Atkins <[email protected]>",
-      "Jonathan Steinert <[email protected]>",
-      "Paul Lindner <[email protected]>",
+      "Adam Thomason <[email protected]>",
+      "Akira Sawada <[email protected]>",
+      "Ben Trott <[email protected]>",
+      "Brad Choate <[email protected]>",
       "Brad Fitzpatrick <[email protected]>",
-      "Mischa <[email protected]>",
+      "Brad Whitaker <[email protected]>",
+      "David Steinbrunner <[email protected]>",
       "Garth Webb <[email protected]>",
       "Graham Blankenbaker <[email protected]>",
-      "Brad Choate <[email protected]>",
+      "Jonathan Steinert <[email protected]>",
+      "Kenichi Ishigaki <[email protected]>",
+      "Kevin Goess <[email protected]>",
       "Mark Paschal <[email protected]>",
+      "Mart Atkins <[email protected]>",
+      "Masahiro Iuchi <[email protected]>",
+      "Mischa <[email protected]>",
+      "Paul Lindner <[email protected]>",
       "Sekimura <[email protected]>",
       "Simon Wistow <[email protected]>",
+      "Takatsugu Shigeta <[email protected]>",
+      "Takatsugu Shigeta <[email protected]>",
+      "Taku AMANO <[email protected]>",
       "Tatsuhiko Miyagawa <[email protected]>",
-      "Ben Trott <[email protected]>",
-      "Kevin Goess <[email protected]>",
-      "Adam Thomason <[email protected]>",
-      "Brad Whitaker <[email protected]>",
+      "Tsuyoshi Watanabe <[email protected]>",
       "Yann Kerherve <[email protected]>",
-      "Taku AMANO <[email protected]>",
       "ambs <[email protected]>",
-      "David Steinbrunner <[email protected]>",
-      "Akira Sawada <[email protected]>",
-      "ziguzagu <[email protected]>",
-      "Masahiro Iuchi <[email protected]>"
+      "ziguzagu <[email protected]>"
    ],
-   "x_serialization_backend" : "JSON::PP version 2.27300_01"
+   "x_serialization_backend" : "JSON::PP version 2.97001",
+   "x_static_install" : 1
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Data-ObjectDriver-0.15/META.yml 
new/Data-ObjectDriver-0.17/META.yml
--- old/Data-ObjectDriver-0.15/META.yml 2017-04-19 03:21:44.000000000 +0200
+++ new/Data-ObjectDriver-0.17/META.yml 2019-03-12 05:26:32.000000000 +0100
@@ -9,7 +9,7 @@
 configure_requires:
   Module::Build::Tiny: '0.035'
 dynamic_config: 0
-generated_by: 'Minilla/v3.0.10, CPAN::Meta::Converter version 2.150005'
+generated_by: 'Minilla/v3.1.4, CPAN::Meta::Converter version 2.150010'
 license: artistic_2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -28,7 +28,7 @@
 provides:
   Data::ObjectDriver:
     file: lib/Data/ObjectDriver.pm
-    version: '0.15'
+    version: '0.17'
   Data::ObjectDriver::BaseObject:
     file: lib/Data/ObjectDriver/BaseObject.pm
   Data::ObjectDriver::BaseView:
@@ -92,30 +92,35 @@
   bugtracker: https://github.com/sixapart/data-objectdriver/issues
   homepage: https://github.com/sixapart/data-objectdriver
   repository: git://github.com/sixapart/data-objectdriver.git
-version: '0.15'
+version: '0.17'
 x_authority: cpan:SIXAPART
 x_contributors:
-  - 'Mart Atkins <[email protected]>'
-  - 'Jonathan Steinert <[email protected]>'
-  - 'Paul Lindner <[email protected]>'
+  - 'Adam Thomason <[email protected]>'
+  - 'Akira Sawada <[email protected]>'
+  - 'Ben Trott <[email protected]>'
+  - 'Brad Choate <[email protected]>'
   - 'Brad Fitzpatrick <[email protected]>'
-  - 'Mischa <[email protected]>'
+  - 'Brad Whitaker <[email protected]>'
+  - 'David Steinbrunner <[email protected]>'
   - 'Garth Webb <[email protected]>'
   - 'Graham Blankenbaker <[email protected]>'
-  - 'Brad Choate <[email protected]>'
+  - 'Jonathan Steinert <[email protected]>'
+  - 'Kenichi Ishigaki <[email protected]>'
+  - 'Kevin Goess <[email protected]>'
   - 'Mark Paschal <[email protected]>'
+  - 'Mart Atkins <[email protected]>'
+  - 'Masahiro Iuchi <[email protected]>'
+  - 'Mischa <[email protected]>'
+  - 'Paul Lindner <[email protected]>'
   - 'Sekimura <[email protected]>'
   - 'Simon Wistow <[email protected]>'
+  - 'Takatsugu Shigeta <[email protected]>'
+  - 'Takatsugu Shigeta <[email protected]>'
+  - 'Taku AMANO <[email protected]>'
   - 'Tatsuhiko Miyagawa <[email protected]>'
-  - 'Ben Trott <[email protected]>'
-  - 'Kevin Goess <[email protected]>'
-  - 'Adam Thomason <[email protected]>'
-  - 'Brad Whitaker <[email protected]>'
+  - 'Tsuyoshi Watanabe <[email protected]>'
   - 'Yann Kerherve <[email protected]>'
-  - 'Taku AMANO <[email protected]>'
   - 'ambs <[email protected]>'
-  - 'David Steinbrunner <[email protected]>'
-  - 'Akira Sawada <[email protected]>'
   - 'ziguzagu <[email protected]>'
-  - 'Masahiro Iuchi <[email protected]>'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
+x_static_install: 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Data-ObjectDriver-0.15/lib/Data/ObjectDriver/SQL.pm 
new/Data-ObjectDriver-0.17/lib/Data/ObjectDriver/SQL.pm
--- old/Data-ObjectDriver-0.15/lib/Data/ObjectDriver/SQL.pm     2017-04-19 
03:21:44.000000000 +0200
+++ new/Data-ObjectDriver-0.17/lib/Data/ObjectDriver/SQL.pm     2019-03-12 
05:26:32.000000000 +0100
@@ -247,25 +247,65 @@
             $term = join " $logic ", @terms;
         } else {
             $col = $m->($col) if $m = $stmt->column_mutator;
-            $term = "$col IN (".join(',', ('?') x scalar @$val).')';
+            $term = $stmt->_mk_term_arrayref($col, 'IN', $val);
             @bind = @$val;
         }
     } elsif (ref($val) eq 'HASH') {
         my $c = $val->{column} || $col;
         $c = $m->($c) if $m = $stmt->column_mutator;
-        $term = "$c $val->{op} ?";
-        push @bind, $val->{value};
+        my $op = uc $val->{op};
+        if (($op eq 'IN' or $op eq 'NOT IN') and ref $val->{value} eq 'ARRAY') 
{
+            $term = $stmt->_mk_term_arrayref($c, $op, $val->{value});
+            push @bind, @{$val->{value}};
+        } elsif (($op eq 'IN' or $op eq 'NOT IN') and ref $val->{value} eq 
'REF') {
+            my @values = @{${$val->{value}}};
+            $term = "$c $op (" . (shift @values) . ")";
+            push @bind, @values;
+        } elsif ($op eq 'BETWEEN' and ref $val->{value} eq 'ARRAY') {
+            Carp::croak "USAGE: foo => {op => 'BETWEEN', value => [\$a, \$b]}" 
if @{$val->{value}} != 2;
+            $term = "$c $op ? AND ?";
+            push @bind, @{$val->{value}};
+        } else {
+            if (ref $val->{value} eq 'SCALAR') {
+                $term = "$c $val->{op} " . ${$val->{value}};
+            } else {
+                $term = "$c $val->{op} ?";
+                push @bind, $val->{value};
+            }
+        }
     } elsif (ref($val) eq 'SCALAR') {
         $col = $m->($col) if $m = $stmt->column_mutator;
         $term = "$col $$val";
+    } elsif (ref($val) eq 'REF') {
+        $col = $m->($col) if $m = $stmt->column_mutator;
+        my @values = @{$$val};
+        $term = "$col " . (shift @values);
+        push @bind, @values;
     } else {
         $col = $m->($col) if $m = $stmt->column_mutator;
-        $term = "$col = ?";
-        push @bind, $val;
+        if (defined $val) {
+            $term = "$col = ?";
+            push @bind, $val;
+        } else {
+            $term = "$col IS NULL";
+        }
     }
     ($term, \@bind, $col);
 }
 
+sub _mk_term_arrayref {
+    my ($stmt, $col, $op, $val) = @_;
+    if (@$val) {
+        return "$col $op (".join(',', ('?') x scalar @$val).')';
+    } else {
+        if ($op eq 'IN') {
+            return '0 = 1';
+        } elsif ($op eq 'NOT IN') {
+            return '1 = 1';
+        }
+    }
+}
+
 sub _add_index_hint {
     my $stmt = shift;
     my ($tbl_name) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Data-ObjectDriver-0.15/lib/Data/ObjectDriver.pm 
new/Data-ObjectDriver-0.17/lib/Data/ObjectDriver.pm
--- old/Data-ObjectDriver-0.15/lib/Data/ObjectDriver.pm 2017-04-19 
03:21:44.000000000 +0200
+++ new/Data-ObjectDriver-0.17/lib/Data/ObjectDriver.pm 2019-03-12 
05:26:32.000000000 +0100
@@ -11,7 +11,7 @@
 
 __PACKAGE__->mk_accessors(qw( pk_generator txn_active ));
 
-our $VERSION = '0.15';
+our $VERSION = '0.17';
 our $DEBUG = $ENV{DOD_DEBUG} || 0;
 our $PROFILE = $ENV{DOD_PROFILE} || 0;
 our $PROFILER;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Data-ObjectDriver-0.15/t/09-resultset.t 
new/Data-ObjectDriver-0.17/t/09-resultset.t
--- old/Data-ObjectDriver-0.15/t/09-resultset.t 2017-04-19 03:21:44.000000000 
+0200
+++ new/Data-ObjectDriver-0.17/t/09-resultset.t 2019-03-12 05:26:32.000000000 
+0100
@@ -173,4 +173,5 @@
     diag "calling next() after add_term() with 'op'" . $result->next; ## this 
should return the object which has "rating == 3".
 }
 
+$wine->driver->dbh->disconnect;
 teardown_dbs(qw( global ));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Data-ObjectDriver-0.15/t/10-resultset-peek.t 
new/Data-ObjectDriver-0.17/t/10-resultset-peek.t
--- old/Data-ObjectDriver-0.15/t/10-resultset-peek.t    2017-04-19 
03:21:44.000000000 +0200
+++ new/Data-ObjectDriver-0.17/t/10-resultset-peek.t    2019-03-12 
05:26:32.000000000 +0100
@@ -147,4 +147,5 @@
 is $result->next->name, 'Stags Leap';
 ok ! $result->peek_next, "Stags Leap was the last one";
 
+$wine->driver->dbh->disconnect;
 teardown_dbs(qw( global ));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Data-ObjectDriver-0.15/t/11-sql.t 
new/Data-ObjectDriver-0.17/t/11-sql.t
--- old/Data-ObjectDriver-0.15/t/11-sql.t       2017-04-19 03:21:44.000000000 
+0200
+++ new/Data-ObjectDriver-0.17/t/11-sql.t       2019-03-12 05:26:32.000000000 
+0100
@@ -3,7 +3,7 @@
 use strict;
 
 use Data::ObjectDriver::SQL;
-use Test::More tests => 68;
+use Test::More tests => 93;
 
 my $stmt = ns();
 ok($stmt, 'Created SQL object');
@@ -128,6 +128,27 @@
 is($stmt->bind->[0], 'bar');
 is($stmt->bind->[1], 'baz');
 
+$stmt = ns(); $stmt->add_where(foo => { op => 'IN', value => ['bar'] });
+is($stmt->as_sql_where, "WHERE (foo IN (?))\n");
+is(scalar @{ $stmt->bind }, 1);
+is($stmt->bind->[0], 'bar');
+
+$stmt = ns(); $stmt->add_where(foo => { op => 'NOT IN', value => ['bar'] });
+is($stmt->as_sql_where, "WHERE (foo NOT IN (?))\n");
+is(scalar @{ $stmt->bind }, 1);
+is($stmt->bind->[0], 'bar');
+
+$stmt = ns(); $stmt->add_where(foo => { op => 'BETWEEN', value => ['bar', 
'baz'] });
+is($stmt->as_sql_where, "WHERE (foo BETWEEN ? AND ?)\n");
+is(scalar @{ $stmt->bind }, 2);
+is($stmt->bind->[0], 'bar');
+is($stmt->bind->[1], 'baz');
+
+$stmt = ns(); $stmt->add_where(foo => { op => 'LIKE', value => 'bar%' });
+is($stmt->as_sql_where, "WHERE (foo LIKE ?)\n");
+is(scalar @{ $stmt->bind }, 1);
+is($stmt->bind->[0], 'bar%');
+
 $stmt = ns(); $stmt->add_where(foo => { op => '!=', value => 'bar' });
 is($stmt->as_sql_where, "WHERE (foo != ?)\n");
 is(scalar @{ $stmt->bind }, 1);
@@ -174,6 +195,34 @@
 is($stmt->bind->[1], 'bar');
 is($stmt->bind->[2], 'baz');
 
+$stmt = ns();
+$stmt->add_where(foo => \['IN (SELECT foo FROM bar WHERE t=?)', 'foo']);
+is($stmt->as_sql_where, "WHERE (foo IN (SELECT foo FROM bar WHERE t=?))\n");
+is(scalar @{ $stmt->bind }, 1);
+is($stmt->bind->[0], 'foo');
+
+$stmt = ns();
+$stmt->add_where(foo => { op => 'IN', value => \['(SELECT foo FROM bar WHERE 
t=?)', 'foo']});
+is($stmt->as_sql_where, "WHERE (foo IN ((SELECT foo FROM bar WHERE t=?)))\n");
+is(scalar @{ $stmt->bind }, 1);
+is($stmt->bind->[0], 'foo');
+
+$stmt = ns();
+$stmt->add_where(foo => { op => 'IN', value => \'(SELECT foo FROM bar)'});
+is($stmt->as_sql_where, "WHERE (foo IN (SELECT foo FROM bar))\n");
+is(scalar @{ $stmt->bind }, 0);
+
+$stmt = ns();
+$stmt->add_where(foo => undef);
+is($stmt->as_sql_where, "WHERE (foo IS NULL)\n");
+is(scalar @{ $stmt->bind }, 0);
+
+## avoid syntax error
+$stmt = ns();
+$stmt->add_where(foo => []);
+is($stmt->as_sql_where, "WHERE (0 = 1)\n"); # foo IN ()
+is(scalar @{ $stmt->bind }, 0);
+
 ## regression bug. modified parameters
 my %terms = ( foo => [-and => 'foo', 'bar', 'baz']);
 $stmt = ns();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Data-ObjectDriver-0.15/t/12-windows.t 
new/Data-ObjectDriver-0.17/t/12-windows.t
--- old/Data-ObjectDriver-0.15/t/12-windows.t   2017-04-19 03:21:44.000000000 
+0200
+++ new/Data-ObjectDriver-0.17/t/12-windows.t   2019-03-12 05:26:32.000000000 
+0100
@@ -99,6 +99,8 @@
 is( $load_count, 2, "2 objects loaded; limit argument respected");
 $iter->end;
 
+$r->driver->dbh->disconnect;
+$i->driver->dbh->disconnect;
 teardown_dbs(qw( global ));
 
 print Dumper( Data::ObjectDriver->profiler->query_log ) if $ENV{DOD_PROFILE};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Data-ObjectDriver-0.15/t/35-multiplexed.t 
new/Data-ObjectDriver-0.17/t/35-multiplexed.t
--- old/Data-ObjectDriver-0.15/t/35-multiplexed.t       2017-04-19 
03:21:44.000000000 +0200
+++ new/Data-ObjectDriver-0.17/t/35-multiplexed.t       2019-03-12 
05:26:32.000000000 +0100
@@ -139,4 +139,7 @@
     is $obj2->recipe_id, $obj->recipe_id;
 }
 
+for my $driver (@{ Ingredient2Recipe->driver->drivers }) {
+    $driver->dbh->disconnect;
+}
 teardown_dbs(qw( global1 global2 ));


Reply via email to