where() 공개 메소드

또한 보기: Query::andWhere
public where ( $field, $operator = null, $value = null ) : Query
리턴 Query The same instance of this class.
예제 #1
0
 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);
 }
예제 #2
0
 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());
 }