summaryrefslogtreecommitdiffstats
path: root/src/Components
diff options
context:
space:
mode:
authorDan Ungureanu <udan1107@gmail.com>2015-12-17 15:29:11 +0200
committerDan Ungureanu <udan1107@gmail.com>2015-12-17 15:29:11 +0200
commit4f15f1d6db3dd0e4e7c1b6108126f3f1f62d516f (patch)
tree78296802a08db710be0d14019e7e19acbe79f547 /src/Components
parent4e5c7d25684d01a485fbe61e40c0623bd40852e9 (diff)
downloadsql-parser-4f15f1d6db3dd0e4e7c1b6108126f3f1f62d516f.zip
sql-parser-4f15f1d6db3dd0e4e7c1b6108126f3f1f62d516f.tar.gz
sql-parser-4f15f1d6db3dd0e4e7c1b6108126f3f1f62d516f.tar.bz2
Added STRAIGHT_JOIN as a known type of join.
Diffstat (limited to 'src/Components')
-rw-r--r--src/Components/JoinKeyword.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Components/JoinKeyword.php b/src/Components/JoinKeyword.php
index 2a7693e..224e802 100644
--- a/src/Components/JoinKeyword.php
+++ b/src/Components/JoinKeyword.php
@@ -38,6 +38,7 @@ class JoinKeyword extends Component
'LEFT OUTER JOIN' => 'LEFT',
'RIGHT JOIN' => 'RIGHT',
'RIGHT OUTER JOIN' => 'RIGHT',
+ 'STRAIGHT_JOIN' => 'STRAIGHT',
);
/**
@@ -160,7 +161,7 @@ class JoinKeyword extends Component
{
$ret = array();
foreach ($component as $c) {
- $ret[] = (($c->type === 'JOIN') ? 'JOIN ' : ($c->type . ' JOIN '))
+ $ret[] = array_search($c->type, static::$JOINS) . ' '
. $c->expr . ' ON ' . Condition::build($c->on);
}
return implode(' ', $ret);