Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
Extend API to add support for a limitied set of queries based on a ha…
Browse files Browse the repository at this point in the history
…sh and a range condition, a common way that all advanced Key-Value stores allow querying in an effient way.
  • Loading branch information
beberlei committed Feb 13, 2012
1 parent 000f352 commit 81c5fa4
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion lib/Doctrine/KeyValueStore/EntityManager.php
Expand Up @@ -43,11 +43,27 @@ public function __construct(Storage $storageDriver, Cache $cache, MappingDriver
$this->storgeDriver = $storageDriver;
}

public function find($className, $key)
public function find($className, $key, array $fields = null)
{
return $this->unitOfWork->reconsititute($className, $key);
}

/**
* For key-value entities that have both a partition key and a range key of
* the combination (partition-key, range-key) you can use this operation
* to do queries for a partition of data.
*
* Some vendors don't support queries at all.
*
* @param string $className
* @param string $partitionKey
* @return Iterator
*/
public function findRange($className, $partitionKey, array $conditions = array(), array $fields = array(), $limit = null, $offset null)
{

}

public function persist($object)
{
$this->unitOfWork->scheduleForInsert($object);
Expand Down

0 comments on commit 81c5fa4

Please sign in to comment.