ensembl-hive
2.8.0
|
This RunnableDB module acts as a wrapper for an SQL command run against either the current hive database (default) or against one specified by 'db_conn' parameter (--db_conn becomes obligatory in standalone mode, because there is no hive_db). The Sql command must be stored in the parameters() as the value corresponding to the 'sql' key. It allows to pass in other parameters and use the parameter substitution mechanism in its full glory. The Sql command(s) can be wrapped in a global transaction if the "wrap_in_transaction" flag is switched on (off by default)
protected Bio::EnsEMBL::Hive::RunnableDB::SqlCmd::_exec_sql | ( | ) |
Description : Actually run the sql command(s). If a list of commands is given, they are run in succession within the same session (so you can create a temporary tables and use it in another command within the same sql command list).
param('sql'): Either a scalar SQL command or an array of SQL commands.
param('db_conn'): An optional hash to pass in connection parameters to the database upon which the sql command(s) will have to be run.
param('*'): Any other parameters can be freely used for parameter substitution.
public Bio::EnsEMBL::Hive::RunnableDB::SqlCmd::param_defaults | ( | ) |
Undocumented method
public Bio::EnsEMBL::Hive::RunnableDB::SqlCmd::run | ( | ) |
Description : Implements run() interface method of Bio::EnsEMBL::Hive::Process that is used to perform the main bulk of the job (minus input and output). Here it is a simple decision step based on the "wrap_in_transaction" parameter. If the latter is set, call _exec_sql() in a transaction, otherwise call it directly.
param('wrap_in_transaction'): Whether or not run the commands in a global transaction
public Bio::EnsEMBL::Hive::RunnableDB::SqlCmd::write_output | ( | ) |
Description : Implements write_output() interface method of Bio::EnsEMBL::Hive::Process that is used to deal with job's output after the execution. Here we only flow out the insert_ids.