Mellivora/Database/Query/Grammars/MySqlGrammar.php
protected function compileJsonUpdateColumn($key, JsonExpression $value)
    {
        $path = explode('->', $key);

        $field = $this->wrapValue(array_shift($path));

        $accessor = '"$.' . implode('.', $path) . '"';

        return "{$field} = json_set({$field}, {$accessor}, {$value->getValue()})";
    }
protected function compileJsonUpdateColumn($key, JsonExpression $value)
    {
        $path = explode('->', $key);

        $field = $this->wrapValue(array_shift($path));

        $accessor = '"$.' . implode('.', $path) . '"';

        return "{$field} = json_set({$field}, {$accessor}, {$value->getValue()})";
    }
protected function compileJsonUpdateColumn ( $ key , JsonExpression $ value ) { $ path = explode ( '->' , $ key ) ; $ field = $ this -> wrapValue ( array_shift ( $ path ) ) ; $ accessor = '"$.' . implode ( '.' , $ path ) . '"' ; return "{$field} = json_set({$field}, {$accessor}, {$value->getValue()})" ; }
Prepares a JSON column being updated using the JSON_SET function.

@param string                                   $key
@param \Mellivora\Database\Query\JsonExpression $value

@return string
Prepares a JSON column being updated using the JSON_SET function .