You are here

function apachesolr_views_query::set_where_group in Apache Solr Views 7

Support for groupping.

Overrides views_plugin_query::set_where_group

See also

views_plugin_query_default::set_where_group().

1 call to apachesolr_views_query::set_where_group()
apachesolr_views_query::add_where in ./apachesolr_views_query.inc
Support for groupping.

File

./apachesolr_views_query.inc, line 263
Views query plugin for Apache Solr Views. Gets its data not from the database, but from a Solr server.

Class

apachesolr_views_query
@file Views query plugin for Apache Solr Views. Gets its data not from the database, but from a Solr server.

Code

function set_where_group($type = 'AND', $group = NULL, $where = 'where') {

  // Set an alias.
  $groups =& $this->{$where};
  if (!isset($group)) {
    $group = empty($groups) ? 1 : max(array_keys($groups)) + 1;
  }

  // Create an empty group
  if (empty($groups[$group])) {
    $groups[$group] = array(
      'conditions' => array(),
      'args' => array(),
    );
  }
  $groups[$group]['type'] = strtoupper($type);
  return $group;
}