JamesMoss\Flywheel\Query::execute PHP Method

execute() public method

Runs the query.
public execute ( ) : Result
return Result The documents returned from this query.
    public function execute()
    {
        $qe = new QueryExecuter($this->repo, $this->predicate, $this->limit, $this->orderBy);
        return $qe->run();
    }

Usage Example

Example #1
0
 public function testBadData()
 {
     $path = __DIR__ . '/fixtures/datastore/querytest';
     $config = new Config($path . '/');
     $repo = new Repository('baddata', $config);
     $query = new Query($repo);
     $result = $query->execute();
     $this->assertEquals(1, count($result));
 }