CGI-OptimalQuery
view release on metacpan or search on metacpan
t/007_notequalmultival.t view on Meta::CPAN
use strict;
no warnings;
use FindBin qw($Bin);
use lib "$Bin/../lib";
require "$Bin/testutil.pl";
use Test::More tests => 1;
my $errs = "";
OQ::foreachdb(sub {
my $oq = OQ::schema(
'select' => {
'U_ID' => ['movie','movie.movie_id','Movie ID'],
'NAME' => ['movie', 'movie.name', 'Name'],
'CAST' => ['moviecastperson', 'moviecastperson.name', 'All Cast (seprated by commas)']
},
filter => "[CAST] != 'Mark Hamill'",
'module' => 'CSV',
'joins' => {
'movie' => [undef, "oqtest_movie movie"],
'moviecast' => ['movie', 'JOIN oqtest_moviecast moviecast ON (movie.movie_id = moviecast.movie_id)', undef, { new_cursor => 1 }],
'moviecastperson' => ['moviecast', 'JOIN oqtest_person moviecastperson ON (moviecast.person_id=moviecastperson.person_id)']
}
);
$oq->output();
$errs .= "$OQ::DBTYPE has Hamill; " if $OQ::BUF =~ /Hamill/s;
});
is($errs, '', "notequalmultival");
( run in 1.245 second using v1.01-cache-2.11-cpan-524268b4103 )