Skip to content

Commit 0814554

Browse files
committed
Merge branch 'main' of github.com:utopia-php/database into cast-sequence
# Conflicts: # src/Database/Adapter/Postgres.php
2 parents 1f1a972 + 68545df commit 0814554

23 files changed

Lines changed: 2211 additions & 781 deletions

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ services:
1717
- ./dev/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
1818
- /var/run/docker.sock:/var/run/docker.sock
1919
- ./docker-compose.yml:/usr/src/code/docker-compose.yml
20+
environment:
21+
PHP_IDE_CONFIG: serverName=tests
2022

2123
adminer:
2224
image: adminer

src/Database/Adapter.php

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -697,10 +697,11 @@ abstract public function createDocuments(string $collection, array $documents):
697697
* @param string $collection
698698
* @param string $id
699699
* @param Document $document
700+
* @param bool $skipPermissions
700701
*
701702
* @return Document
702703
*/
703-
abstract public function updateDocument(string $collection, string $id, Document $document): Document;
704+
abstract public function updateDocument(string $collection, string $id, Document $document, bool $skipPermissions): Document;
704705

705706
/**
706707
* Update documents
@@ -733,6 +734,13 @@ abstract public function createOrUpdateDocuments(
733734
array $changes
734735
): array;
735736

737+
/**
738+
* @param string $collection
739+
* @param array<Document> $documents
740+
* @return array<Document>
741+
*/
742+
abstract public function getSequences(string $collection, array $documents): array;
743+
736744
/**
737745
* Delete Document
738746
*
@@ -892,6 +900,20 @@ abstract public function getSupportForSchemaAttributes(): bool;
892900
*/
893901
abstract public function getSupportForIndex(): bool;
894902

903+
/**
904+
* Is indexing array supported?
905+
*
906+
* @return bool
907+
*/
908+
abstract public function getSupportForIndexArray(): bool;
909+
910+
/**
911+
* Is cast index as array supported?
912+
*
913+
* @return bool
914+
*/
915+
abstract public function getSupportForCastIndexArray(): bool;
916+
895917
/**
896918
* Is unique index supported?
897919
*
@@ -965,13 +987,6 @@ abstract public function getSupportForAttributeResizing(): bool;
965987
*/
966988
abstract public function getSupportForGetConnectionId(): bool;
967989

968-
/**
969-
* Is cast index as array supported?
970-
*
971-
* @return bool
972-
*/
973-
abstract public function getSupportForCastIndexArray(): bool;
974-
975990
/**
976991
* Is upserting supported?
977992
*

0 commit comments

Comments
 (0)