Skip to content

Commit 1ebbb60

Browse files
author
codeliner
committed
Add handling of named indices
1 parent db1e80d commit 1ebbb60

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require": {
1919
"php": "^7.2",
2020
"roave/security-advisories": "dev-master",
21-
"event-engine/php-document-store": "^0.1",
21+
"event-engine/php-document-store": "^0.2",
2222
"event-engine/php-event-store": "^0.1"
2323
},
2424
"require-dev": {

src/InnerDocumentStore.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,31 @@ public function dropCollection(string $collectionName): void
6868
$this->documentStore->dropCollection($collectionName);
6969
}
7070

71+
public function hasCollectionIndex(string $collectionName, string $indexName): bool
72+
{
73+
return $this->documentStore->hasCollectionIndex($collectionName, $indexName);
74+
}
75+
76+
/**
77+
* @param string $collectionName
78+
* @param Index $index
79+
* @throws \Throwable if adding did not succeed
80+
*/
81+
public function addCollectionIndex(string $collectionName, Index $index): void
82+
{
83+
$this->documentStore->addCollectionIndex($collectionName, $index);
84+
}
85+
86+
/**
87+
* @param string $collectionName
88+
* @param string $indexName
89+
* @throws \Throwable if dropping did not succeed
90+
*/
91+
public function dropCollectionIndex(string $collectionName, string $indexName): void
92+
{
93+
$this->documentStore->dropCollectionIndex($collectionName, $indexName);
94+
}
95+
7196
/**
7297
* @param string $collectionName
7398
* @param string $docId

0 commit comments

Comments
 (0)