function tripal_insert_db

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

Adds a new database to the Chado DB table and returns the DB object.

Parameters

$values: An associative array of the values of the db (those to be inserted):

  • name: The name of the database. This name is usually used as the prefix for CV term accessions.
  • description: (Optional) A description of the database. By default no description is required.
  • url: (Optional) The URL for the database.
  • urlprefix: (Optional) The URL that is to be used as a prefix when constructing a link to a database term.

$options: Optional. An associative array of options that can include:

  • update_existing: Set this to '1' to force an update of the database if it already exists. The default is to not update. If the database exists then nothing is added.

Return value

An object populated with fields from the newly added database. If the database already exists it returns the values in the current entry.

1 call to tripal_insert_db()
tripal_db_add_db in legacy/tripal_db/api/tripal_db.DEPRECATED.inc
1 string reference to 'tripal_insert_db'
tripal_db_add_db in legacy/tripal_db/api/tripal_db.DEPRECATED.inc

File

tripal_chado/api/modules/tripal_chado.module.DEPRECATED.api.inc, line 589
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_insert_db($values, $options = array()) {
  chado_insert_db($values, $options);
}