Skip to content

Commit 1f48ccc

Browse files
authored
Merge pull request #566 from ArnabChatterjee20k/fix/pg-adapter
Fix/pg adapter
2 parents 60591ab + 3bff443 commit 1f48ccc

7 files changed

Lines changed: 201 additions & 93 deletions

File tree

src/Database/Adapter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,10 +642,11 @@ abstract public function renameIndex(string $collection, string $old, string $ne
642642
* @param array<string> $attributes
643643
* @param array<int> $lengths
644644
* @param array<string> $orders
645+
* @param array<string,string> $indexAttributeTypes
645646
*
646647
* @return bool
647648
*/
648-
abstract public function createIndex(string $collection, string $id, string $type, array $attributes, array $lengths, array $orders): bool;
649+
abstract public function createIndex(string $collection, string $id, string $type, array $attributes, array $lengths, array $orders, array $indexAttributeTypes = []): bool;
649650

650651
/**
651652
* Delete Index

src/Database/Adapter/MariaDB.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,10 +712,11 @@ public function renameIndex(string $collection, string $old, string $new): bool
712712
* @param array<string> $attributes
713713
* @param array<int> $lengths
714714
* @param array<string> $orders
715+
* @param array<string,string> $indexAttributeTypes
715716
* @return bool
716717
* @throws DatabaseException
717718
*/
718-
public function createIndex(string $collection, string $id, string $type, array $attributes, array $lengths, array $orders): bool
719+
public function createIndex(string $collection, string $id, string $type, array $attributes, array $lengths, array $orders, array $indexAttributeTypes = []): bool
719720
{
720721
$collection = $this->getDocument(Database::METADATA, $collection);
721722

@@ -2270,4 +2271,8 @@ protected function quote(string $string): string
22702271
return "`{$string}`";
22712272
}
22722273

2274+
public function getSupportForNumericCasting(): bool
2275+
{
2276+
return true;
2277+
}
22732278
}

src/Database/Adapter/Pool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public function renameIndex(string $collection, string $old, string $new): bool
210210
return $this->delegate(__FUNCTION__, \func_get_args());
211211
}
212212

213-
public function createIndex(string $collection, string $id, string $type, array $attributes, array $lengths, array $orders): bool
213+
public function createIndex(string $collection, string $id, string $type, array $attributes, array $lengths, array $orders, array $indexAttributeTypes = []): bool
214214
{
215215
return $this->delegate(__FUNCTION__, \func_get_args());
216216
}

0 commit comments

Comments
 (0)