ExecuteSqlCommand Class Reference
[Behaviour]
Generic SQL execution command. More...
Inheritance diagram for
ExecuteSqlCommand:
Public Member Functions |
|
__construct ($sql, $connection=DB::DEFAULT_CONNECTION) | |
Constructor. |
|
Protected Member Functions |
|
do_execute () | |
Executes commands. |
Detailed Description
Generic SQL execution command.
Definition at line 8 of file execute.sql.cmd.php.
Constructor & Destructor Documentation
ExecuteSqlCommand::__construct | ( | $ | sql, | |
$ | connection = DB::DEFAULT_CONNECTION |
|||
) |
Constructor.
- Parameters:
-
array|string $sql
Reimplemented from CommandBase.
Definition at line 14 of file execute.sql.cmd.php.
00014 { 00015 parent::__construct($connection, $sql); 00016 }
Member Function Documentation
ExecuteSqlCommand::do_execute | ( | ) | [protected] |
Executes commands.
- Returns:
- Status
Reimplemented from CommandTransactional.
Definition at line 23 of file execute.sql.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($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:
- gyro/core/behaviour/commands/generics/execute.sql.cmd.php