function tripal_get_db

2.x tripal_db.api.inc tripal_get_db($identifiers, $options = array())
3.x tripal_chado.module.DEPRECATED.api.inc tripal_get_db($identifiers, $options = array())

Retrieves a chado db variable.

Example Usage:

  $select_values = array(
    'name' => 'SOFP'
  );
  $db_object = tripal_get_db($select_values);

The above code selects the SOFP db and returns the following object:

  $db_object = stdClass Object (
    [db_id] => 49
    [name] => SOFP
    [description] =>
    [urlprefix] =>
    [url] =>
  );

Parameters

$identifier: An array with the key stating what the identifier is. Supported keys (only on of the following unique keys is required):

  • db_id: the chado db.db_id primary key.
  • name: the chado db.name field (assume unique).

$options: An array of options. Supported keys include:

  • Any keys supported by chado_generate_var(). See that function definition for additional details.

NOTE: the $identifier parameter can really be any array similar to $values passed into chado_select_record(). It should fully specify the db record to be returned.

Return value

If unique values were passed in as an identifier then an object describing the cv will be returned (will be a chado variable from chado_generate_var()). Otherwise, an array of objects will be returned.

3 calls to tripal_get_db()
3 string references to 'tripal_get_db'

File

tripal_chado/api/modules/tripal_chado.module.DEPRECATED.api.inc, line 469
These api functions are deprecated, if your site is currently using them please update your code with the newer tripal_chado functions.

Code

function tripal_get_db($identifiers, $options = array()) {
  chado_get_db($identifiers, $options);
}