-
Notifications
You must be signed in to change notification settings - Fork 106
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
ResultSetToTable Feature #19
base: main
Are you sure you want to change the base?
ResultSetToTable Feature #19
Conversation
…ntain an 'INSERT INTO EXEC' tSQLt-org#18
@JonathanHallKJR , This looks like a great idea, but when we reviewed it, we didn't see any tests for the new code. If you are interested in pursuing this work, can you please add them? Thanks! |
@lizbaron I wrote up this contribution almost 4 years ago and unfortunately no longer have a development environment to update and test changes anymore. I'm happy for someone else to take it on to get this merged. With respect to your comment regarding tests. There were tests in If you need a specific test to show it resolves the issue there is a replication of the issue associated in #18 that could be adapted to a standalone test by just updating this line: @@ -28,3 +28,3 @@
CREATE TABLE #actual (col1 VARCHAR(15) NULL, col2 int NULL);
- INSERT INTO #actual EXEC tSQLt.ResultSetFilter 1, 'EXEC ReplicateInsertExecIssue._DataUsesInsertExec';
+ EXEC tSQLt.ResultSetToTable #actual, 1, 'EXEC ReplicateInsertExecIssue._DataUsesInsertExec'; |
Hi @lizbaron @JonathanHallKJR |
This issue is also causing a roadblock for me. If someone could review and merge, it would be a huge help! |
This is high on Sebastian's wishlist. We'll take a look this weekend and
estimate what it would take to make it happen.
…--Liz
On Tue, Jun 8, 2021 at 12:57 PM mattsmac ***@***.***> wrote:
This issue is also causing a roadblock for me. If someone could review and
merge, it would be a huge help!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACSOSR4XLW6DV6EH546BLTRZDZHANCNFSM4DBAWNDA>
.
|
Thank you!
|
@@ -0,0 +1,85 @@ | |||
/* | |||
Copyright 2011 tSQLt |
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.
@JonathanHallKJR , this all looks great. We'd like to make some small modifications, but critically, we can't use copyrighted code in an open-source framework. Are you ok with us deleting the copyright?
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.
This file was largely copied from a file in the project, as such, I preserved the license agreement that was in place.
The original file can be found here /Experiments/GenerateTestsForResultsetFilterDataTypes.sql
Hey all,
Sebastian and I took a look and the code and tests look good, but we need
to make some minor modifications to bring them up to date. And there is one
clarification we need from the original author before we can proceed.
We are in the middle of making tSQLt more useable on Visual Studio, but
this is likely going to be one of the next things we will tackle!
…--Liz
On Wed, Jun 9, 2021 at 7:10 AM mattsmac ***@***.***> wrote:
Thank you!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACSOXYKJBZPJPUK26533LTR5DY5ANCNFSM4DBAWNDA>
.
|
@@ -0,0 +1,150 @@ | |||
/* | |||
* Copyright 2017 Jonathan Hall <[email protected]> |
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.
@lizbaron, As I understand it that this is correct way to contribute code to an open source project?
The contribution uses the same license as tSQLt /Build/License.txt
[...] You may add Your own copyright statement to Your
modifications and may provide additional or different license terms and
conditions for use, reproduction, or distribution of Your modifications, or for
any such Derivative Works as a whole, provided Your use, reproduction, and
distribution of the Work otherwise complies with the conditions stated in this
License.
- Submission of Contributions. Unless You explicitly state otherwise, any
Contribution intentionally submitted for inclusion in the Work by You to the
Licensor shall be under the terms and conditions of this License, without any
additional terms or conditions. Notwithstanding the above, nothing herein shall
supersede or modify the terms of any separate license agreement you may have
executed with Licensor regarding such Contributions.
Hey Jonathan,
I appreciate this clarification. I get that this is totally possible in the
open-source world, but I'm not a legal expert on copyright, and I don't
know how this will affect our ability to change this code now or later if
needed. Sebastian and I have so little time to commit to this work, that
small issues like this drastically slow us down.
If this is an issue of attribution, to be clear because you opened the pull
request your name and contributions will forever show up in the tSQLt
project. Is that sufficient?
If not, we will probably need to close this PR and rewrite it separately.
Please let me know.
Thanks,
Liz
…On Mon, Jun 14, 2021 at 5:49 AM Jonathan Hall ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In tSQLtCLR/tSQLtCLR/ResultSetToTable.cs
<#19 (comment)>:
> @@ -0,0 +1,150 @@
+/*
+ * Copyright 2017 Jonathan Hall ***@***.***>
@lizbaron <https://github.com/lizbaron>, As I understand it that this is
correct way to contribute code to an open source project?
The contribution uses the same license as tSQLt /Build/License.txt
<https://github.com/tSQLt-org/tSQLt/blob/main/Build/License.txt#L111-L123>
[...] You may add Your own copyright statement to Your
modifications and may provide additional or different license terms and
conditions for use, reproduction, or distribution of Your modifications,
or for
any such Derivative Works as a whole, provided Your use, reproduction, and
distribution of the Work otherwise complies with the conditions stated in
this
License.
1. Submission of Contributions. Unless You explicitly state otherwise,
any
Contribution intentionally submitted for inclusion in the Work by You
to the
Licensor shall be under the terms and conditions of this License,
without any
additional terms or conditions. Notwithstanding the above, nothing
herein shall
supersede or modify the terms of any separate license agreement you
may have
executed with Licensor regarding such Contributions.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACSOVT3URDTMEILHPPTDDTSXGA3ANCNFSM4DBAWNDA>
.
|
Hi @lizbaron @JonathanHallKJR thanks for keeping this PR going. Along with the synonyms issue( for which the workaround works atm) , this also seems to be a big blocker in adopting the framework as most of our SP are of that kind. Hope to get this published at the earliest |
The ResultSetInsert procedure works like ResultSetFilter but insert results into a table which name is passed as third paramter, `@Table`. This works around the nested insert exec issue (tSQLt-org#18). This is an alternative and original implementation of PR tSQLt-org#19. Signed-off-by: Paul Guyot <[email protected]>
Hi, any chance this PR or #192 will be merged? |
This addresses the issue with testing stored procedures that contain an 'INSERT INTO EXEC' ( #18 )
Essentially my contribution is a drop in replacement for
INSERT INTO #Actual EXEC tSQLt.ResultSetFilter [...]
that uses CLR code to run asEXEC tSQLt.ResultSetToTable #Actual, [...]
I've a copied the ResultSetFilter test suite to ensure compatibility and added extra tests to prove my change works when the command being executed is a stored proc that nests its own 'INSERT INTO EXEC'