Skip to content

Commit 88998ed

Browse files
added index validator params
1 parent 0b30244 commit 88998ed

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/Database/Database.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,10 @@ public function createCollection(string $id, array $attributes = [], array $inde
13061306
$attributes,
13071307
$this->adapter->getMaxIndexLength(),
13081308
$this->adapter->getInternalIndexesKeys(),
1309-
$this->adapter->getSupportForIndexArray()
1309+
$this->adapter->getSupportForIndexArray(),
1310+
$this->adapter->getSupportForSpatialAttributes(),
1311+
$this->adapter->getSupportForSpatialIndexNull(),
1312+
$this->adapter->getSupportForSpatialIndexOrder(),
13101313
);
13111314
foreach ($indexes as $index) {
13121315
if (!$validator->isValid($index)) {
@@ -2251,7 +2254,10 @@ public function updateAttribute(string $collection, string $id, ?string $type =
22512254
$attributes,
22522255
$this->adapter->getMaxIndexLength(),
22532256
$this->adapter->getInternalIndexesKeys(),
2254-
$this->adapter->getSupportForIndexArray()
2257+
$this->adapter->getSupportForIndexArray(),
2258+
$this->adapter->getSupportForSpatialAttributes(),
2259+
$this->adapter->getSupportForSpatialIndexNull(),
2260+
$this->adapter->getSupportForSpatialIndexOrder(),
22552261
);
22562262

22572263
foreach ($indexes as $index) {
@@ -3191,7 +3197,10 @@ public function createIndex(string $collection, string $id, string $type, array
31913197
$collection->getAttribute('attributes', []),
31923198
$this->adapter->getMaxIndexLength(),
31933199
$this->adapter->getInternalIndexesKeys(),
3194-
$this->adapter->getSupportForIndexArray()
3200+
$this->adapter->getSupportForIndexArray(),
3201+
$this->adapter->getSupportForSpatialAttributes(),
3202+
$this->adapter->getSupportForSpatialIndexNull(),
3203+
$this->adapter->getSupportForSpatialIndexOrder(),
31953204
);
31963205
if (!$validator->isValid($index)) {
31973206
throw new IndexException($validator->getDescription());

0 commit comments

Comments
 (0)