You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Firstly let me say a huge thanks for creating this brilliant package, we've been using it on a build and was looking forward to using the new toRawSql feature that was merged in this week. After updating our code base and trying to use the method we get an error being thrown
The database driver's grammar implementation does not support escaping values.
After digging in and looking at the work that went into the Laravel PR I can see that there has been some updates to the way the grammar classes now set and how they use the current connection.
Dumping out the code just before it breaks in the new method I can see that the Laravel CTE Grammar class doesnt have a connection set.
after a quick look into this packages code I can see if I update the BuildsExpressionQueries Trait in particular this method
protected function getQueryGrammar(Connection $connection)
{
$driver = $connection->getDriverName();
switch ($driver) {
case 'mysql':
return (new MySqlGrammar())->setConnection($connection);
case 'pgsql':
return new PostgresGrammar();
case 'sqlite':
return new SQLiteGrammar();
case 'sqlsrv':
return new SqlServerGrammar();
}
throw new RuntimeException('This database is not supported.'); // @codeCoverageIgnore
}
```
and use the new `setConnection` method this error then goes away and I can use the new method perfectly. I thought I would just let you know about the issue. Hopefully ive managed to explain the problem ok
The text was updated successfully, but these errors were encountered:
Hi Firstly let me say a huge thanks for creating this brilliant package, we've been using it on a build and was looking forward to using the new
toRawSql
feature that was merged in this week. After updating our code base and trying to use the method we get an error being thrownThe database driver's grammar implementation does not support escaping values.
After digging in and looking at the work that went into the Laravel PR I can see that there has been some updates to the way the grammar classes now set and how they use the current connection.
Dumping out the code just before it breaks in the new method I can see that the Laravel CTE Grammar class doesnt have a connection set.
after a quick look into this packages code I can see if I update the
BuildsExpressionQueries
Trait in particular this methodThe text was updated successfully, but these errors were encountered: