src/Core/SQL/Command/SQLInsert.php 1 location
|
@@ 33-41 (lines=9) @@
|
30 |
|
return $values; |
31 |
|
} |
32 |
|
|
33 |
|
public function execute() { |
34 |
|
$values = $this->getTableValues(); |
35 |
|
if (empty($values)) { |
36 |
|
throw new SQLException("There are no values to be inserted."); |
37 |
|
} |
38 |
|
$sql = $this->build(new SQLConverter()); |
39 |
|
|
40 |
|
return $this->persistence->exec($sql, $values); |
41 |
|
} |
42 |
|
} |
43 |
|
|
src/Core/SQL/Command/SQLUpdate.php 1 location
|
@@ 38-46 (lines=9) @@
|
35 |
|
return $values; |
36 |
|
} |
37 |
|
|
38 |
|
public function execute() { |
39 |
|
$values = $this->getTableValues(); |
40 |
|
if (empty($values)) { |
41 |
|
throw new SQLException("There are no values to be updated."); |
42 |
|
} |
43 |
|
$sql = $this->build(new SQLConverter()); |
44 |
|
|
45 |
|
return $this->persistence->exec($sql, array_merge($values, $this->getParams())); |
46 |
|
} |
47 |
|
} |
48 |
|
|