GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve variable and flow documentation. Simplify condition · phpmyadmin/sql-parser@d5cf665

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/Components
    • JoinKeyword.php
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/Components/JoinKeyword.php‎

Copy file name to clipboardExpand all lines: src/Components/JoinKeyword.php
+13-3Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ class JoinKeyword extends Component
6262
* @var Condition[]
6363
*/
6464
public $on;
65+
/**
66+
* Columns in Using clause
67+
*
68+
* @var ArrayObj
69+
*/
6570
public $using;
6671

6772
/**
@@ -86,7 +91,8 @@ public static function parse(Parser $parser, TokensList $list, array $options =
8691
*
8792
* 1 -----------------------[ expr ]----------------------> 2
8893
*
89-
* 2 ---------------------[ ON|USING ]--------------------> 3/4
94+
* 2 ------------------------[ ON ]-----------------------> 3
95+
* 2 -----------------------[ USING ]---------------------> 4
9096
*
9197
* 3 --------------------[ conditions ]-------------------> 0
9298
*
@@ -134,8 +140,12 @@ public static function parse(Parser $parser, TokensList $list, array $options =
134140
$expr->expr = Expression::parse($parser, $list, array('field' => 'table'));
135141
$state = 2;
136142
} elseif ($state === 2) {
137-
if (($token->type === Token::TYPE_KEYWORD) && ($token->value === 'ON' || $token->value === 'USING')) {
138-
$state = $token->value === 'ON' ? 3 : 4;
143+
if ($token->type === Token::TYPE_KEYWORD) {
144+
if ($token->value === 'ON') {
145+
$state = 3;
146+
} elseif ($token->value === 'USING') {
147+
$state = 4;
148+
}
139149
}
140150
} elseif ($state === 3) {
141151
$expr->on = Condition::parse($parser, $list);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.