Skip to content

Commit

Permalink
Merge pull request #22 from harrygulliford/fix-stored-procedure-expre…
Browse files Browse the repository at this point in the history
…ssions

Fix expressions in stored procedures
  • Loading branch information
harrygulliford authored Jul 6, 2021
2 parents edeb6fc + 4c9dcfb commit bd845c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ public function fromProcedure(string $procedure, array $values = [])
{
$compiledProcedure = $this->grammar->compileProcedure($this, $procedure, $values);

// Remove any expressions from the values array, as they will have
// already been evaluated by the grammar's parameterize() function.
$values = array_filter($values, function ($value) {
return ! $this->grammar->isExpression($value);
});

$this->fromRaw($compiledProcedure, array_values($values));

return $this;
Expand Down

0 comments on commit bd845c2

Please sign in to comment.