int => undef, # no conversion
};
- sub _map_data_type {
+ sub _native_data_type {
return $type_map->{$_[1]};
}
}
'tracks.last_updated_at' => { '!=', undef },
'tracks.last_updated_on' => { '<', 2009 },
'tracks.position' => 4,
+ 'tracks.single_track' => \[ '= ?', [ single_track => [1, 2, 3 ] ] ],
}, { join => 'tracks' });
-my $bind = [ [ cdid => 5 ], [ 'tracks.last_updated_on' => 2009 ], [ 'tracks.position' => 4 ] ];
+my $bind = [
+ [ cdid => 5 ],
+ [ 'tracks.last_updated_on' => 2009 ],
+ [ 'tracks.position' => 4 ],
+ [ 'single_track' => [ 1, 2, 3] ],
+];
is_same_sql_bind (
$rs->as_query,
AND tracks.last_updated_at IS NOT NULL
AND tracks.last_updated_on < ?
AND tracks.position = ?
+ AND tracks.single_track = ?
)',
$bind,
'expected sql with casting off',
AND tracks.last_updated_at IS NOT NULL
AND tracks.last_updated_on < CAST (? AS yyy)
AND tracks.position = ?
+ AND tracks.single_track = CAST(? AS INT)
)',
$bind,
'expected sql with casting on',