src/ORM/Filters/ExactMatchFilter.php
protected function oneFilter(DataQuery $query, $inclusive)
    {
        $this->model = $query->applyRelation($this->relation);
        $field = $this->getDbName();
        $value = $this->getValue();

        // Null comparison check
        if ($value === null) {
            $where = DB::get_conn()->nullCheckClause($field, $inclusive);
            return $query->where($where);
        }

        // Value comparison check
        $where = DB::get_conn()->comparisonClause(
            $field,
            null,
            true, // exact?
            !$inclusive, // negate?
            $this->getCaseSensitive(),
            true
        );
        // for != clauses include IS NULL values, since they would otherwise be excluded
        if (!$inclusive) {
            $nullClause = DB::get_conn()->nullCheckClause($field, true);
            $where .= " OR {$nullClause}";
        }

        $clause = [$where => $value];
        
        return $this->aggregate ?
            $this->applyAggregate($query, $clause) :
            $query->where($clause);
    }
protected function oneFilter(DataQuery $query, $inclusive)
    {
        $this->model = $query->applyRelation($this->relation);
        $field = $this->getDbName();
        $value = $this->getValue();

        // Null comparison check
        if ($value === null) {
            $where = DB::get_conn()->nullCheckClause($field, $inclusive);
            return $query->where($where);
        }

        // Value comparison check
        $where = DB::get_conn()->comparisonClause(
            $field,
            null,
            true, // exact?
            !$inclusive, // negate?
            $this->getCaseSensitive(),
            true
        );
        // for != clauses include IS NULL values, since they would otherwise be excluded
        if (!$inclusive) {
            $nullClause = DB::get_conn()->nullCheckClause($field, true);
            $where .= " OR {$nullClause}";
        }

        $clause = [$where => $value];
        
        return $this->aggregate ?
            $this->applyAggregate($query, $clause) :
            $query->where($clause);
    }
protected function oneFilter ( DataQuery $ query , $ inclusive ) { $ this -> model = $ query -> applyRelation ( $ this -> relation ) ; $ field = $ this -> getDbName ( ) ; $ value = $ this -> getValue ( ) ; // Null comparison check if ( $ value === null ) { $ where = DB :: get_conn ( ) -> nullCheckClause ( $ field , $ inclusive ) ; return $ query -> where ( $ where ) ; } // Value comparison check $ where = DB :: get_conn ( ) -> comparisonClause ( $ field , null , true , // exact? ! $ inclusive , // negate? $ this -> getCaseSensitive ( ) , true ) ; // for != clauses include IS NULL values, since they would otherwise be excluded if ( ! $ inclusive ) { $ nullClause = DB :: get_conn ( ) -> nullCheckClause ( $ field , true ) ; $ where .= " OR {$nullClause}" ; } $ clause = [ $ where => $ value ] ; return $ this -> aggregate ? $ this -> applyAggregate ( $ query , $ clause ) : $ query -> where ( $ clause ) ; }
Applies a single match, either as inclusive or exclusive

@param DataQuery $query
@param bool $inclusive True if this is inclusive, or false if exclusive
@return DataQuery
Applies a single match either as inclusive or exclusive