Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-Mojo-Pg for openSUSE:Factory 
checked in at 2021-03-17 20:14:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojo-Pg (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Mojo-Pg.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Mojo-Pg"

Wed Mar 17 20:14:54 2021 rev:28 rq:875104 version:4.25

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Mojo-Pg/perl-Mojo-Pg.changes        
2021-02-15 23:16:52.643447523 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Mojo-Pg.new.2401/perl-Mojo-Pg.changes      
2021-03-17 20:19:14.307258761 +0100
@@ -1,0 +2,9 @@
+Sun Feb 21 03:11:58 UTC 2021 - Tina M??ller <[email protected]>
+
+- updated to 4.25
+   see /usr/share/doc/packages/perl-Mojo-Pg/Changes
+
+  4.25  2021-02-20
+    - Moved SQL::Abstract::Pg into a separate distribution.
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ perl-Mojo-Pg.spec ++++++
--- /var/tmp/diff_new_pack.aGwldx/_old  2021-03-17 20:19:14.719259324 +0100
+++ /var/tmp/diff_new_pack.aGwldx/_new  2021-03-17 20:19:14.719259324 +0100
@@ -18,7 +18,7 @@
 
 %define cpan_name Mojo-Pg
 Name:           perl-Mojo-Pg
-Version:        4.24
+Version:        4.25
 Release:        0
 Summary:        Wrapper around DBD::Pg for using PostgreSql with Mojolicious
 License:        Artistic-2.0
@@ -30,10 +30,10 @@
 BuildRequires:  perl-macros
 BuildRequires:  perl(DBD::Pg) >= 3.007004
 BuildRequires:  perl(Mojolicious) >= 8.50
-BuildRequires:  perl(SQL::Abstract) >= 1.86
+BuildRequires:  perl(SQL::Abstract::Pg) >= 1.0
 Requires:       perl(DBD::Pg) >= 3.007004
 Requires:       perl(Mojolicious) >= 8.50
-Requires:       perl(SQL::Abstract) >= 1.86
+Requires:       perl(SQL::Abstract::Pg) >= 1.0
 %{perl_requires}
 
 %description

++++++ Mojo-Pg-4.24.tar.gz -> Mojo-Pg-4.25.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.24/Changes new/Mojo-Pg-4.25/Changes
--- old/Mojo-Pg-4.24/Changes    2021-01-28 19:07:02.000000000 +0100
+++ new/Mojo-Pg-4.25/Changes    2021-02-20 17:53:58.000000000 +0100
@@ -1,4 +1,7 @@
 
+4.25  2021-02-20
+  - Moved SQL::Abstract::Pg into a separate distribution.
+
 4.24  2021-01-27
   - Fixed Mojolicious 8.72 support.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.24/MANIFEST new/Mojo-Pg-4.25/MANIFEST
--- old/Mojo-Pg-4.24/MANIFEST   2021-02-06 17:11:33.000000000 +0100
+++ new/Mojo-Pg-4.25/MANIFEST   2021-02-20 18:12:15.000000000 +0100
@@ -20,7 +20,6 @@
 lib/Mojo/Pg/PubSub.pm
 lib/Mojo/Pg/Results.pm
 lib/Mojo/Pg/Transaction.pm
-lib/SQL/Abstract/Pg.pm
 LICENSE
 Makefile.PL
 MANIFEST                       This list of files
@@ -45,6 +44,5 @@
 t/pod_coverage.t
 t/pubsub.t
 t/results.t
-t/sql.t
 META.yml                                 Module YAML meta-data (added by 
MakeMaker)
 META.json                                Module JSON meta-data (added by 
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.24/META.json new/Mojo-Pg-4.25/META.json
--- old/Mojo-Pg-4.24/META.json  2021-02-06 17:11:33.000000000 +0100
+++ new/Mojo-Pg-4.25/META.json  2021-02-20 18:12:15.000000000 +0100
@@ -4,7 +4,7 @@
       "Sebastian Riedel <[email protected]>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "ExtUtils::MakeMaker version 7.58, CPAN::Meta::Converter 
version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 7.60, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "artistic_2"
    ],
@@ -36,7 +36,7 @@
          "requires" : {
             "DBD::Pg" : "3.007004",
             "Mojolicious" : "8.50",
-            "SQL::Abstract" : "1.86",
+            "SQL::Abstract::Pg" : "1.0",
             "perl" : "5.016"
          }
       }
