from() public method

Adds a from clause to the query.
public from ( array $target, boolean $append = true )
$target array
$append boolean
Example #1
0
 public function from(array $target = array(), $append = TRUE)
 {
     return parent::from($target, $append);
 }
 public function testExecutingAIndexLookup()
 {
     $query = new Query();
     $query->lookup('index_name_2');
     $this->assertHttpStatus(200, $this->doQuery($query));
     $query->where('fakekey = ?', 2);
     $jsonResult = json_decode($this->doQuery($query)->getInnerResponse()->getBody(), true);
     $this->assertHttpStatus(200, $this->doQuery($query));
     $this->assertCount(0, $jsonResult['result']);
     $query = new Query();
     $query->from(array('index:index_name_2'))->between('key', '10.0', '10.1');
     $this->assertHttpStatus(200, $this->doQuery($query));
 }