Comments (6)
Part of why i didnt fix it after tracking it down is that i could not explain why that change happend and wanted to take a closer look or have someone that knows why to tell me why ;).
And without #96 its hard to write a test to check for that in the future so i guess that's a plus point for #96 already.
As i wrote the initial Prepared statement implementation im all for the "breaking" change that restores the behavior outlined in the README, i dont see it a breaking change its a bugfix for undefined behavior.
I do have some time now and would fix it that way if its ok with you.
from sqlite_modern_cpp.
I see four ways to fix this:
We can delete the reset()
calls from extract
and extract_single_value
. Then the user has to reset on his own, which is what the README says anyway. This would be a semi-breaking change.
To avoid breaking existing code, we could keep the reset and manually set execution_started = true;
again afterward.
On the other hand I do not really know why reset sets execution_started = false;
in the first place.
I can not think of any reason why somebody would want to explicitly reset a statement and use implicit execution afterward. If we remove this, we have a breaking change too.
We can use execution_started
or a new flag to track the reset status of the query.
Then reset() as a public interface could be deprecated and the library would be a bit easier to use.
I will try to prepare a pull request for the last approach. What do you think?
from sqlite_modern_cpp.
#97 will fix this but Travis broke, anyone got a clue about that?
from sqlite_modern_cpp.
I have restarted the Travis build, but the main problem is, that in the prepared statement test we assume that _extract*
resets the statement.
from sqlite_modern_cpp.
hm thats bad, i will take a look in a moment.
from sqlite_modern_cpp.
Fixed by #98
from sqlite_modern_cpp.
Related Issues (20)
- typo in the std::variant<std::string, ...> supprt HOT 1
- std::optional and std::variant not supported with MSVC 2019 HOT 4
- unnecessary calls to sqlite3_{column,value}_bytes{,16} in getting text HOT 4
- ability to change database name HOT 1
- Ability to interrupt queries
- Does this library support the JSON1 extension? HOT 1
- Usage of `std::optional` fails under MSVC 14.2 / VS 2019 HOT 2
- How to get a binary blob and it's size HOT 1
- about latest release HOT 1
- I dont know how to compile my C++ files with this library HOT 2
- [question] about data update wrapper HOT 2
- with C++20 HOT 1
- Serialized Mode of Sqlite3
- Invalid range expression of type 'database_binder'; no viable 'begin' function available HOT 3
- Are JOIN operations suported? HOT 1
- Set `std::optional` to `std::nullopt` instead of throwing `sqlite::errors::no_rows`
- Project does not work in VS2022 HOT 1
- Unknown number of columns HOT 1
- Database encryption HOT 1
- Possible to use via FetchContent or CPM? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlite_modern_cpp.