function tripal_refresh_mview
2.x tripal_core.mviews.api.inc | tripal_refresh_mview($mview_id) |
3.x tripal_chado.DEPRECATED.api.inc | tripal_refresh_mview($mview_id) |
Populates the specified Materialized View
Parameters
$mview_id: The unique ID of the materialized view for the action to be performed on
Related topics
2 calls to tripal_refresh_mview()
- tripal_mviews_action in tripal_core/
api/ tripal_core.DEPRECATED.api.inc - tripal_mviews_add_populate_job in tripal_core/
includes/ tripal_core.mviews.inc - A wrapper for the tripal_refresh_mview() API function, which then redirects back to the admin page for mviews.
1 string reference to 'tripal_refresh_mview'
- tripal_mviews_action in tripal_core/
api/ tripal_core.DEPRECATED.api.inc
File
- tripal_core/
api/ tripal_core.mviews.api.inc, line 334 - Provides an application programming interface (API) to manage materialized views in Chado.
Code
function tripal_refresh_mview($mview_id) {
global $user;
if (!$mview_id) {
return '';
}
// get this mview details
$sql = "SELECT * FROM {tripal_mviews} WHERE mview_id = :mview_id";
$results = db_query($sql, array(':mview_id' => $mview_id));
$mview = $results->fetchObject();
// add a job to populate the mview
$args = array("$mview_id");
tripal_add_job("Populate materialized view '$mview->name'", 'tripal_core',
'tripal_populate_mview', $args, $user->uid);
}