Conversation
We as well perform the necessary fix.
with a new struct containing two optionals: + std::optional<sort_type> _l; + std::optional<nulls_pos> _r;
|
I also have no clue, why here 3 commits are showing up. I am used to gitlab which handles git differently. I will clean up later. |
|
@MeanSquaredError Can you have a look here? I found finally some time to make a first attempt. You can see all in the third commit. The test is still messed up. |
|
Thanks for the PR, I will try to take a look at it shortly!
I think that you could try rebasing your branch against the latest main branch, e.g. This should synchronize the first two commits with the main branch and after the push they should disappear from this PR. |
|
OK, I rebased your branch on top of the latest main branch and then tried playing a bit with the I think it is OK to have the support for I wrote a basic build script + a very basic test program, which I will provide below in order to let everyone do the testing themselves. build.sh The actual test program, mytest.cpp The three commented-out lines correspond to three valid You can test each of them by removing the comment from the corresponding line in the source code. Although valid SQL, the first two compile but generate invalid SQL at runtime This is the first ( This is the second ( The third one doesn't compile with I think that the main problem with the current implementation is that the type of the column order expression ( The actual enabling/disabling of the methods can be done either through template specialization or through C++20 requires clauses attached to the corresponding methods. The approach with requires clauses seems easier to me, but I guess you need to try it to see whether it is simpler indeed. Maybe @rbock could chime in and let us know if my proposed design seems OK to him, or maybe he can think of a better approach. |
|
Thanks for the PR and the discussion so far. I am a bit pressed for time, but quickly: Disallowing nulls_first in the MySQL connector: asc/desc and nulls_first/last: And then it is rather straight forward:
Hope this makes sense? Cheers, |
|
@rbock |
Hello,
please let me know what you think of the general approach.