Skip to content

Commit 7c6a692

Browse files
committed
feat(dbal): Add spawnColumns
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent e580d3b commit 7c6a692

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

lib/private/DB/Schema/Index.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ public function hasColumnAtPosition(string $name, int $position = 0): bool {
6060
return $this->index->hasColumnAtPosition($name, $position);
6161
}
6262

63+
#[\Override]
64+
public function spansColumns(array $columnNames): bool {
65+
return $this->index->spansColumns($columnNames);
66+
}
67+
6368
/**
6469
* Forwards any method not declared on IIndex to the wrapped Doctrine
6570
* DBAL index, e.g. mutators like `addFlag()` or `removeFlag()` that are

lib/public/DB/Schema/IIndex.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,13 @@ public function isSimpleIndex(): bool;
6262
* @since 35.0.0
6363
*/
6464
public function hasColumnAtPosition(string $name, int $position = 0): bool;
65+
66+
/**
67+
* Returns whether the given column names exactly match the columns this index spans,
68+
* regardless of order.
69+
*
70+
* @param list<non-empty-lowercase-string> $columnNames
71+
* @since 35.0.0
72+
*/
73+
public function spansColumns(array $columnNames): bool;
6574
}

0 commit comments

Comments
 (0)