function tripal_core_get_chado_table_schema
2.x tripal_core.DEPRECATED.api.inc | tripal_core_get_chado_table_schema($table) |
3.x tripal_core.DEPRECATED.inc | tripal_core_get_chado_table_schema($table) |
1.x tripal_core_chado.api.inc | tripal_core_get_chado_table_schema($table) |
Retrieves the chado tables Schema API array.
@returns A Drupal Schema API array defining the table.
Parameters
$table: The name of the table to retrieve. The function will use the appopriate Tripal chado schema API hooks (e.g. v1.11 or v1.2).
Related topics
28 calls to tripal_core_get_chado_table_schema()
- drush_tripal_core_tripal_chadotable_desc in tripal_core/
tripal_core.drush.inc - Returns the Tripal Schema API Description of the given table
- get_chado_fk_relationships in tripal_core/
api/ get_FKs.php - process_data_array_for_line in tripal_bulk_loader/
includes/ tripal_bulk_loader.loader.inc - Process the data array for a given line
- tripal_bulk_loader_add_foreignkey_to_values in tripal_bulk_loader/
includes/ tripal_bulk_loader.loader.inc - Handles foreign keys in the values array.
- tripal_bulk_loader_add_template_field_form in tripal_bulk_loader/
includes/ tripal_bulk_loader.admin.templates.inc - Add Field Form
File
- tripal_core/
api/ tripal_core_chado.api.inc, line 3606 - The Tripal Core API
Code
function tripal_core_get_chado_table_schema($table) {
// first get the chado version that is installed
$v = tripal_core_get_chado_version();
// get the table array from the proper chado schema
$v = preg_replace("/\./", "_", $v); // reformat version for hook name
$table_arr = module_invoke_all("chado_schema_v" . $v . "_" . $table);
// if the table_arr is empty then maybe this is a custom table
if (!is_array($table_arr) or count($table_arr) == 0) {
$table_arr = tripal_get_chado_custom_schema($table);
}
return $table_arr;
}