src/SearchableTrait.php
protected function getCaseCompare($column, $compare, $relevance) {
        if($this->getDatabaseDriver() == 'pgsql') {
            $field = "LOWER(" . $column . ") " . $compare . " ?";
            return '(case when ' . $field . ' then ' . $relevance . ' else 0 end)';
        }

        $column = str_replace('.', '`.`', $column);
        $field = "LOWER(`" . $column . "`) " . $compare . " ?";
        return '(case when ' . $field . ' then ' . $relevance . ' else 0 end)';
    }
protected function getCaseCompare($column, $compare, $relevance) {
        if($this->getDatabaseDriver() == 'pgsql') {
            $field = "LOWER(" . $column . ") " . $compare . " ?";
            return '(case when ' . $field . ' then ' . $relevance . ' else 0 end)';
        }

        $column = str_replace('.', '`.`', $column);
        $field = "LOWER(`" . $column . "`) " . $compare . " ?";
        return '(case when ' . $field . ' then ' . $relevance . ' else 0 end)';
    }
protected function getCaseCompare ( $ column , $ compare , $ relevance ) { if ( $ this -> getDatabaseDriver ( ) == 'pgsql' ) { $ field = "LOWER(" . $ column . ") " . $ compare . " ?" ; return '(case when ' . $ field . ' then ' . $ relevance . ' else 0 end)' ; } $ column = str_replace ( '.' , '`.`' , $ column ) ; $ field = "LOWER(`" . $ column . "`) " . $ compare . " ?" ; return '(case when ' . $ field . ' then ' . $ relevance . ' else 0 end)' ; }
Returns the comparison string.

@param string $column
@param string $compare
@param float $relevance
@return string
Returns the comparison string .