iwongu / sqlite3pp

SQLite3++ - C++ wrapper of SQLite3 API
MIT License
609 stars 177 forks source link

Add a method wrapping `sqlite3_clear_bindings` #70

Closed snej closed 1 year ago

snej commented 3 years ago

The statement::reset method calls sqlite3_reset, which makes the sqlite3_stmt ready to run again, but does not clear bindings. That means if you run the statement again but don't re-bind every parameter, some of the old bindings stay in effect.

There should be a method that calls sqlite3_clear_bindings, to ensure that all bindings are restored to null.

iwongu commented 1 year ago

I added the clear_bindings() in statement class. Sorry for the long delay.