* scripting working with race conditions
* new service works with no race conditions
* use new scripting service and commented out tests
* refactored peek definition to use mssql-scripter
* fixed peek definition tests
* removed auto gen comment
* fixed peek definition highlighting bug
* made scripting async and fixed event handlers
* fixed tests (without cancel and plan notifs)
* removed dead code
* added nuget package
* CR comments + select script service implementation
* minor fixes and added test
* CR comments and script select
* added unit tests
* code review comments and cleanup
* Bump SMO to 140.2.5 to pick-up private XEvent binaries
* Pick up SMO binaries from the build lab
* Add ProfilerService class placeholder
* Update SMO nuget package to include DB Scoped XEvents
* Stage changes
* Stage changes
* Update SMO to use RTM dependencies and remove separate SqlScript package
* Stage changes
* Iterate on profiler service
* Fix post-merge break in localization
* More refactoring
* Continue iterating on profiler
* Add test profiler listener
* Address a couple of the code review feedback
* Fix AppVeyor build break
* Use self-cleaning test file
* added a binding queue for oe to force one operation on a node at a time
* setting node subtype to temporal for temporal tables
* disposing oe service on shutdown
* Initial .net core 2.0 conversion
* Convert a few more projects to .net core 2.0
* Convert a few more projects to .net core 2.0
* Fix build.cmd errors
* Add mising nuget package
* Remove dead code
* Add checked in references to workaround nuget package issues
* Update SLN file to refer to correct csproj files
* Rename applications to workaround .net core tooling bug
* Update nuget package with SQL Parser changes
* Add PreserveCompliationContext to avoid MEF bug
* Update smo version to pickup .net core 2 changes
* Pickup latest SMO changes to fix merge break
* Actually pickup correct SMO binaries
* Add support for SLES 12.2
* Fix break running archiving on Linux
* Revert "Add support for SLES 12.2"
This reverts commit 95cdb6d0e35a425be5c0081345d214079cbdc3db.
* Update to latest SMO build
* Install .Net Core 2 during install phase
* Move .Net Core install
* Try to reference dotnet.exe directly
* Fix code coverage script for CSPROJ instead of project.json
* Turn off test that is unreliable in AppVeyor builds.
* Fix appveyor.yml line feed.
* Turn off another flaky test failing in AppVeyor
* Port over initial block of create db implementation
* Test case placeholder
* In-progress work
* Stage changes to other machine
* Add database prototype strings
* Stage changes to other machine
* Stage changes
* Hook the database info into capabilities discovery
* Stage changes
* Update SMO to latest from ssms_main
* Various clean-ups
* Update localization files
Update the ScriptingService to expose new scripting JSON-RPC APIs that use the SqlScriptPublishModel for script generation.
The SqlScriptPublishModel is the model behind the SSMS scripting wizard. To enable scripting for CLI tools, we've ported SqlScriptPublishModel to .NET Core. The SqlScriptPublishModel wraps the SMO scripting APIs for .sql script generation.
1) Added three new requests to the ScriptingService: ScriptingRequest, ScriptingListObjectsRequest, ScriptingCancelRequest.
2) Generating scripts are long running operations, so the ScriptingRequest and ScriptingListObjectsRequest kick off a long running scripting task and return immediately.
3) Long running scripting task reports progress and completion, and can be cancelled by a ScriptingCancelRequest request.
4) Bumped the SMO nuget package to 140.17049.0. This new version contains a signed SSMS_Rel build of SMO with the SqlScriptPublishModel.
5) For testing, adding the Northwind database schema
TODO (in later pull requests)
1) Integrate the new ScriptingService APIs with the ConnectionService
2) Integrate with the metadata support recently added
* Bump SMO bits to align with 17.0 RC3 release
* Add updated SMO binary
* Fix formatter failures caused by SqlProc breaking changes
- Changes to SqlProcedureDefinition subclasses mean that the definition starts at "Create Procedure" instead of after it. This highlighted an issue where the prefix region handling was via comma separated list (which adds newlines to the prefix region) instead of newline separated list (which does not).
- Changed the structure to use the 2 different formatters for relevant regions, and verified all tests now pass.
- Also removed unnnecessary Export clause from the SqlTableDefinitionFormatter, since this was spotted during debugging
* Fix sample project.json dependencies
- Fix up the dependencies in our samples as this was failing the build on TravisCI. Should consider in the future whether or not we want to exclude these from CI runs, but for now the benefit is that we're forced to keep the samples up to date.
* Fix dispose pattern usage in SaveAsWriterBase
* Add SaveAsExcel feature
This adds the save as excel function to the backend. To reduce large dependency and run on dotnet core now, this implementation use a raw excel writer (the SaveAsExcelFileStreamWriterHelper.cs) instrad of popular excel library, such as EPPlus or OpenXmlSdk.
* Fix can not open the generated excel file in google sheet
For the file name inside excel, google uses a case sensitive path while
Excel doesn't. This change fix the case, so that the file name matches
the one in x1/_rels/workbook.xml.rels
* Fix datetime doesn't recognized by google sheet
Google doesn't support cell type t="d" with ISO 8601 date. (From stackoverflow thread and testing), thus use the old way of excel datetime, which uses double to present datetime
* update to use xmlwriter
* Add basic unit tests for SaveAsExcelFileStreamWriterHelper
* refactor: simplify the public interface of the SaveAsExcelFileStreamWriterHelper
* update private fields names based on the name convention
* Add comments to classes of SaveAsExcel feature
* clean up SaveAsExcelFileStreamWriterHelper
- change SaveAsExcelFileStreamWriterHelper from public to internal
- remove the PenddingRowEndTag function from referenceManager
- change the SaveAsExcelFileStreamWriterHelper(stream) to default leaveOpen to false to match the normal behavior
- change the rowreference to use XmlConvert to convert int to string
- rename writeSetting to writerSetting and add private
* fix CI test error for SaveAsExcel
* remove ExporterException in SaveAsExcel
* fix lefe over CSV to Excel in the comments
* refactor to be consistent with JsonWriter and remove the comment
* remove commented out test
The test is too slow to run
* fix typo in comment
* refactor SaveAsExcel to the coding standard
* refactor rewrite the WriteStyle with XmlWriter
* Add licence header
* reverse mistakenly checked-in changes
* fix: left-over CSV in commets
* remove duplicate check
The check was done in the IncreaseColumnReference, but that check is too late in case of too many columns. All the addCell do the check at the begining now
* fix TimeSpan more than 24 hours
* fix AddRowMustBeCalledBeforeAddCellException test
This is due to remove duplicate call to AssureColumnReference in WriteAndIncreaseColumnReference
* fix: TimeSpan will write twice
* style: change retun in the switch to break
* Add bool format
* remove todo in comment
This provides extra safeguard in the cost of one memory access when null.
- Ensure minimum of 2 newlines after GO statement
- All existing unit tests are passing, indicating this is respecting scenarios where users have comment lines after GO statements (this happens in many other tests)
The goal of this make sure that test code is correctly organized to ensure that test suites aren't dependent on each other.
* UnitTests get their own project now (renaming Microsoft.SqlTools.ServiceLayer.Test to Microsoft.SqlTools.ServiceLayer.UnitTests) which is about 90% of the changes to the files.
* IntegrationTests no longer depends on UnitTests, only Test.Common
* Any shared components from TestObjects that spins up a "live" connection has been moved to IntegrationTests Utility/LiveConnectionHelper.cs
* The dictionary-based mock file stream factory has been moved to Test.Common since it is used by UnitTests and IntegrationTests
* Added a overload that doesn't take a dictionary for when we don't care about monitoring the storage (about 90% of the time)
* The RunIf* wrapper methods have been moved to Test.Common
* OwnerUri and StandardQuery constants have been moved to Test.Common Constants file
* Updating to latest SDK version available at https://www.microsoft.com/net/core#windowscmd
* Moving unit tests to unit test folder
* Changing namespaces to UnitTests
* Moving some constants and shared functionality into common project, making the UnitTests reference it
* Unit tests are working!
* Integration tests are working
* Updating automated test runs
* Fixing one last broken unit test
* Exposing internals for other projects
* Moving edit data tests to UnitTest project
* Applying refactor fixes to unit tests
* Fixing flaky test that wasn't awaiting completion
* Initial credential service files
* Clean-up hostloader
* Update build scripts to build credentials archive
* Move hosting files to new assembly
* Add credentials files to MS.SqlTools.Credentials
* Remove duplicate files
* Update namespace in program.cs
* Fix test build breaks
* Update extensions visibility.
* Remove unused resource strings
* Add xproj files to SLN for appveyor builds
* Fix appveyor build break in test project
* Fix extensibility tests
* Fix various typos in latest iteration
* Add settings for Integration build
* Fix codecoverage.bat to use full pdb for new projects
* Fix bug when packing in folder with native images
* Fix typos in xproj
* Reset XLF to fix build.cmd
- Fixed handling of PlaceCommasBeforeNextStatement so that it doesn't add whitespace unnecessarily. This ensures that repeated formats of the same text shouldn't keep adding whitespace
- Added tests covering a number of scenarios related to this
- Avoid incrementing indents for compound binary boolean expressions. Multiple 'AND x = Y' statements were each indenting instead of having the same indent level.
- Fixes https://github.com/Microsoft/vscode-mssql/issues/709
Adding a new setting to query execution setting that will change the display value we generate for `BIT` columns. The new setting is `DefaultDisplayBitAsNumber`. If true, bit columns will be displayed as 1 or 0. If false, they'll be displayed as true or false. The default value is true, to keep parity with SSMS behavior.
Enables us to solve https://github.com/Microsoft/vscode-mssql/issues/690 and https://github.com/Microsoft/vscode-mssql/issues/513