protected function assertCondition($record, $condition)
    {
        $left = $condition[0];
        $op = $condition[1];
        $right = $condition[2];

        switch ($op) {
            case '=':
                $value = $this->getRecordField($record, $left);
                return $value == $right;

            case '==':
                $value = $this->getRecordField($record, $left);
                return $value === $right;

            case '!=':
                $value = $this->getRecordField($record, $left);
                return $value != $right;

            case '!==':
                $value = $this->getRecordField($record, $left);
                return $value !== $right;

            case '<':
                $value = $this->getRecordField($record, $left);
                return $value < $right;

            case '>':
                $value = $this->getRecordField($record, $left);
                return $value > $right;

            default:
                throw new Exception('Operator ['.$op.'] is not supported');
        }
    }
protected function assertCondition($record, $condition)
    {
        $left = $condition[0];
        $op = $condition[1];
        $right = $condition[2];

        switch ($op) {
            case '=':
                $value = $this->getRecordField($record, $left);
                return $value == $right;

            case '==':
                $value = $this->getRecordField($record, $left);
                return $value === $right;

            case '!=':
                $value = $this->getRecordField($record, $left);
                return $value != $right;

            case '!==':
                $value = $this->getRecordField($record, $left);
                return $value !== $right;

            case '<':
                $value = $this->getRecordField($record, $left);
                return $value < $right;

            case '>':
                $value = $this->getRecordField($record, $left);
                return $value > $right;

            default:
                throw new Exception('Operator ['.$op.'] is not supported');
        }
    }
protected function assertCondition ( $ record , $ condition ) { $ left = $ condition [ 0 ] ; $ op = $ condition [ 1 ] ; $ right = $ condition [ 2 ] ; switch ( $ op ) { case '=' : $ value = $ this -> getRecordField ( $ record , $ left ) ; return $ value == $ right ; case '==' : $ value = $ this -> getRecordField ( $ record , $ left ) ; return $ value === $ right ; case '!=' : $ value = $ this -> getRecordField ( $ record , $ left ) ; return $ value != $ right ; case '!==' : $ value = $ this -> getRecordField ( $ record , $ left ) ; return $ value !== $ right ; case '<' : $ value = $ this -> getRecordField ( $ record , $ left ) ; return $ value < $ right ; case '>' : $ value = $ this -> getRecordField ( $ record , $ left ) ; return $ value > $ right ; default : throw new Exception ( 'Operator [' . $ op . '] is not supported' ) ; } }
Check if a single record should be matched for a single Query condition

@param $record
@param $condition
@return bool
@throws \Exception
Check if a single record should be matched for a single Query condition