You are here

public function apachesolr_views_query::ensure_table in Apache Solr Views 6

Same name and namespace in other branches
  1. 7 apachesolr_views_query.inc \apachesolr_views_query::ensure_table()

Ensure table function.

File

./apachesolr_views_query.inc, line 457

Class

apachesolr_views_query
Class for handling a view that gets its data not from the database, but from a Solr server.

Code

public function ensure_table($table, $relationship) {
  if ($table != $this->base_table) {
    if (substr($table, 0, strlen($this->base_table)) == $this->base_table) {
      $real_table = substr($table, strlen($this->base_table) + 1);
    }
    else {
      $real_table = $table;
    }
    return $this->_db_query
      ->ensure_table($real_table, $relationship);
  }
}