Jose Mortensen wrote:
> I know it should use exec instead, but:
...but you want to be able to misuse the library, and have it read your
mind as to what you really meant, right?
> 1. C++ code should never produce a segmentation fault.
C++ code that does not contain bugs should never produce a segfault.
Your code contains a bug.
> 2. In some cases like, for example, a user console program where the
> query is user defined, it is difficult to predict if the query should
> return something or not. In cases like that better to return an empty
> result. I think.
So what you're saying is, you want me to write a SQL parser that can
find out enough about the query that it can call exec() or store()
depending on what kind of query it is...so you don't have to write one
yourself. Is that right?
There are two different APIs here because they are very different
operations. That's necessary complexity, if we are to avoid writing a
> My preference is to return an empty result.
Patches thoughtfully considered.