public where ( $field, $operator = null, $value = null ) : |
||
Résultat | The same instance of this class. |
public function testPredicate() { $path = __DIR__ . '/fixtures/datastore/querytest'; $config = new Config($path . '/'); $repo = new Repository('countries', $config); $query = new Query($repo); $query->where('cca2', '==', 'GB'); $predicate = new Predicate(); $predicate->where('cca2', '==', 'GB'); $this->assertAttributeEquals($predicate, 'predicate', $query); }
public function testWhereMultiDimensionalIndex() { $path = __DIR__ . '/fixtures/datastore/querytest'; $config = new Config($path . '/'); $repo = new Repository('multidimensionalindex', $config); $query = new Query($repo); $query->where('Tags.0.Key', '==', 'aws:autoscaling:groupName'); $result = $query->execute(); $this->assertInstanceOf('\\JamesMoss\\Flywheel\\Result', $result); $this->assertEquals(1, count($result)); $this->assertEquals(1, $result->total()); }