Open larskoole opened 5 hours ago
Small addition: the reason of our exception is the fact that $this->isJsonSelector()
can't parse an instance of Expression
. That's why MysqlGrammar extracts the column value and uses a separate variable to check for the json selector.
We encountered a bug where if you would pass a
DB::raw()
to awhereNull()
/whereNotNull()
it would throw an exception. This is because the SingleStore driver doesn't parse the$where['column']
like in the MysqlGrammar that it extends.So in short, the SingleStore driver is missing a check to see if a
$where['column']
that is passed is an instance of\Illuminate\Contracts\Database\Query\Expression
.Should be a pretty straightforward (and non-breaking) fix by adding
$columnValue = (string) $this->getValue($where['column']);
to the SingleStore methods.MysqlGrammar (where
getValue()
is implemented)Grammar (for the
getValue()
method)Current SingleStore implementation (missing the
getValue()