Adds extra where conditions when temporal filtering is needed.

@param array $join_result
@param string $name
@return array
507700
protected function modify_join_result($join_result, $name)
	{
		if ( ! is_null($this->timestamp) and is_subclass_of($join_result[$name]['model'], '\Orm\Model_Temporal'))
		{
			//Add the needed conditions to allow for temporal-ness
			$table      = $join_result[$name]['table'][1];
			$query_time = \DB::escape($this->timestamp);
			$join_result[$name]['join_on'][] = array("$table.$this->timestamp_start_col", '<=', $query_time);
			$join_result[$name]['join_on'][] = array("$table.$this->timestamp_end_col", '>=', $query_time);
		}

		return $join_result;
	}
1118430
def _compile_update_join_wheres(self, query):
        
        join_wheres = []

        for join in query.joins:
            for clause in join.clauses:
                join_wheres.append(self._compile_join_constraints(clause))

        return " ".join(join_wheres)
471412
public function apply($name, $value, $query, FilterInterface $filter)
    {
        $column = $this->translationTable . '.'
                . ( ! empty($this->column) ? $this->column : $name);

        $operator = '=';

        if ( ! $this->exact) {
            $operator = 'LIKE';
            $value    = '%' . $value . '%';
        }

        $query->where($this->translationTable . '.locale', $this->locale)
              ->where($column, $operator, $value);


        // add a join for the translations
        $filter->addJoin(
            JoinKey::TRANSLATIONS,
            [
                $this->translationTable,
                $this->translationTable . '.' . str_singular($this->table) . '_id',
                '=',
                $this->table . '.id'
            ]
        );

        return $query;
    }
358946
public function whereNotBetween($name, $first_value, $last_value = null)
    {

        if (is_array($first_value) && count($first_value) == 2) {
            $last_value = $first_value[1];
            $first_value = $first_value[0];
        }

        $this->must_not[] = ["range" => [$name => ["gte" => $first_value, "lte" => $last_value]]];

        return $this;
    }
304882
private function appendRelation(QueryBuilder $queryBuilder, $relation, $values, $operator, $alias)
    {
        switch ($operator) {
            case 'or':
                return $this->appendRelationOr($queryBuilder, $relation, $values, $alias);
            case 'and':
                return $this->appendRelationAnd($queryBuilder, $relation, $values, $alias);
        }

        return [];
    }
279716
public function removeConditionByName($condition_name)
     {
         foreach($this->_conditions as $key => $condition)
         {
             if(strpos($condition, $condition_name) !== false)
             {
                 array_splice($this->_conditions, $key, 1);
             }
         }
         return $this->_conditions;
     }
1298260
protected function makeConditions($type, $join = 'AND')
    {
        $conditionHolder = "{$type}Conditions";

        // If there are no clauses, return empty string
        if (count($this->$conditionHolder) === 0) {
            return '';
        }

        $conditions = [];

        /*
         * Bind all values to property to execute query
         */
        foreach ($this->$conditionHolder as $condition) {
            $conditions[] = $condition[0];
            $this->bindings = array_merge($this->bindings, $condition[1]);
        }

        return strtoupper($type).' '.implode(" $join ", $conditions);
    }
641640
public function filter($name, array $options = [])
    {
        $result = static::INT_FILTER;

        if ($this->isMultipartImage()) {
            $this->resource = $this->resource->coalesceImages();
        }

        foreach ($this->resource as $frame) {
            $result = $this->callParentFilter($name, $options);
        }


        if (static::EXT_FILTER === $result and isset($this->filters[$name])) {

            $filter = new $this->filters[$name]($this, $options);

            foreach ($this->resource as $frame) {
                $filter->run();
            }
        }

    }
1070798
public function buildDSRetrievalSQL($data, &$joins, &$where, $andOperation = false)
    {
        $field_id = $this->get('id');

        if (self::isFilterRegex($data[0])) {
            $this->buildRegexSQL($data[0], array('value'), $joins, $where);
        } elseif (self::isFilterSQL($data[0])) {
            $this->buildFilterSQL($data[0], array('value'), $joins, $where);
        } else {
            if (is_array($data)) {
                $data = $data[0];
            }

            $this->_key++;
            $data = $this->cleanValue($data);
            $joins .= "
                LEFT JOIN
                    `tbl_entries_data_{$field_id}` AS t{$field_id}_{$this->_key}
                    ON (e.id = t{$field_id}_{$this->_key}.entry_id)
            ";
            $where .= "
                AND MATCH (t{$field_id}_{$this->_key}.value) AGAINST ('{$data}' IN BOOLEAN MODE)
            ";
        }

        return true;
    }
343485
public function addJoin($join)
    {
        if (!$this->joins->contains($join)) {
            $this->joins[] = $join;
        }

        return $this;
    }
137478
public function addFilter(string $name, $value): void
    {
        $this->filter[$name] = $value;
        $this->updateUriQuery();
    }
682743
protected function visitSirelNodeJoin(Node\Join $join)
    {
        switch ($join->mode) {
            case Node\Join::INNER:
                $mode = "INNER";
                break;
            case Node\Join::LEFT:
                $mode = "LEFT";
                break;
            case Node\Join::LEFT_OUTER:
                $mode = "LEFT OUTER";
                break;
            case Node\Join::RIGHT:
                $mode = "RIGHT";
                break;
            case Node\Join::OUTER;
                $mode = "OUTER";
                break;
            default:
                $mode = '';
                break;
        }

        return ($join->natural ? 'NATURAL ' : '')
            . ($mode ? $mode . ' ' : '')
            . "JOIN "
            . $this->visit($join->left)
            . ($join->right ? ' ' . $this->visit($join->right) : '');
    }
19518
public static function getJoinAlias(Join $join): string
    {
        @trigger_error(sprintf('The use of "%s::getJoinAlias()" is deprecated since 2.3 and will be removed in 3.0. Use "%s::getAlias()" directly instead.', __CLASS__, Join::class), E_USER_DEPRECATED);

        return $join->getAlias();
    }
1252753
public function getSettingJoined($name, $key = null)
	{
		if( debug_assert($this->settingExistsJoined($name),'Tried to retrieve not existing joined setting.') )
		{
			if($key)
			{
				if(isset($this->_settingsJoined[$name][$key]))
				{
					return $this->_settingsJoined[$name][$key];
				}
			}
			else
			{
				return $this->_settingsJoined[$name];
			}
		}
		return null;
	}
827780
static function filter($event_name, $default = null, $parameters = [], $subject = null, $desc = null) {
        self::$events[$event_name] = $desc ? $desc : $event_name;
        $event                     = new \sfEvent($subject, $event_name, $parameters);
        self::dispatcher()
            ->filter($event, $default);
        
        return $event->getReturnValue();
    }
1191611
public function joinCondition()
    {
        if (!isset($this->_joinCondition)) {
            $this->_joinCondition = Factory::filter($this);
        }
        return $this->_joinCondition;
    }
487203
@Override
    public boolean include(T result) {
        boolean include = true;
        
        for (IQueryFilter<T> dataFilter : filters) {
            include &= dataFilter.include(result);
            
            if (!include) {
                break;
            }
        }
        
        return include;
    }