Add option to cast XML results as nvarchar(max) in order to work with sqlcmd on Linux#55
Add option to cast XML results as nvarchar(max) in order to work with sqlcmd on Linux#55nsturmwind wants to merge 2 commits intotSQLt-org:mainfrom
Conversation
| ); | ||
|
|
||
| EXEC tSQLt.Private_PrintXML @XmlOutput; | ||
| If @CastToNvarchar = 1 |
There was a problem hiding this comment.
Rather than adding IF statement there, it would probably better be moved to the Private_PrintXML procedure as now outputting logic is split in 2 different places that kind of bad practice.
Additionally this framework is written using TDD approach so you should write tests to cover this functionality otherwise I'm not sure it will be merged.
And final minor comment is that keywords in this source code are all in UPPERCASE (If, nvarchar, max)
There was a problem hiding this comment.
Will do. Is there a CI framework that runs the tests?
There was a problem hiding this comment.
Currently you can only do that locally. If you go to the Build folder, you'll find Install the tSQLt build.docx document with instructions. And if you have troubles with the certificate, you can take a look to the ChangeSigningKey_ReadMe.txt document.
The tests should probably need to be put to the Tests/Run_Methods_Tests.class.sql file
There was a problem hiding this comment.
BTW, you won't be able to do that on Linux ... However as I see from commits, that @mbt1 is currently working on setting automated tests on GitHub so there might be such possibility in the near future.
Addresses #54