summaryrefslogtreecommitdiffstats
path: root/src/Components/SetOperation.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Components/SetOperation.php')
-rw-r--r--src/Components/SetOperation.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/Components/SetOperation.php b/src/Components/SetOperation.php
index dad91e5..1cb59a1 100644
--- a/src/Components/SetOperation.php
+++ b/src/Components/SetOperation.php
@@ -89,24 +89,26 @@ class SetOperation extends Component
}
if ($token->type === Token::TYPE_OPERATOR) {
- if ($token->value === ',') {
+
+ }
+
+ if ($state === 0) {
+ if ($token->token === '=') {
+ $state = 1;
+ } else {
+ $expr->column .= $token->token;
+ }
+ } elseif ($state === 1) {
+ if ($token->token === ',') {
$expr->column = trim($expr->column);
$expr->value = trim($expr->value);
$ret[] = $expr;
$expr = new SetOperation();
$state = 0;
- continue;
- } elseif ($token->value === '=') {
- $state = 1;
- continue;
+ } else {
+ $expr->value .= $token->token;
}
}
-
- if ($state === 0) {
- $expr->column .= $token->token;
- } else { // } else if ($state === 1) {
- $expr->value .= $token->token;
- }
}
// Last iteration was not saved.