From 7c6a692669cf18895665c19f2ee47cdbdc1c72cc Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Wed, 12 Aug 2026 13:29:10 +0200 Subject: [PATCH] feat(dbal): Add spawnColumns Signed-off-by: Carl Schwan --- lib/private/DB/Schema/Index.php | 5 +++++ lib/public/DB/Schema/IIndex.php | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/private/DB/Schema/Index.php b/lib/private/DB/Schema/Index.php index 82c9538b668..c75eec21df4 100644 --- a/lib/private/DB/Schema/Index.php +++ b/lib/private/DB/Schema/Index.php @@ -60,6 +60,11 @@ class Index implements IIndex { return $this->index->hasColumnAtPosition($name, $position); } + #[\Override] + public function spansColumns(array $columnNames): bool { + return $this->index->spansColumns($columnNames); + } + /** * Forwards any method not declared on IIndex to the wrapped Doctrine * DBAL index, e.g. mutators like `addFlag()` or `removeFlag()` that are diff --git a/lib/public/DB/Schema/IIndex.php b/lib/public/DB/Schema/IIndex.php index af2ca8309ef..a850116458a 100644 --- a/lib/public/DB/Schema/IIndex.php +++ b/lib/public/DB/Schema/IIndex.php @@ -62,4 +62,13 @@ interface IIndex { * @since 35.0.0 */ public function hasColumnAtPosition(string $name, int $position = 0): bool; + + /** + * Returns whether the given column names exactly match the columns this index spans, + * regardless of order. + * + * @param list $columnNames + * @since 35.0.0 + */ + public function spansColumns(array $columnNames): bool; }