function chado_get_obo

3.x tripal_chado.cv.api.inc chado_get_obo($values)

Retrieves an OBO record.

Parameters

$values: An associate array with the following allowed keys: obo_id, name.

Return value

An instance of an OBO record object.

Related topics

1 call to chado_get_obo()
tripal_get_obo in tripal_chado/api/modules/tripal_chado.module.DEPRECATED.api.inc
Retrieves an OBO record.

File

tripal_chado/api/modules/tripal_chado.cv.api.inc, line 1406
Provides API functions specificially for managing controlled vocabulary records in Chado.

Code

function chado_get_obo($values) {
  $query = db_select('tripal_cv_obo', 'tco')
    ->fields('tco');

  if (array_key_exists('name', $values)) {
    $query->condition('tco.name', $values['name']);
  }
  if (array_key_exists('obo_id', $values)) {
    $query->condition('tco.obo_id', $values['obo_id']);
  }
  return $query->execute()->fetchObject();
}