protected function get_value() {

		$query = $this->for_clause ? '(' : $this->get_comparison();

		if ( ! empty( $this->clauses ) ) {
			foreach ( $this->clauses as $i => $clause ) {

				// We don't want to add the connector if this is the first clause and there is no comparison.
				if ( strlen( $query ) > 1 ) {
					$query .= ' ' . $clause['type'] . ' ';
				}

				/** @var Where $where */
				$where = $clause['clause'];

				if ( ! $where->is_for_clause() ) {
					$query .= '(';
				}

				$query .= $where->get_value();

				if ( ! $where->is_for_clause() ) {
					$query .= ')';
				}
			}
		}

		if ( $this->for_clause ) {
			$query .= ')';
		}

		return $query;
	}