try to use new interface
Arthur Axel 'fREW' Schmidt [Wed, 2 Feb 2011 22:46:03 +0000 (16:46 -0600)]
lib/DBIx/Class/SQLMaker.pm
t/sqlmaker/op_dt.t

index 4b444f3..d57fed2 100644 (file)
@@ -233,7 +233,7 @@ sub _where_op_CONVERT_DATETIME {
   $rhs = $self->datetime_parser->format_datetime($rhs);
 
   my @bind = [
-    ($lhs || $self->{_nested_func_lhs} || croak "Unable to find bindtype for -value $rhs"),
+    ($lhs || $self->{_nested_func_lhs} || undef),
     $rhs
   ];
 
index 1288cf9..c19956b 100644 (file)
@@ -29,8 +29,8 @@ use Devel::Dwarn;
 
 Dwarn [$schema->resultset('Artist')->search(undef, {
    select => [
-      { -date_diff => [second => { -dt => $date }, { -dt => $date2 }] },
-      { -date_diff => [day    => { -dt => $date }, { -dt => $date2 }] },
+      [ -dt_diff => [second => { -dt => $date }, { -dt => $date2 }] ],
+      [ -dt_diff => [day    => { -dt => $date }, { -dt => $date2 }] ],
    ],
    as => [qw(seconds days)],
    result_class => 'DBIx::Class::ResultClass::HashRefInflator',