Class-DBI-Sybase

 view release on metacpan or  search on metacpan

FreeTDS.pm  view on Meta::CPAN

# Inline them instead. This overrides a Class::DBI method.
sub _do_search {
        my $proto = shift;
	my $search_type = shift || '';
	my @args  = @_;
        my $class = ref $proto || $proto;

        @args = %{ $args[0] } if ref $args[0] eq "HASH";
        my (@cols, @vals);
        my $search_opts = @args % 2 ? pop @args : {};
	my @frag = ();

        while (my ($col, $val) = splice @args, 0, 2) {
		$col = $class->find_column($col) or $class->croak("$col is not a column of $class");
                $val = $class->_deflated_column($col, $val) || next;

		push @frag, "$col $search_type $val";
        }

	my $frag = join(' AND ', @frag);
        $frag .= " ORDER BY $search_opts->{order_by}" if $search_opts->{order_by};

        return $class->sth_to_objects($class->sql_Retrieve($frag));
}

1;

__END__



( run in 2.035 seconds using v1.01-cache-2.11-cpan-364913b4093 )