fix: handle calling select on partitioned queries with an array of columns

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2024-12-12 17:38:21 +01:00 committed by backportbot[bot]
parent c2e9e078e1
commit f333fbb8f5

View file

@ -76,6 +76,9 @@ class PartitionedQueryBuilder extends ShardedQueryBuilder {
// we need to save selects until we know all the table aliases
public function select(...$selects) {
if (count($selects) === 1 && is_array($selects[0])) {
$selects = $selects[0];
}
$this->selects = [];
$this->addSelect(...$selects);
return $this;