@@ -60,6 +60,6 @@
          "web" : "https://webchat.freenode.net/#mojo";
       }
    },
-   "version" : "4.24",
+   "version" : "4.25",
    "x_serialization_backend" : "JSON::PP version 4.06"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.24/META.yml new/Mojo-Pg-4.25/META.yml
--- old/Mojo-Pg-4.24/META.yml   2021-02-06 17:11:32.000000000 +0100
+++ new/Mojo-Pg-4.25/META.yml   2021-02-20 18:12:15.000000000 +0100
@@ -7,7 +7,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 0
-generated_by: 'ExtUtils::MakeMaker version 7.58, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.60, CPAN::Meta::Converter version 
2.150010'
 license: artistic_2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -22,7 +22,7 @@
 requires:
   DBD::Pg: '3.007004'
   Mojolicious: '8.50'
-  SQL::Abstract: '1.86'
+  SQL::Abstract::Pg: '1.0'
   perl: '5.016'
 resources:
   IRC:
@@ -32,5 +32,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.24'
+version: '4.25'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.24/Makefile.PL new/Mojo-Pg-4.25/Makefile.PL
--- old/Mojo-Pg-4.24/Makefile.PL        2021-01-17 15:58:13.000000000 +0100
+++ new/Mojo-Pg-4.25/Makefile.PL        2021-02-20 17:54:07.000000000 +0100
@@ -29,6 +29,6 @@
       x_IRC => {url => 'irc://chat.freenode.net/#mojo', web => 
'https://webchat.freenode.net/#mojo'}
     },
   },
-  PREREQ_PM => {'DBD::Pg' => 3.007004, Mojolicious => '8.50', 'SQL::Abstract' 
=> '1.86'},
+  PREREQ_PM => {'DBD::Pg' => 3.007004, Mojolicious => '8.50', 
'SQL::Abstract::Pg' => '1.0'},
   test      => {TESTS     => 't/*.t t/*/*.t'}
 );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.24/lib/Mojo/Pg.pm 
new/Mojo-Pg-4.25/lib/Mojo/Pg.pm
--- old/Mojo-Pg-4.24/lib/Mojo/Pg.pm     2021-01-17 15:58:18.000000000 +0100
+++ new/Mojo-Pg-4.25/lib/Mojo/Pg.pm     2021-02-20 17:54:51.000000000 +0100
@@ -22,7 +22,7 @@
 has [qw(password username)] => '';
 has pubsub                  => sub { Mojo::Pg::PubSub->new(pg => shift) };
 
-our $VERSION = '4.24';
+our $VERSION = '4.25';
 
 sub db { $_[0]->database_class->new(dbh => $_[0]->_prepare, pg => $_[0]) }
 
@@ -494,8 +494,6 @@
 
 =item * L<Mojo::Pg::Transaction>
 
-=item * L<SQL::Abstract::Pg>
-
 =back
 
 =head1 AUTHOR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.24/lib/SQL/Abstract/Pg.pm 
