Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jul 30, 2018
2 parents eec928c + defa1b3 commit 6c89a31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Eloquent/Relations/HasManyThrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,16 @@ public function chunk($count, callable $callback)
return $this->prepareQueryBuilder()->chunk($count, $callback);
}

/**
* Get a generator for the given query.
*
* @return \Generator
*/
public function cursor()
{
return $this->prepareQueryBuilder()->cursor();
}

/**
* Execute a callback over each item while chunking.
*
Expand Down
2 changes: 1 addition & 1 deletion Query/Grammars/SqlServerGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ protected function compileTableExpression($sql, $query)
{
$constraint = $this->compileRowConstraint($query);

return "select * from ({$sql}) as temp_table where row_num {$constraint}";
return "select * from ({$sql}) as temp_table where row_num {$constraint} order by row_num";
}

/**
Expand Down

0 comments on commit 6c89a31

Please sign in to comment.