-
Notifications
You must be signed in to change notification settings - Fork 343
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
sql union operator #1096
sql union operator #1096
Conversation
9a16b10
to
f1aca3c
Compare
Kudos, SonarCloud Quality Gate passed! |
@jeroiraz please rebase on current master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only some minor comments added
@@ -107,7 +107,7 @@ func TestTransaction_Rollback(t *testing.T) { | |||
|
|||
res, err := tx1.SQLQuery(context.TODO(), "SELECT * FROM table1", nil) | |||
require.Error(t, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about ErrorIs
here?
@@ -75,7 +75,7 @@ func TestConn_BeginTx(t *testing.T) { | |||
_, err = db.Exec(fmt.Sprintf("INSERT INTO %s (id, amount, total, title, content, isPresent) VALUES (1, 1000, 6000, 'title 1', x'%s', true)", table, blobContent)) | |||
require.Error(t, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about ErrorIs
here?
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com> test(embedded/sql): unit testing union stmt parsing Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com> chore(embedded/sql): positional-based union operator Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com> chore(embedded/sql): include contextual information in error Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com> chore(embedded/sql): improve error message when specifying older value in an auto_incremental column Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com> chore(embedded/sql): use first subquery selectors in all union subqueries Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com> test(pkg/stdlib): update unit testing based on more descriptive error messages Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com> test(pkg/stdlib): update unit testing based on more descriptive error messages Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com> test(pkg/stdlib): update unit testing based on more descriptive error messages Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
f82a088
to
63b981e
Compare
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
Kudos, SonarCloud Quality Gate passed! |
This PR introduces support for UNION operator.
All subqueries must select the same number of columns, with the same types. While names can differ, the final return will assign the naming as in the first subquery.