From: Arthur Axel 'fREW' Schmidt Date: Wed, 2 Feb 2011 22:46:03 +0000 (-0600) Subject: try to use new interface X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f10826273af949217b7b1f628ca4c842aea646da;p=dbsrgits%2FDBIx-Class.git try to use new interface --- diff --git a/lib/DBIx/Class/SQLMaker.pm b/lib/DBIx/Class/SQLMaker.pm index 4b444f3..d57fed2 100644 --- a/lib/DBIx/Class/SQLMaker.pm +++ b/lib/DBIx/Class/SQLMaker.pm @@ -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 ]; diff --git a/t/sqlmaker/op_dt.t b/t/sqlmaker/op_dt.t index 1288cf9..c19956b 100644 --- a/t/sqlmaker/op_dt.t +++ b/t/sqlmaker/op_dt.t @@ -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',