function tripal_views_handler_field_sequence::query

2.x tripal_views_handler_field_sequence.inc tripal_views_handler_field_sequence::query()
3.x tripal_views_handler_field_sequence.inc tripal_views_handler_field_sequence::query()
1.x tripal_views_handler_field_sequence.inc tripal_views_handler_field_sequence::query()

We need to add a few fields to our query

Overrides chado_views_handler_field::query

File

tripal_views/views/handlers/tripal_views_handler_field_sequence.inc, line 79
A chado wrapper for the views_handler_field.

Class

tripal_views_handler_field_sequence
@file A chado wrapper for the views_handler_field.

Code

function query() {
  parent::query();

  // if we are going to get the sequence from the parent then
  // we will need to do more queries in the render function
  // and we must have the feature_id to do those
  if ($this->options['display']['derive_from_parent']) {
    $this->ensure_my_table();
    $this->query->add_field($this->table, 'feature_id');
    $this->query->add_field($this->table, 'name');
  }
}