Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support for
UNION ALLand introducesPlan::CompoundSelectso that it can be extended to supportUNION/EXCEPT/INTERSECTas welldo_execsql_test_on_specific_db {:memory:} select-union-all-1 { CREATE TABLE t1(x INTEGER); CREATE TABLE t2(x INTEGER); CREATE TABLE t3(x INTEGER); INSERT INTO t1 VALUES(1),(2),(3); INSERT INTO t2 VALUES(4),(5),(6); INSERT INTO t3 VALUES(7),(8),(9); SELECT x FROM t1 UNION ALL SELECT x FROM t2 UNION ALL SELECT x FROM t3; } {1 2 3 4 5 6 7 8 9} do_execsql_test_on_specific_db {:memory:} select-union-all-with-filters { CREATE TABLE t4(x INTEGER); CREATE TABLE t5(x INTEGER); CREATE TABLE t6(x INTEGER); INSERT INTO t4 VALUES(1),(2),(3),(4); INSERT INTO t5 VALUES(5),(6),(7),(8); INSERT INTO t6 VALUES(9),(10),(11),(12); SELECT x FROM t4 WHERE x > 2 UNION ALL SELECT x FROM t5 WHERE x < 7 UNION ALL SELECT x FROM t6 WHERE x = 10; } {3 4 5 6 10}Supports LIMIT. Currently does not support
WITH(),OFFSETorORDER BYand explicitly returns a parse error if those are present.