@@ 682-685 (lines=4) @@ | ||
679 | ); |
|
680 | ++$list->idx; |
|
681 | ||
682 | for (; $list->idx < $list->count; ++$list->idx) { |
|
683 | $token = $list->tokens[$list->idx]; |
|
684 | $this->body[] = $token; |
|
685 | } |
|
686 | } elseif ($this->options->has('VIEW')) { |
|
687 | $token = $list->getNext(); // Skipping whitespaces and comments. |
|
688 | ||
@@ 698-704 (lines=7) @@ | ||
695 | } |
|
696 | ||
697 | // Parsing the `AS` keyword. |
|
698 | for (; $list->idx < $list->count; ++$list->idx) { |
|
699 | $token = $list->tokens[$list->idx]; |
|
700 | if ($token->type === Token::TYPE_DELIMITER) { |
|
701 | break; |
|
702 | } |
|
703 | $this->body[] = $token; |
|
704 | } |
|
705 | } elseif ($this->options->has('TRIGGER')) { |
|
706 | // Parsing the time and the event. |
|
707 | $this->entityOptions = OptionsArray::parse( |
|
@@ 731-734 (lines=4) @@ | ||
728 | $list->getNextOfTypeAndValue(Token::TYPE_KEYWORD, 'FOR EACH ROW'); |
|
729 | ++$list->idx; // Skipping `FOR EACH ROW`. |
|
730 | ||
731 | for (; $list->idx < $list->count; ++$list->idx) { |
|
732 | $token = $list->tokens[$list->idx]; |
|
733 | $this->body[] = $token; |
|
734 | } |
|
735 | } else { |
|
736 | for (; $list->idx < $list->count; ++$list->idx) { |
|
737 | $token = $list->tokens[$list->idx]; |
|
@@ 736-742 (lines=7) @@ | ||
733 | $this->body[] = $token; |
|
734 | } |
|
735 | } else { |
|
736 | for (; $list->idx < $list->count; ++$list->idx) { |
|
737 | $token = $list->tokens[$list->idx]; |
|
738 | if ($token->type === Token::TYPE_DELIMITER) { |
|
739 | break; |
|
740 | } |
|
741 | $this->body[] = $token; |
|
742 | } |
|
743 | } |
|
744 | } |
|
745 | } |
@@ 809-811 (lines=3) @@ | ||
806 | // At least one query was found so we have to build the rest of the |
|
807 | // remaining query. |
|
808 | $query = ''; |
|
809 | for (++$list->idx; $list->idx < $list->count; ++$list->idx) { |
|
810 | $query .= $list->tokens[$list->idx]->token; |
|
811 | } |
|
812 | ||
813 | return array( |
|
814 | trim($statement), |