Hello community,

here is the log from the commit of package perl-Mojo-Pg for openSUSE:Factory 
checked in at 2019-01-28 20:48:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojo-Pg (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Mojo-Pg.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Mojo-Pg"

Mon Jan 28 20:48:55 2019 rev:17 rq:668909 version:4.13

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Mojo-Pg/perl-Mojo-Pg.changes        
2018-12-12 17:27:09.582977735 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Mojo-Pg.new.28833/perl-Mojo-Pg.changes     
2019-01-28 20:49:50.921816349 +0100
@@ -1,0 +2,9 @@
+Mon Jan 21 06:22:06 UTC 2019 - Stephan Kulow <[email protected]>
+
+- updated to 4.13
+   see /usr/share/doc/packages/perl-Mojo-Pg/Changes
+
+  4.13  2019-01-20
+    - Added support for multi-column joins to SQL::Abstract::Pg. (rsindlin)
+
+-------------------------------------------------------------------

Old:
----
  Mojo-Pg-4.12.tar.gz

New:
----
  Mojo-Pg-4.13.tar.gz

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

Other differences:
------------------
++++++ perl-Mojo-Pg.spec ++++++
--- /var/tmp/diff_new_pack.I4AZyk/_old  2019-01-28 20:49:51.493815747 +0100
+++ /var/tmp/diff_new_pack.I4AZyk/_new  2019-01-28 20:49:51.497815742 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Mojo-Pg
 #
-# Copyright (c) 2018 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
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Mojo-Pg
-Version:        4.12
+Version:        4.13
 Release:        0
 %define cpan_name Mojo-Pg
 Summary:        Wrapper around DBD::Pg for using PostgreSql with Mojolicious

++++++ Mojo-Pg-4.12.tar.gz -> Mojo-Pg-4.13.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.12/Changes new/Mojo-Pg-4.13/Changes
--- old/Mojo-Pg-4.12/Changes    2018-11-24 12:41:14.000000000 +0100
+++ new/Mojo-Pg-4.13/Changes    2019-01-20 23:32:08.000000000 +0100
@@ -1,4 +1,7 @@
 
+4.13  2019-01-20
+  - Added support for multi-column joins to SQL::Abstract::Pg. (rsindlin)
+
 4.12  2018-11-24
   - Added reconnect_interval attribute to Mojo::Pg::PubSub. (jberger)
   - Added db method to Mojo::Pg::PubSub. (jberger)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.12/META.json new/Mojo-Pg-4.13/META.json
--- old/Mojo-Pg-4.12/META.json  2018-11-24 18:05:16.000000000 +0100
+++ new/Mojo-Pg-4.13/META.json  2019-01-20 23:33:32.000000000 +0100
@@ -57,6 +57,6 @@
       },
       "x_IRC" : "irc://irc.freenode.net/#mojo"
    },
-   "version" : "4.12",
-   "x_serialization_backend" : "JSON::PP version 2.97001"
+   "version" : "4.13",
+   "x_serialization_backend" : "JSON::PP version 4.00"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.12/META.yml new/Mojo-Pg-4.13/META.yml
--- old/Mojo-Pg-4.12/META.yml   2018-11-24 18:05:16.000000000 +0100
+++ new/Mojo-Pg-4.13/META.yml   2019-01-20 23:33:32.000000000 +0100
@@ -30,5 +30,5 @@
   homepage: https://mojolicious.org
   license: http://www.opensource.org/licenses/artistic-license-2.0
   repository: https://github.com/mojolicious/mojo-pg.git
-version: '4.12'
+version: '4.13'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.12/lib/Mojo/Pg.pm 
new/Mojo-Pg-4.13/lib/Mojo/Pg.pm
--- old/Mojo-Pg-4.12/lib/Mojo/Pg.pm     2018-11-24 18:03:33.000000000 +0100
+++ new/Mojo-Pg-4.13/lib/Mojo/Pg.pm     2019-01-20 23:32:16.000000000 +0100
@@ -34,7 +34,7 @@
 has [qw(password username)] => '';
 has pubsub => sub { Mojo::Pg::PubSub->new(pg => shift) };
 
-our $VERSION = '4.12';
+our $VERSION = '4.13';
 
 sub db { $_[0]->database_class->new(dbh => $_[0]->_prepare, pg => $_[0]) }
 
@@ -552,6 +552,8 @@
 
 Hernan Lopes
 
+Joel Berger
+
 Matt S Trout
 
 Peter Rabbitson
