- 2.x tripal_core/api/tripal_core.chado_general.api.inc tripal_chado_api
- 1.x tripal_core/api/tripal_core_chado.api.inc tripal_chado_api
Provides an application programming interface (API) to manage data withing the Chado database.
This includes functions for selecting, inserting, updating and deleting records in Chado tables. The functions will ensure proper integrity contraints are met for inserts and updates.
Also, a set of functions is provided for creating template variables. First, is the chado_generate_var which is used to select one ore more records from a table and return an array with foreign key relationships fully populated. For example, if selecting a feature, the organism_id and type_id would be present in the returned array as a nested array with their respective foreign keys also nested. The only fields that are not included are text fields (which may be very large) or many-to-many foreign key relationships. However, these fields and relationships can be expanded using the chado_expand_var.
When a row from a chado table is selected using these two functions, it provides a way for users who want to cutomize Drupal template files to access all data associate with a specific record.
Finally, the property tables in Chado generally follow the same format. Therefore there is a set of functions for inserting, updating and deleting properties for any table. This provides quick lookup of properties (provided the CV term is known).
api/ tripal_core.chado_general.api.inc, line 10
- Provides an application programming interface (API) to manage data withing the Chado database.
||Deletes a property for a given base table record using the property name|
||Retrieve a property for a given base table record.|
||Get all records in the base table assigned one or more properties.|
||Get max rank for a given set of criteria This function was developed with the many property tables in chado in mind but will work for any table with a rank|
||Insert a property for a given base table.|
||Set the Tripal Database|
||Update a property for a given base table record and property name.|
||Alter Chado connection settings.|
|Chado Node API||
||Many Tripal modules implement Drupal node types as a means of displaying chado records individually through Drupal as a single web page. In order to do this, many of the same drupal hooks are implemented and the code between modules is actually…|
|Chado Query API||
||Provides an API for querying of chado including inserting, updating, deleting and selecting from specific chado tables. There is also a generic function, chado_query(), to execute and SQL statement on chado. It is ideal to use these functions to…|
|Chado Schema API||
||Provides an application programming interface (API) for describing Chado tables. This API consists of a set of functions, one for each table in Chado. Each function simply returns a Drupal style array that defines the table.|