-
Notifications
You must be signed in to change notification settings - Fork 156
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
access to sql statement #85
Comments
It might be helpful, but I do not think it is worth storing it if we only use it for debugging. |
I'm also using a sqlite swift lib for ios development too. It has the ability to access the sql and in my app I produce a log file. On numerous occasions having the sql has helped to track down errors. fyi GRDB |
I think I do not really understand your usage. Do you use dynamically generated SQL queries? Do you use prepared statements? |
I'm using prepared statements. |
So could your problem be solved if the SQL could be extracted from the prepared statements? |
Not sure I understand your comment, first choice would be to have the expanded SQL available with parameters inserted as you say. |
I see three possible positions to expose the SQL code:
|
2 and 3 sound great |
Certainly for debugging and logging it would be very helpful to have access to the last sql statement either thru the database object or thru the exception handler ... like get_code() ... get_sql().
Is this possible?
The text was updated successfully, but these errors were encountered: