Skip to content

Commit

Permalink
Merge pull request #19 from marcelovsantos/master
Browse files Browse the repository at this point in the history
Added support to multiples resultset
  • Loading branch information
nunomazer authored Sep 16, 2016
2 parents 6d24946 + 560fa8c commit c760494
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Database/SybaseConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SybaseConnection extends Connection {
*
* @throws \Exception
*/
public function transaction(Closure $callback)
public function transaction(Closure $callback, $attempts = 1)
{
if ($this->getDriverName() == 'sqlsrv')
{
Expand Down Expand Up @@ -372,7 +372,12 @@ public function select($query, $bindings = array(), $useReadPdo = true)
if($offset>0){
return $this->compileOffset($offset, $query, $bindings, $me);
}else{
return $this->getPdo()->query($this->compileNewQuery($query, $bindings))->fetchAll($me->getFetchMode());
$result = [];
$statement = $this->getPdo()->query($this->compileNewQuery($query, $bindings));
do {
$result+= $statement->fetchAll($me->getFetchMode());
} while ($statement->nextRowset());
return $result;
}
});
}
Expand All @@ -398,4 +403,4 @@ public function affectingStatement($query, $bindings = array())
return $this->getPdo()->query($this->compileNewQuery($query, $bindings))->rowCount();
});
}
}
}

0 comments on commit c760494

Please sign in to comment.