Skip to content

Commit

Permalink
Merge pull request #5 from event-engine/feature/add_find_methods
Browse files Browse the repository at this point in the history
Add find* methods to InnerDocumentStore
  • Loading branch information
codeliner authored Mar 29, 2020
2 parents d5dfdce + e7a5fa1 commit de10753
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"require": {
"php": "^7.2",
"roave/security-advisories": "dev-master",
"event-engine/php-document-store": "^0.4",
"event-engine/php-document-store": "^0.5",
"event-engine/php-event-store": "^0.2",
"event-engine/php-messaging": "^0.1"
},
Expand Down
24 changes: 18 additions & 6 deletions src/InnerDocumentStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use EventEngine\DocumentStore\Filter\Filter;
use EventEngine\DocumentStore\Index;
use EventEngine\DocumentStore\OrderBy\OrderBy;
use EventEngine\DocumentStore\PartialSelect;

trait InnerDocumentStore
{
Expand Down Expand Up @@ -170,18 +171,29 @@ public function getDoc(string $collectionName, string $docId): ?array
}

/**
* @param string $collectionName
* @param Filter $filter
* @param int|null $skip
* @param int|null $limit
* @param OrderBy|null $orderBy
* @return \Traversable list of docs
* @inheritDoc
*/
public function filterDocs(string $collectionName, Filter $filter, int $skip = null, int $limit = null, OrderBy $orderBy = null): \Traversable
{
return $this->documentStore->filterDocs($collectionName, $filter, $skip, $limit, $orderBy);
}

/**
* @inheritDoc
*/
public function findDocs(string $collectionName, Filter $filter, int $skip = null, int $limit = null, OrderBy $orderBy = null): \Traversable
{
return $this->documentStore->findDocs($collectionName, $filter, $skip, $limit, $orderBy);
}

/**
* @inheritDoc
*/
public function findPartialDocs(string $collectionName, PartialSelect $partialSelect, Filter $filter, int $skip = null, int $limit = null, OrderBy $orderBy = null): \Traversable
{
return $this->documentStore->findPartialDocs($collectionName, $partialSelect, $filter, $skip, $limit, $orderBy);
}

/**
* @param string $collectionName
* @param Filter $filter
Expand Down

0 comments on commit de10753

Please sign in to comment.