Moved search_literal, count, count_literal onto resultset
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / Retrieve.pm
index 6937fb3..31dd128 100644 (file)
@@ -5,7 +5,12 @@ use warnings FATAL => 'all';
 
 sub retrieve          { shift->find(@_)            }
 sub retrieve_all      { shift->search              }
-sub retrieve_from_sql { shift->search_literal(@_)  }
+
+sub retrieve_from_sql {
+  my ($class, $cond, @rest) = @_;
+  $cond =~ s/^\s*WHERE//i;
+  $class->search_literal($cond, @rest);
+}
 
 sub count_all         { shift->count               }
   # Contributed by Numa. No test for this though.