Skip to content

Commit

Permalink
MySqlDriver driver knows about subqueries now. (#265)
Browse files Browse the repository at this point in the history
As MySQL/MariaDB clearly does support subqueries.

This enables proper building of queries like...
```
$table('table_a')->where('table_a.column_one IN', $table('table_b')->select('value'))
```

... without executing the inner query first.

See https://dev.mysql.com/doc/refman/8.0/en/subqueries.html
and https://mariadb.com/kb/en/subqueries/
  • Loading branch information
smuuf authored Oct 14, 2020
1 parent c3cc31a commit d00fb8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/Drivers/MySqlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,6 @@ public function isSupported(string $item): bool
// - http://bugs.mysql.com/bug.php?id=31188
// - http://bugs.mysql.com/bug.php?id=35819
// and more.
return $item === self::SUPPORT_SELECT_UNGROUPED_COLUMNS || $item === self::SUPPORT_MULTI_COLUMN_AS_OR_COND;
return $item === self::SUPPORT_SELECT_UNGROUPED_COLUMNS || $item === self::SUPPORT_MULTI_COLUMN_AS_OR_COND || $item === self::SUPPORT_SUBSELECT;
}
}

0 comments on commit d00fb8a

Please sign in to comment.