-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.x] Implemented fallback for PDO::quote method on QueryWatcher #1066
Conversation
src/Watchers/QueryWatcher.php
Outdated
* Add quotes to string bindings. | ||
* | ||
* @param \Illuminate\Database\Events\QueryExecuted $event | ||
* @param string $binding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @param string $binding | |
* @param string $binding |
{ | ||
try { | ||
return $event->connection->getPdo()->quote($binding); | ||
} catch (\PDOException $e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import this object type.
@driesvints : Sorry driesvints, I did a last change. |
😅 I hope that last commit is accepted. I replaced In other way the release is buggy. |
@juanparati can you please do the changes I asked for above? Thanks |
Done. |
This pull request will solve #1065.
Note: The fallback method may not constraint with all the target databases that ODBC is connected, It means that there is no way to know which charset, and quote symbol is the default used by the database, however the fallback method should represent an accurate query string for the most popular databases like mSQL, BigQuery or Snowflake.