source/Spiral/Database/Builders/UpdateQuery.php 1 location
|
@@ 107-122 (lines=16) @@
|
| 104 |
|
} |
| 105 |
|
|
| 106 |
|
$values = []; |
| 107 |
|
foreach ($this->values as $value) { |
| 108 |
|
if ($value instanceof QueryBuilder) { |
| 109 |
|
foreach ($value->getParameters() as $parameter) { |
| 110 |
|
$values[] = $parameter; |
| 111 |
|
} |
| 112 |
|
|
| 113 |
|
continue; |
| 114 |
|
} |
| 115 |
|
|
| 116 |
|
if ($value instanceof FragmentInterface && !$value instanceof ParameterInterface) { |
| 117 |
|
//Apparently sql fragment |
| 118 |
|
continue; |
| 119 |
|
} |
| 120 |
|
|
| 121 |
|
$values[] = $value; |
| 122 |
|
} |
| 123 |
|
|
| 124 |
|
//Join and where parameters are going after values |
| 125 |
|
return $this->flattenParameters($compiler->orderParameters( |
source/Spiral/ORM/Entities/RecordSelector.php 1 location
|
@@ 534-548 (lines=15) @@
|
| 531 |
|
$statement = $this->updateStatement($update); |
| 532 |
|
|
| 533 |
|
$normalized = []; |
| 534 |
|
foreach ($update as $value) { |
| 535 |
|
if ($value instanceof QueryBuilder) { |
| 536 |
|
foreach ($value->getParameters() as $parameter) { |
| 537 |
|
$normalized[] = $parameter; |
| 538 |
|
} |
| 539 |
|
|
| 540 |
|
continue; |
| 541 |
|
} |
| 542 |
|
|
| 543 |
|
if ($value instanceof FragmentInterface && !$value instanceof ParameterInterface) { |
| 544 |
|
continue; |
| 545 |
|
} |
| 546 |
|
|
| 547 |
|
$normalized[] = $value; |
| 548 |
|
} |
| 549 |
|
|
| 550 |
|
return $this->database->execute( |
| 551 |
|
$statement, |