Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Database/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -642,10 +642,11 @@ abstract public function renameIndex(string $collection, string $old, string $ne
* @param array<string> $attributes
* @param array<int> $lengths
* @param array<string> $orders
* @param array<string,string> $indexAttributeTypes
*
* @return bool
*/
abstract public function createIndex(string $collection, string $id, string $type, array $attributes, array $lengths, array $orders): bool;
abstract public function createIndex(string $collection, string $id, string $type, array $attributes, array $lengths, array $orders, array $indexAttributeTypes = []): bool;

/**
* Delete Index
Expand Down
7 changes: 6 additions & 1 deletion src/Database/Adapter/MariaDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -712,10 +712,11 @@ public function renameIndex(string $collection, string $old, string $new): bool
* @param array<string> $attributes
* @param array<int> $lengths
* @param array<string> $orders
* @param array<string,string> $indexAttributeTypes
* @return bool
* @throws DatabaseException
*/
public function createIndex(string $collection, string $id, string $type, array $attributes, array $lengths, array $orders): bool
public function createIndex(string $collection, string $id, string $type, array $attributes, array $lengths, array $orders, array $indexAttributeTypes = []): bool
{
$collection = $this->getDocument(Database::METADATA, $collection);

Expand Down Expand Up @@ -2270,4 +2271,8 @@ protected function quote(string $string): string
return "`{$string}`";
}

public function getSupportForNumericCasting(): bool
{
return true;
}
}
2 changes: 1 addition & 1 deletion src/Database/Adapter/Pool.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function renameIndex(string $collection, string $old, string $new): bool
return $this->delegate(__FUNCTION__, \func_get_args());
}

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