Beispiel #1
0
 public function execute()
 {
     if (!$this->sth) {
         $this->prepare();
     }
     $this->parameters = $this->selectBuilder->getParameters();
     $this->executed = true;
     try {
         $execute = $this->sth->execute($this->parameters);
     } catch (\PDOException $e) {
         throw new QueryException($this->query . PHP_EOL . print_r($this->parameters, true), null, $e);
     }
     if (!$execute) {
         throw new QueryException($this->query . PHP_EOL . print_r($this->parameters, true));
     }
     return $execute;
 }
Beispiel #2
0
 public function testLimitOffset()
 {
     $query = $this->selectBuilder->limit(100)->offset(100)->build();
     $this->assertEquals('SELECT * FROM test LIMIT 100 OFFSET 100', $query);
 }