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
56 changes: 28 additions & 28 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions src/Database/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,26 @@ abstract public function updateDocument(string $collection, string $id, Document
*/
abstract public function updateDocuments(string $collection, Document $updates, array $documents): int;

/**
* Create documents if they do not exist, otherwise update them.
*
* If both attribute and value are not empty, only the specified attribute will be increased, by the provided value.
*
* @param string $collection
* @param string $attribute
* @param int|float $value
* @param array<Document> $documents
* @param int $batchSize
* @return array<Document>
*/
abstract public function createOrUpdateDocuments(
string $collection,
string $attribute,
int|float $value,
array $documents,
int $batchSize
): array;

/**
* Delete Document
*
Expand Down Expand Up @@ -875,6 +895,13 @@ abstract public function getSupportForGetConnectionId(): bool;
*/
abstract public function getSupportForCastIndexArray(): bool;

/**
* Is upserting supported?
*
* @return bool
*/
abstract public function getSupportForUpserts(): bool;

/**
* Get current attribute count from collection document
*
Expand Down
Loading
Loading