move order bindings to select after compileOver

This commit is contained in:
sarahkemp 2019-02-15 11:21:33 -08:00 committed by Cooperl Arc Atlantique
parent 32be149f95
commit 2eb655d5fd

View File

@ -104,6 +104,13 @@ class DB2Grammar extends Grammar
}
$components['columns'] = $this->compileOver($orderings, $columns);
// if there are bindings in the order, we need to move them to the select since we are moving the parameter
// markers there with the OVER statement
if(isset($query->getRawBindings()['order'])){
$query->addBinding($query->getRawBindings()['order'], 'select');
$query->setBindings([], 'order');
}
unset($components['orders']);