Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
UniqueFeatureIndex | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
getLimit | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
queryOptions | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
removeFromIndex | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace Flow\Data\Index; |
4 | |
5 | /** |
6 | * Offers direct lookup of an object via a unique feature(set of properties) |
7 | * on the object. |
8 | */ |
9 | class UniqueFeatureIndex extends FeatureIndex { |
10 | |
11 | public function getLimit() { |
12 | return 1; |
13 | } |
14 | |
15 | public function queryOptions() { |
16 | return [ 'LIMIT' => $this->getLimit() ]; |
17 | } |
18 | |
19 | protected function removeFromIndex( array $indexed, array $row ) { |
20 | $this->cache->delete( $this->cacheKey( $indexed ) ); |
21 | } |
22 | } |