Make sure the fix for RT#99503 (SQLA a5f91febe) keeps working
Peter Rabbitson [Sat, 25 Oct 2014 12:00:10 +0000 (14:00 +0200)]
Changes
Makefile.PL
t/72pg.t

diff --git a/Changes b/Changes
index 7918191..bc17ebb 100644 (file)
--- a/Changes
+++ b/Changes
@@ -6,6 +6,8 @@ Revision history for DBIx::Class
         - Fix endless loop on BareSourcelessResultClass->throw_exception(...)
 
     * Misc
+        - Depend on newer SQL::Abstract (fixing overly-aggressive parenthesis
+          opener: RT#99503)
         - Depend on newer Moo, fixing some interoperability issues:
           http://lists.scsys.co.uk/pipermail/dbix-class/2014-October/011787.html
 
index 48b54eb..b3ac93a 100644 (file)
@@ -62,7 +62,7 @@ my $runtime_requires = {
   'namespace::clean'         => '0.24',
   'Path::Class'              => '0.18',
   'Scope::Guard'             => '0.03',
-  'SQL::Abstract'            => '1.80',
+  'SQL::Abstract'            => '1.81',
   'Try::Tiny'                => '0.07',
 
   # Technically this is not a core dependency - it is only required
index 1e7ed0a..857ff64 100644 (file)
--- a/t/72pg.t
+++ b/t/72pg.t
@@ -149,6 +149,16 @@ for my $use_insert_returning ($test_server_supports_insert_returning
   run_apk_tests($schema); #< older set of auto-pk tests
   run_extended_apk_tests($schema); #< new extended set of auto-pk tests
 
+
+######## test the pg-specific syntax from https://rt.cpan.org/Ticket/Display.html?id=99503
+  lives_ok {
+    is(
+      $schema->resultset('Artist')->search({ artistid => { -in => \ '(select 4) union (select 5)' } })->count,
+      2,
+      'Two expected artists found on subselect union within IN',
+    );
+  };
+
 ### type_info tests
 
   my $test_type_info = {