-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
Description
I have the feeling the AST for a query like SELECT a.email, b.adaid FROM ada a LEFT JOIN ada b ON a.adaid=b.adaid
is not correct.
$queryString = 'SELECT a.email, b.adaid FROM ada a LEFT JOIN ada b ON a.adaid=b.adaid';
// returns a Generator. will not parse anything if you don't iterate over it
$commands = $parser->parse($queryString);
foreach ($commands as list($command)) {
// Parser does not throw exceptions. this allows to parse partially invalid code and not fail on first error
if ($command instanceof SelectCommand) {
$from = $command->getFrom();
var_dump(get_class($from));
}
}
only output:
SqlFtw\Sql\Dml\TableReference\OuterJoin
I am wondering why the ast does not contain a TableReferenceTable
in addition to the Join
.
Also: I don't think OuterJoin
is correct in this case.