new/Mojo-Pg-4.25/lib/SQL/Abstract/Pg.pm
--- old/Mojo-Pg-4.24/lib/SQL/Abstract/Pg.pm     2021-01-17 15:58:19.000000000 
+0100
+++ new/Mojo-Pg-4.25/lib/SQL/Abstract/Pg.pm     1970-01-01 01:00:00.000000000 
+0100
@@ -1,340 +0,0 @@
-package SQL::Abstract::Pg;
-use Mojo::Base 'SQL::Abstract';
-
-BEGIN { *puke = \&SQL::Abstract::puke }
-
-sub insert {
-  my ($self, $table, $data, $options) = @_;
-  local @{$options}{qw(returning _pg_returning)} = (1, 1) if exists 
$options->{on_conflict} && !$options->{returning};
-  return $self->SUPER::insert($table, $data, $options);
-}
-
-sub new {
-  my $self = shift->SUPER::new(@_);
-
-  # -json op
-  push @{$self->{unary_ops}}, {
-    regex   => qr/^json$/,
-    handler => sub { '?', {json => $_[2]} }
-  };
-
-  return $self;
-}
-
-sub _insert_returning {
-  my ($self, $options) = @_;
-
-  delete $options->{returning} if $options->{_pg_returning};
-
-  # ON CONFLICT
-  my $sql = '';
-  my @bind;
-  if (exists $options->{on_conflict}) {
-    my $conflict = $options->{on_conflict};
-    my ($conflict_sql, @conflict_bind);
-    $self->_SWITCH_refkind(
-      $conflict => {
-        ARRAYREF => sub {
-          my ($target, $set) = @$conflict;
-          puke 'on_conflict value must be in the form [$target, \%set]' unless 
ref $set eq 'HASH';
-          $target = [$target]                                           unless 
ref $target eq 'ARRAY';
-
-          $conflict_sql = '(' . join(', ', map { $self->_quote($_) } @$target) 
. ')';
-          $conflict_sql .= $self->_sqlcase(' do update set ');
-          my ($set_sql, @set_bind) = $self->_update_set_values($set);
-          $conflict_sql .= $set_sql;
-          push @conflict_bind, @set_bind;
-        },
-        ARRAYREFREF => sub { ($conflict_sql, @conflict_bind) = @$$conflict },
-        SCALARREF   => sub { $conflict_sql = $$conflict },
-        UNDEF       => sub { $conflict_sql = $self->_sqlcase('do nothing') }
-      }
-    );
-    $sql .= $self->_sqlcase(' on conflict ') . $conflict_sql;
-    push @bind, @conflict_bind;
-  }
-
-  $sql .= $self->SUPER::_insert_returning($options) if $options->{returning};
-
-  return $sql, @bind;
-}
-
-sub _order_by {
-  my ($self, $options) = @_;
-
-  # Legacy
-  return $self->SUPER::_order_by($options) if ref $options ne 'HASH' or grep 
{/^-(?:desc|asc)/i} keys %$options;
-
-  # GROUP BY
-  my $sql = '';
-  my @bind;
-  if (defined(my $group = $options->{group_by})) {
-    my $group_sql;
-    $self->_SWITCH_refkind(
-      $group => {
-        ARRAYREF => sub {
-          $group_sql = join ', ', map { $self->_quote($_) } @$group;
-        },
-        SCALARREF => sub { $group_sql = $$group }
-      }
-    );
-    $sql .= $self->_sqlcase(' group by ') . $group_sql;
-  }
-
-  # HAVING
-  if (defined(my $having = $options->{having})) {
-    my ($having_sql, @having_bind) = $self->_recurse_where($having);
-    $sql .= $self->_sqlcase(' having ') . $having_sql;
-    push @bind, @having_bind;
-  }
-
-  # ORDER BY
-  $sql .= $self->_order_by($options->{order_by}) if defined 
$options->{order_by};
-
-  # LIMIT
-  if (defined $options->{limit}) {
-    $sql .= $self->_sqlcase(' limit ') . '?';
-    push @bind, $options->{limit};
-  }
-
-  # OFFSET
-  if (defined $options->{offset}) {
-    $sql .= $self->_sqlcase(' offset ') . '?';
-    push @bind, $options->{offset};
-  }
-
-  # FOR
-  if (defined(my $for = $options->{for})) {
-    my $for_sql;
-    $self->_SWITCH_refkind(
-      $for => {
-        SCALAR => sub {
-          puke qq{for value "$for" is not allowed} unless $for eq 'update';
-          $for_sql = $self->_sqlcase('UPDATE');
-        },
-        SCALARREF => sub { $for_sql .= $$for }
-      }
-    );
-    $sql .= $self->_sqlcase(' for ') . $for_sql;
-  }
-
-  return $sql, @bind;
-}
-
-sub _select_fields {
-  my ($self, $fields) = @_;
-
-  return $fields unless ref $fields eq 'ARRAY';
-
-  my (@fields, @bind);
-  for my $field (@$fields) {
-    $self->_SWITCH_refkind(
-      $field => {
-        ARRAYREF => sub {
-          puke 'field alias must be in the form [$name => $alias]' if @$field 
< 2;
-          push @fields, $self->_quote($field->[0]) . $self->_sqlcase(' as ') . 
$self->_quote($field->[1]);
-        },
-        ARRAYREFREF => sub {
-          push @fields, shift @$$field;
-          push @bind,   @$$field;
-        },
-        SCALARREF => sub { push @fields, $$field },
-        FALLBACK  => sub { push @fields, $self->_quote($field) }
-      }
-    );
-  }
-
-  return join(', ', @fields), @bind;
-}
-
-sub _table {
-  my ($self, $table) = @_;
-
-  return $self->SUPER::_table($table) unless ref $table eq 'ARRAY';
-
-  my (@table, @join);
-  for my $t (@$table) {
-    if   (ref $t eq 'ARRAY') { push @join,  $t }
-    else                     { push @table, $t }
-  }
-
-  $table = $self->SUPER::_table(\@table);
-  my $sep = $self->{name_sep} // '';
-  for my $join (@join) {
-    puke 'join must be in the form [$table, $fk => $pk]' if @$join < 3;
-    my ($type, $name, $fk, $pk, @morekeys) = @$join % 2 == 0 ? @$join : ('', 
@$join);
-    $table
-      .= $self->_sqlcase($type =~ /^-(.+)$/ ? " $1 join " : ' join ')
-      . $self->_quote($name)
-      . $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;
-}
-
-1;
-
-=encoding utf8
-
-=head1 NAME
-
-SQL::Abstract::Pg - PostgreSQL
-
-=head1 SYNOPSIS
-
-  use SQL::Abstract::Pg;
-
-  my $abstract = SQL::Abstract::Pg->new;
-  say $abstract->select('some_table');
-
-=head1 DESCRIPTION
-
-L<SQL::Abstract::Pg> extends L<SQL::Abstract> with a few PostgreSQL features 
used by L<Mojo::Pg>.
-
-=head2 JSON
-
-In many places (as supported by L<SQL::Abstract>) you can use the C<-json> 
unary op to encode JSON from Perl data
-structures.
-
-  # "UPDATE some_table SET foo = '[1,2,3]' WHERE bar = 23"
-  $abstract->update('some_table', {foo => {-json => [1, 2, 3]}}, {bar => 23});
-
-  # "SELECT * FROM some_table WHERE foo = '[1,2,3]'"
-  $abstract->select('some_table', '*', {foo => {'=' => {-json => [1, 2, 3]}}});
-
-=head1 INSERT
-
-  $abstract->insert($table, \@values || \%fieldvals, \%options);
-
-=head2 ON CONFLICT
-
-The C<on_conflict> option can be used to generate C<INSERT> queries with C<ON 
CONFLICT> clauses. So far, C<undef> to
-pass C<DO NOTHING>, array references to pass C<DO UPDATE> with conflict 
targets and a C<SET> expression, scalar
-references to pass literal SQL and array reference references to pass literal 
SQL with bind values are supported.
-
-  # "INSERT INTO t (a) VALUES ('b') ON CONFLICT DO NOTHING"
-  $abstract->insert('t', {a => 'b'}, {on_conflict => undef});
-
-  # "INSERT INTO t (a) VALUES ('b') ON CONFLICT DO NOTHING"
-  $abstract->insert('t', {a => 'b'}, {on_conflict => \'do nothing'});
-
-This includes operations commonly referred to as C<upsert>.
-
-  # "INSERT INTO t (a) VALUES ('b') ON CONFLICT (a) DO UPDATE SET a = 'c'"
-  $abstract->insert('t', {a => 'b'}, {on_conflict => [a => {a => 'c'}]});
-
-  # "INSERT INTO t (a, b) VALUES ('c', 'd') ON CONFLICT (a, b) DO UPDATE SET a 
= 'e'"
-  $abstract->insert('t', {a => 'c', b => 'd'}, {on_conflict => [['a', 'b'] => 
{a => 'e'}]});
-
-  # "INSERT INTO t (a) VALUES ('b') ON CONFLICT (a) DO UPDATE SET a = 'c'"
-  $abstract->insert('t', {a => 'b'}, {on_conflict => \['(a) do update set a = 
?', 'c']});
-
-=head1 SELECT
-
-  $abstract->select($source, $fields, $where, $order);
-  $abstract->select($source, $fields, $where, \%options);
-
-=head2 AS
-
-The C<$fields> argument now also accepts array references containing array 
references with field names and aliases, as
-well as array references containing scalar references to pass literal SQL and 
array reference references to pass
-literal SQL with bind values.
-
-  # "SELECT foo AS bar FROM some_table"
-  $abstract->select('some_table', [[foo => 'bar']]);
-
-  # "SELECT foo, bar AS baz, yada FROM some_table"
-  $abstract->select('some_table', ['foo', [bar => 'baz'], 'yada']);
-
-  # "SELECT EXTRACT(EPOCH FROM foo) AS foo, bar FROM some_table"
-  $abstract->select('some_table', [\'extract(epoch from foo) AS foo', 'bar']);
-
-  # "SELECT 'test' AS foo, bar FROM some_table"
-  $abstract->select('some_table', [\['? AS foo', 'test'], 'bar']);
-
-=head2 JOIN
-
-The C<$source> argument now also accepts array references containing not only 
table names, but also array references
-with tables to generate C<JOIN> clauses for.
-
-  # "SELECT * FROM foo JOIN bar ON (bar.foo_id = foo.id)"
-  $abstract->select(['foo', ['bar', foo_id => 'id']]);
-
-  # "SELECT * FROM foo JOIN bar ON (foo.id = bar.foo_id)"
-  $abstract->select(['foo', ['bar', 'foo.id' => 'bar.foo_id']]);
-
-  # "SELECT * FROM a JOIN b ON (b.a_id = a.id) JOIN c ON (c.a_id = a.id)"
-  $abstract->select(['a', ['b', a_id => 'id'], ['c', a_id => 'id']]);
-
-  # "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 also pass a hash reference with
-various options. This includes C<order_by>, which takes the same values as the 
C<$order> argument.
-
-  # "SELECT * FROM some_table ORDER BY foo DESC"
-  $abstract->select('some_table', '*', undef, {order_by => {-desc => 'foo'}});
-
-=head2 LIMIT/OFFSET
-
-The C<limit> and C<offset> options can be used to generate C<SELECT> queries 
with C<LIMIT> and C<OFFSET> clauses.
-
-  # "SELECT * FROM some_table LIMIT 10"
-  $abstract->select('some_table', '*', undef, {limit => 10});
-
-  # "SELECT * FROM some_table OFFSET 5"
-  $abstract->select('some_table', '*', undef, {offset => 5});
-
-  # "SELECT * FROM some_table LIMIT 10 OFFSET 5"
-  $abstract->select('some_table', '*', undef, {limit => 10, offset => 5});
-
-=head2 GROUP BY
-
-The C<group_by> option can be used to generate C<SELECT> queries with C<GROUP 
BY> clauses. So far, array references to
-pass a list of fields and scalar references to pass literal SQL are supported.
-
-  # "SELECT * FROM some_table GROUP BY foo, bar"
-  $abstract->select('some_table', '*', undef, {group_by => ['foo', 'bar']});
-
-  # "SELECT * FROM some_table GROUP BY foo, bar"
-  $abstract->select('some_table', '*', undef, {group_by => \'foo, bar'});
-
-=head2 HAVING
-
-The C<having> option can be used to generate C<SELECT> queries with C<HAVING> 
clauses, which takes the same values as
-the C<$where> argument.
-
-  # "SELECT * FROM t GROUP BY a HAVING b = 'c'"
-  $abstract->select('t', '*', undef, {group_by => ['a'], having => {b => 
'c'}});
-
-=head2 FOR
-
-The C<for> option can be used to generate C<SELECT> queries with C<FOR> 
clauses. So far, the scalar value C<update> to
-pass C<UPDATE> and scalar references to pass literal SQL are supported.
-
-  # "SELECT * FROM some_table FOR UPDATE"
-  $abstract->select('some_table', '*', undef, {for => 'update'});
-
-  # "SELECT * FROM some_table FOR UPDATE SKIP LOCKED"
-  $abstract->select('some_table', '*', undef, {for => \'update skip locked'});
-
-=head1 METHODS
-
-L<SQL::Abstract::Pg> inherits all methods from L<SQL::Abstract>.
-
-=head1 SEE ALSO
-
-L<Mojo::Pg>, L<Mojolicious::Guides>, L<https://mojolicious.org>.
-
-=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.24/t/pod_coverage.t 
new/Mojo-Pg-4.25/t/pod_coverage.t
--- old/Mojo-Pg-4.24/t/pod_coverage.t   2020-10-24 23:29:50.000000000 +0200
+++ new/Mojo-Pg-4.25/t/pod_coverage.t   2021-02-20 17:55:32.000000000 +0100
@@ -5,8 +5,4 @@
 plan skip_all => 'set TEST_POD to enable this test (developer only!)' unless 
$ENV{TEST_POD};
 plan skip_all => 'Test::Pod::Coverage 1.04+ required for this test!'  unless 
eval 'use Test::Pod::Coverage 1.04; 1';
 
-my $private = ['insert', 'new', 'puke', 'select'];
-my %RULES   = ('SQL::Abstract::Pg' => {also_private => $private},);
-pod_coverage_ok($_, $RULES{$_} || {}) for all_modules();
-
-done_testing();
+all_pod_coverage_ok();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Mojo-Pg-4.24/t/sql.t new/Mojo-Pg-4.25/t/sql.t
--- old/Mojo-Pg-4.24/t/sql.t    2020-10-24 23:29:49.000000000 +0200
+++ new/Mojo-Pg-4.25/t/sql.t    1970-01-01 01:00:00.000000000 +0100
@@ -1,155 +0,0 @@
-use Mojo::Base -strict;
-
-use Test::More;
-use Mojo::Pg;
-use SQL::Abstract::Test import => ['is_same_sql_bind'];
-
-sub is_query {
-  my ($got, $want, $msg) = @_;
-  my $got_sql  = shift @$got;
-  my $want_sql = shift @$want;
-  local $Test::Builder::Level = $Test::Builder::Level + 1;
-  is_same_sql_bind $got_sql, $got, $want_sql, $want, $msg;
-}
-
-my $pg       = Mojo::Pg->new;
-my $abstract = $pg->abstract;
-
-subtest 'Basics' => sub {
-  is_query [$abstract->insert('foo', {bar => 'baz'})], ['INSERT INTO "foo" ( 
"bar") VALUES ( ? )', 'baz'],
-    'right query';
-  is_query [$abstract->select('foo', '*')], ['SELECT * FROM "foo"'], 'right 
query';
-  is_query [$abstract->select(['foo', 'bar', 'baz'])], ['SELECT * FROM "foo", 
"bar", "baz"'], 'right query';
-};
-
-subtest 'ON CONFLICT' => sub {
-  my @sql = $abstract->insert('foo', {bar => 'baz'}, {on_conflict => \'do 
nothing'});
-  is_query \@sql, ['INSERT INTO "foo" ( "bar") VALUES ( ? ) ON CONFLICT do 
nothing', 'baz'], 'right query';
-  @sql = $abstract->insert('foo', {bar => 'baz'}, {on_conflict => undef});
-  is_query \@sql, ['INSERT INTO "foo" ( "bar") VALUES ( ? ) ON CONFLICT DO 
NOTHING', 'baz'], 'right query';
-  @sql = $abstract->insert('foo', {bar => 'baz'}, {on_conflict => \'do 
nothing', returning => '*'});
-  my $result = ['INSERT INTO "foo" ( "bar") VALUES ( ? ) ON CONFLICT do 
nothing RETURNING *', 'baz'];
-  is_query \@sql, $result, 'right query';
-  @sql    = $abstract->insert('foo', {bar => 'baz'}, {on_conflict => \['(foo) 
do update set foo = ?', 'yada']});
-  $result = ['INSERT INTO "foo" ( "bar") VALUES ( ? )' . ' ON CONFLICT (foo) 
do update set foo = ?', 'baz', 'yada'];
-  is_query \@sql, $result, 'right query';
-  @sql    = $abstract->insert('foo', {bar => 'baz'}, {on_conflict => [foo => 
{foo => 'yada'}]});
-  $result = ['INSERT INTO "foo" ( "bar") VALUES ( ? )' . ' ON CONFLICT ("foo") 
DO UPDATE SET "foo" = ?', 'baz', 'yada'];
-  is_query \@sql, $result, 'right query';
-  @sql    = $abstract->insert('foo', {bar => 'baz'}, {on_conflict => [['foo', 
'bar'] => {foo => 'yada'}]});
-  $result = ['INSERT INTO "foo" ( "bar") VALUES ( ? )' . ' ON CONFLICT ("foo", 
"bar") DO UPDATE SET "foo" = ?', 'baz',
-    'yada'];
-  is_query \@sql, $result, 'right query';
-};
-
-subtest 'ON CONFLICT (unsupported value)' => sub {
-  eval { $abstract->insert('foo', {bar => 'baz'}, {on_conflict => [[], []]}) };
-  like $@, qr/on_conflict value must be in the form \[\$target, \\\%set\]/, 
'right error';
-  eval { $abstract->insert('foo', {bar => 'baz'}, {on_conflict => {}}) };
-  like $@, qr/HASHREF/, 'right error';
-};
-
-subtest 'ORDER BY' => sub {
-  my @sql = $abstract->select('foo', '*', {bar => 'baz'}, {-desc => 'yada'});
-  is_query \@sql, ['SELECT * FROM "foo" WHERE ( "bar" = ? ) ORDER BY "yada" 
DESC', 'baz'], 'right query';
-  @sql = $abstract->select('foo', '*', {bar => 'baz'}, {order_by => {-desc => 
'yada'}});
-  is_query \@sql, ['SELECT * FROM "foo" WHERE ( "bar" = ? ) ORDER BY "yada" 
DESC', 'baz'], 'right query';
-};
-
-subtest 'LIMIT/OFFSET' => sub {
-  my @sql = $abstract->select('foo', '*', undef, {limit => 10, offset => 5});
-  is_query \@sql, ['SELECT * FROM "foo" LIMIT ? OFFSET ?', 10, 5], 'right 
query';
-};
-
-subtest 'GROUP BY' => sub {
-  my @sql = $abstract->select('foo', '*', undef, {group_by => \'bar, baz'});
-  is_query \@sql, ['SELECT * FROM "foo" GROUP BY bar, baz'], 'right query';
-  @sql = $abstract->select('foo', '*', undef, {group_by => ['bar', 'baz']});
-  is_query \@sql, ['SELECT * FROM "foo" GROUP BY "bar", "baz"'], 'right query';
-};
-
-subtest 'HAVING' => sub {
-  my @sql = $abstract->select('foo', '*', undef, {group_by => ['bar'], having 
=> {baz => 'yada'}});
-  is_query \@sql, ['SELECT * FROM "foo" GROUP BY "bar" HAVING "baz" = ?', 
'yada'], 'right query';
-  @sql
-    = $abstract->select('foo', '*', {bar => {'>' => 'baz'}}, {group_by => 
['bar'], having => {baz => {'<' => 'bar'}}});
-  my $result = ['SELECT * FROM "foo" WHERE ( "bar" > ? ) GROUP BY "bar" HAVING 
"baz" < ?', 'baz', 'bar'];
-  is_query \@sql, $result, 'right query';
-};
-
-subtest 'GROUP BY (unsupported value)' => sub {
-  eval { $abstract->select('foo', '*', undef, {group_by => {}}) };
-  like $@, qr/HASHREF/, 'right error';
-};
-
-subtest 'FOR' => sub {
-  my @sql = $abstract->select('foo', '*', undef, {for => 'update'});
-  is_query \@sql, ['SELECT * FROM "foo" FOR UPDATE'], 'right query';
-  @sql = $abstract->select('foo', '*', undef, {for => \'update skip locked'});
-  is_query \@sql, ['SELECT * FROM "foo" FOR update skip locked'], 'right 
query';
-};
-
-subtest 'FOR (unsupported value)' => sub {
-  eval { $abstract->select('foo', '*', undef, {for => 'update skip locked'}) };
-  like $@, qr/for value "update skip locked" is not allowed/, 'right error';
-  eval { $abstract->select('foo', '*', undef, {for => []}) };
-  like $@, qr/ARRAYREF/, 'right error';
-};
-
-subtest 'AS' => sub {
-  my @sql = $abstract->select('foo', ['bar', [bar => 'baz'], 'yada']);
-  is_query \@sql, ['SELECT "bar", "bar" AS "baz", "yada" FROM "foo"'], 'right 
query';
-  @sql = $abstract->select('foo', ['bar', \'extract(epoch from baz) as baz', 
'yada']);
-  is_query \@sql, ['SELECT "bar", extract(epoch from baz) as baz, "yada" FROM 
"foo"'], 'right query';
-  @sql = $abstract->select('foo', ['bar', \['? as baz', 'test'], 'yada']);
-  is_query \@sql, ['SELECT "bar", ? as baz, "yada" FROM "foo"', 'test'], 
'right query';
-};
-
-subtest 'AS (unsupported value)' => sub {
-  eval { $abstract->select('foo', [[]]) };
-  like $@, qr/field alias must be in the form \[\$name => \$alias\]/, 'right 
error';
-};
-
-subtest 'JSON' => sub {
-  my @sql = $abstract->update('foo', {bar => {-json => [1, 2, 3]}});
-  is_query \@sql, ['UPDATE "foo" SET "bar" = ?', {json => [1, 2, 3]}], 'right 
query';
-  @sql = $abstract->select('foo', '*', {bar => {'=' => {-json => [1, 2, 3]}}});
-  is_query \@sql, ['SELECT * FROM "foo" WHERE ( "bar" = ? )', {json => [1, 2, 
3]}], 'right query';
-};
-
-subtest 'JOIN' => sub {
-  my @sql = $abstract->select(['foo', ['bar', foo_id => 'id']]);
-  is_query \@sql, ['SELECT * FROM "foo" JOIN "bar" ON ("bar"."foo_id" = 
"foo"."id")'], 'right query';
-  @sql = $abstract->select(['foo', ['bar', 'foo.id' => 'bar.foo_id']]);
-  is_query \@sql, ['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_query \@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']]);
-  my $result
-    = [ 'SELECT * FROM "foo"'
-      . ' JOIN "bar" ON ("bar"."foo_id" = "foo"."id")'
-      . ' JOIN "baz" ON ("baz"."foo_id" = "foo"."id")'
-    ];
-  is_query \@sql, $result, 'right query';
-  @sql = $abstract->select(['foo', [-left => 'bar', foo_id => 'id']]);
-  is_query \@sql, ['SELECT * FROM "foo" LEFT JOIN "bar" ON ("bar"."foo_id" = 
"foo"."id")'], 'right query';
-  @sql = $abstract->select(['foo', [-right => 'bar', foo_id => 'id']]);
-  is_query \@sql, ['SELECT * FROM "foo" RIGHT JOIN "bar" ON ("bar"."foo_id" = 
"foo"."id")'], 'right query';
-  @sql = $abstract->select(['foo', [-inner => 'bar', foo_id => 'id']]);
-  is_query \@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_query \@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';
-};
-
-subtest 'JOIN (unsupported value)' => sub {
-  eval { $abstract->select(['foo', []]) };
-  like $@, qr/join must be in the form \[\$table, \$fk => \$pk\]/, 'right 
error';
-};
-
-done_testing();

Reply via email to