-
Notifications
You must be signed in to change notification settings - Fork 480
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
Query-Logging with prepared statements #1068
Comments
There is no supported way to do this. I can't speak of any plans of including such a feature, though. |
For me you exactly explained the main issue with the current logging, I cant see afterwards if the query succeded or not. And I cant track afterwards what has been written to the database. How big do guess the effort to enable soci to support the logging described previously by me ? |
Generally speaking, you can assume that a query has succeeded when no exception is thrown. |
Is there any plan for a 4.x version release ? |
I think that the next release is mostly blocked by #954, but I can't tell you when we're able to land these changes. |
FWIW I agree that having a way to log the values of the parameters (if I understand correctly what you'd like to do here?) would be useful. And I'll try to merge #954 and make a release a.s.a.p. |
Yeah, that would be really nice. I looked into the sqlite3 documentation and there is a method to get the expanded query as string. The main issue I saw in implementing this in your project is, that you are not logging in the backends. So either the way how you execute the the prepared query’s or the way you log has to change for this. I can also help implement this if you can give man like some plan how you want it implemented. Could we take this logging into the upcoming release ? |
As |
Hello,
for my use case it is important to log the exact query executed, which is by default not possible with prepared statements, as I unterstand. (You can only see the prepared statement before the preparation). Is there any good practice on achiving this with prepared statements or do you plan to include this feature in upcoming releases ?
Thanks
The text was updated successfully, but these errors were encountered: