function tripal_add_mview

2.x tripal_core.mviews.api.inc tripal_add_mview($name, $modulename, $mv_schema, $query, $comment = NULL)
3.x tripal_chado.DEPRECATED.api.inc tripal_add_mview($name, $modulename, $mv_schema, $query, $comment = null, $redirect = true)
1.x tripal_core_mviews.api.inc tripal_add_mview($name, $modulename, $mv_table, $mv_specs, $indexed, $query, $special_index, $comment = NULL, $mv_schema = NULL)

Add a materialized view to the chado database to help speed data access. This function supports the older style where postgres column specifications are provided using the $mv_table, $mv_specs and $indexed variables. It also supports the newer preferred method where the materialized view is described using the Drupal Schema API array.

Parameters

$name: The name of the materialized view.

$modulename: The name of the module submitting the materialized view (e.g. 'tripal_library').

$mv_schema: If using the newer Schema API array to define the materialized view then this variable should contain the array or a string representation of the array.

$query: The SQL query that loads the materialized view with data.

$comment: A string containing a description of the materialized view.

$redirect: Optional (default: TRUE). By default this function redirects back to admin pages. However, when called by Drush we don't want to redirect. This parameter allows this to be used as a true API function.

2 calls to tripal_add_mview()
tripal_mviews_form_submit in tripal_chado/includes/tripal_chado.mviews.inc
Submit the Create/Edit Materialized View Form Implements hook_form_submit().
tripal_phylogeny_add_mview in legacy/tripal_phylogeny/tripal_phylogeny.install

File

tripal_chado/api/tripal_chado.DEPRECATED.api.inc, line 123
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_add_mview($name, $modulename, $mv_schema, $query, $comment = null, $redirect = true) {
  chado_add_mview($name, $modulename, $mv_schema, $query, $comment = null, $redirect = true);
}