@@ -562,7 +564,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2014-2018, Sebastian Riedel and others.
+Copyright (C) 2014-2019, Sebastian Riedel and others.
 
 This program is free software, you can redistribute it and/or modify it under
 the terms of the Artistic License version 2.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.12/lib/SQL/Abstract/Pg.pm 
new/Mojo-Pg-4.13/lib/SQL/Abstract/Pg.pm
--- old/Mojo-Pg-4.12/lib/SQL/Abstract/Pg.pm     2018-11-22 21:26:39.000000000 
+0100
+++ new/Mojo-Pg-4.13/lib/SQL/Abstract/Pg.pm     2019-01-20 23:27:46.000000000 
+0100
@@ -172,14 +172,18 @@
   my $sep = $self->{name_sep} // '';
   for my $join (@join) {
     puke 'join must be in the form [$table, $fk => $pk]' if @$join < 3;
-    my $type = @$join > 3 ? shift @$join : '';
-    my ($name, $fk, $pk) = @$join;
+    my $type = @$join % 2 == 0 ? shift @$join : '';
+    my ($name, $fk, $pk, @morekeys) = @$join;
     $table
       .= $self->_sqlcase($type =~ /^-(.+)$/ ? " $1 join " : ' join ')
       . $self->_quote($name)
-      . $self->_sqlcase(' on ') . '('
-      . $self->_quote(index($fk, $sep) > 0 ? $fk : "$name.$fk") . ' = '
-      . $self->_quote(index($pk, $sep) > 0 ? $pk : "$table[0].$pk") . ')';
+      . $self->_sqlcase(' on ') . '(';
+    do {
+      $table
+        .= $self->_quote(index($fk, $sep) > 0 ? $fk : "$name.$fk") . ' = '
+        . $self->_quote(index($pk, $sep) > 0 ? $pk : "$table[0].$pk")
+        . (@morekeys ? $self->_sqlcase(' and ') : ')');
+    } while ($fk, $pk, @morekeys) = @morekeys;
   }
 
   return $table;
@@ -290,6 +294,9 @@
   # "select * from foo left join bar on (bar.foo_id = foo.id)"
   $abstract->select(['foo', [-left => 'bar', foo_id => 'id']]);
 
+  # "select * from a left join b on (b.a_id = a.id and b.a_id2 = a.id2)"
+  $abstract->select(['a', [-left => 'b', a_id => 'id', a_id2 => 'id2']]);
+
 =head2 ORDER BY
 
 Alternatively to the C<$order> argument accepted by L<SQL::Abstract> you can 
now
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.12/t/sql.t new/Mojo-Pg-4.13/t/sql.t
--- old/Mojo-Pg-4.12/t/sql.t    2018-11-22 21:26:43.000000000 +0100
+++ new/Mojo-Pg-4.13/t/sql.t    2019-01-20 23:23:43.000000000 +0100
@@ -165,6 +165,14 @@
   ['SELECT * FROM "foo" JOIN "bar" ON ("foo"."id" = "bar"."foo_id")'],
   'right query';
 @sql
+  = $abstract->select([
+  'foo', ['bar', 'foo.id' => 'bar.foo_id', 'foo.id2' => 'bar.foo_id2']
+  ]);
+is_deeply \@sql,
+  [   'SELECT * FROM "foo" JOIN "bar" ON ("foo"."id" = "bar"."foo_id"'
+    . ' AND "foo"."id2" = "bar"."foo_id2"' . ')'
+  ], 'right query';
+@sql
   = $abstract->select(['foo', ['bar', foo_id => 'id'], ['baz', foo_id => 'id']
   ]);
 $result
@@ -185,6 +193,15 @@
 is_deeply \@sql,
   ['SELECT * FROM "foo" INNER JOIN "bar" ON ("bar"."foo_id" = "foo"."id")'],
   'right query';
+@sql
+  = $abstract->select([
+  'foo', [-left => 'bar', foo_id => 'id', foo_id2 => 'id2', foo_id3 => 'id3']
+  ]);
+is_deeply \@sql,
+  [   'SELECT * FROM "foo" LEFT JOIN "bar" ON ("bar"."foo_id" = "foo"."id"'
+    . ' AND "bar"."foo_id2" = "foo"."id2"'
+    . ' AND "bar"."foo_id3" = "foo"."id3"' . ')'
+  ], 'right query';
 
 # JOIN (unsupported value)
 eval { $abstract->select(['foo', []]) };


Reply via email to