.

ExecuteSqlScriptCommand Class Reference
[Behaviour]

Generic SQL script execution command. More...

Inheritance diagram for ExecuteSqlScriptCommand:
CommandTransactional CommandBase ICommand IAction ISerializable

List of all members.

Public Member Functions

  __construct ($sql, $connection=DB::DEFAULT_CONNECTION)
  Constructor.

Protected Member Functions

  do_execute ()
  Executes commands.

Detailed Description

Generic SQL script execution command.

Author:
Gerd Riesselmann

Definition at line 8 of file execute.sqlscript.cmd.php.


Constructor & Destructor Documentation

ExecuteSqlScriptCommand::__construct ( sql,
connection = DB::DEFAULT_CONNECTION  
)

Constructor.

Parameters:
array|string  $sql

Reimplemented from CommandBase.

Definition at line 14 of file execute.sqlscript.cmd.php.

00014                                                                               {
00015                 parent::__construct($connection, $sql);
00016         }

Member Function Documentation

ExecuteSqlScriptCommand::do_execute (  )  [protected]

Executes commands.

Returns:
Status

Reimplemented from CommandTransactional.

Definition at line 23 of file execute.sqlscript.cmd.php.

00023                                         {
00024                 $sqls = Arr::force($this->get_params(), false);
00025                 $ret = new Status();
00026                 foreach($sqls as $sql) {
00027                         $ret->merge(DB::execute_script($sql, $this->get_instance()));
00028                         if ($ret->is_error()) {
00029                                 break;
00030                         }
00031                 }
00032                 return $ret;
00033         }

The documentation for this class was generated from the following file: