Skip to content

Commit e7a5fa1

Browse files
author
codeliner
committed
Add find* methods to InnerDocumentStore
1 parent d5dfdce commit e7a5fa1

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
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.4",
21+
"event-engine/php-document-store": "^0.5",
2222
"event-engine/php-event-store": "^0.2",
2323
"event-engine/php-messaging": "^0.1"
2424
},

src/InnerDocumentStore.php

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use EventEngine\DocumentStore\Filter\Filter;
1616
use EventEngine\DocumentStore\Index;
1717
use EventEngine\DocumentStore\OrderBy\OrderBy;
18+
use EventEngine\DocumentStore\PartialSelect;
1819

1920
trait InnerDocumentStore
2021
{
@@ -170,18 +171,29 @@ public function getDoc(string $collectionName, string $docId): ?array
170171
}
171172

172173
/**
173-
* @param string $collectionName
174-
* @param Filter $filter
175-
* @param int|null $skip
176-
* @param int|null $limit
177-
* @param OrderBy|null $orderBy
178-
* @return \Traversable list of docs
174+
* @inheritDoc
179175
*/
180176
public function filterDocs(string $collectionName, Filter $filter, int $skip = null, int $limit = null, OrderBy $orderBy = null): \Traversable
181177
{
182178
return $this->documentStore->filterDocs($collectionName, $filter, $skip, $limit, $orderBy);
183179
}
184180

181+
/**
182+
* @inheritDoc
183+
*/
184+
public function findDocs(string $collectionName, Filter $filter, int $skip = null, int $limit = null, OrderBy $orderBy = null): \Traversable
185+
{
186+
return $this->documentStore->findDocs($collectionName, $filter, $skip, $limit, $orderBy);
187+
}
188+
189+
/**
190+
* @inheritDoc
191+
*/
192+
public function findPartialDocs(string $collectionName, PartialSelect $partialSelect, Filter $filter, int $skip = null, int $limit = null, OrderBy $orderBy = null): \Traversable
193+
{
194+
return $this->documentStore->findPartialDocs($collectionName, $partialSelect, $filter, $skip, $limit, $orderBy);
195+
}
196+
185197
/**
186198
* @param string $collectionName
187199
* @param Filter $filter

0 commit comments

Comments
 (0)