-
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
Is the "IN" operator supported? I don't see an example #185
Comments
Unfortunately i think the answer to both is no. The first case, looking at sqlite bind_value* docs, seems impossible to implement.
I'm not sure about the second approach, @zauguin knows more than me.
|
Thanks for the response. I have changed my code to do a recursive subselect. I had thought this |
@BrannonKing About defining a function like this: It would have to be a table-valued function, which in SQLite has to be implemented using virtual tables. Currently sqlite_modern_cpp does not support defining virtual tables, but we could add limited support to at least support table-valued functions... I will have to think about it. Anyway are you aware that you could use
|
@BrannonKing I made some experiments with virtual tables. In https://gist.github.com/zauguin/7e327d9b5edf5a5002382c933308913c Iyou can find a minimal C++ mapping of the interface and an implementation of your I'm not sure how we can make an easier to use interface, especially Disclaimer: I have written the gist after not writing a single line of C++ for a year, so it almost certainly could be improved a lot... |
@aminroosta Do we want to add support for virtual tables to the library? It's kind of special, has a peculiar API and probably isn't used a lot, but it would expose additional parts of SQLite API and definitely simplifies the C interface. |
The only c++ i wrote in 2019 was to fix the visual studio compile issue we had. Anyways, honestly i am neutral on this. At the same time, the gist above has the bulk of the job done... I think we could copy it to the repo, and mention it in the readme ... OR, if you decide to work on it, we could add it |
I wanted do some queries like
Is this supported? Do I need parentheses around the '?' ?
As a further request, would it be possible to define a custom "table-valued" method such that you could do something like this:
The text was updated successfully, but these errors were encountered: