* Initial code for Including/Excluding individual changes (no tests added yet)
* Adding Exclude include tests. Default options call and additional options tests.
* Taking PR comments
* Retry in test for reliability
* Agent Proxy account WIP
* Fixup Credential create\update\delete handlers
* Use current user for test credential
* Cleanup and delete code
* Convert tabs to spaces
* Additional SQL Agent config classes (WIP)
* Fix build breaks
* Clean up job step code
* Add VS Code build files
* Move changes to other machine
* More of the action execution classes
* More execution processing refactors
* More refactoring
* Disable tests for WIP merge
* Fix break on Release config
* Stage changes to other machine.
* Initial non-refactored SQL Agent alert classes (WIP)
* Move agent classes into subdirectories
* Refactor the agent config code a bit more
* Add more implementation for handlers
* Add more code to the create alert handler
* Clean up agent alert class
* Clean up alert methods a bit
* Initial Operator contracts
* Additonal SQL Agent config changes
* More Proxy config cleanup
* Cleanup AgentProxy class
* Additional cleanups
* Run SRGen
* Add security service to create credential objects
* Differentiate External and FileTable types in object explorer list
- Add (External) and (File Table) to the labels
- Pre-fetch these properties to avoid perf hit
Note on testing: These are both quite hard to initialize, so adding tests to the integration tests would require always having a server with Polybase enabled / FileTable enabled. Given this I feel it should be OK to use manual testing. Long term, we should have unit-level tests that cover the functionality or figure out how to have a perfect pre-configured server and a set of tests to run the breadth of this logic against it.
* Fix handling of vNext servers to default to latest known version
- Default uplevel / unknown versions to the latest version
- In the IsValidFor check also just see if the server version registers as "All" since this is the default for unknown servers. This is a backup handler, the 1st fix is the primary one
* Refactoring sql script formatting helpers into To and From helpers
* Updates to make error messages for formatting errors more useful
* Fixing dumb breaks in unit tests
* Addressing comments from PR
* Updates to the SR files...
* WIP
* All the new RowCreate tests are working
* Fixing a couple bugs with the row delete and row update tests
* Regenerating localization files
* Fixing multiple iteration in tests
* Support `GO N` syntax to execute multiple times
- Plumbed through the batch execution count from the parser and used in the batch execution code path
- Functionality matches SSMS:
- Outputs loop start/end messages that match SSMS if you're doing multi-batch execution
- Outputs an "ignoring failure" error if an error happens during a batch
- Added tests for this
- Manually verified end to end also
* Fixing test error
* Revert "Add rowcount check so that no results error is sent for a query where no rows are returned (#525)"
This reverts commit 3392f93a2e.
* Revert "Add unknown status for DB Nodes whose status is not known (#524)"
This reverts commit 3d7b87eca2.
* Revert "Should await result of requestcontext.sendresult in case it errors (#520)"
This reverts commit caf196ea31.
* Fix to make sql exceptions surface properly to user (with important notes!)
* Adding support for detecting column size issues when updating a cell
* Adding unit tests for the exception on read scenario
* Avoid crashing if azure edition is System.
* Add new Azure-specific options to the prototype and return through the service calls
* Send azure properties over database info request
* IsCloud should include Azure SQL DW
- Fixed references to this feature flag
- Updated edition handling to include ManagedInstance and removed AzureV1 check since it's never used and it's been retired.
* Fix https://github.com/Microsoft/vscode-mssql/issues/986 and add better server edition naming
- Fixed a number of issues related to the binding queue, specifically the fact that it didn't capture exceptions that occurred on the binding thread. This caused the thread to crash the service.
- The root cause of the error was when you get a connection error during init of the SmoMetadataProvider which threw an exception. Because of this no Binder was created, and the code would null ref later during processing
- Added logic to handle null ref issue and other related code
- Added a unit test for the new error handling path, and supported still returning some value in this case
- Separately, have a fix for an issue where the edition is shown as "SQL Azure" for all Azure connections. Fixing to be "Azure SQL DB" for this case and handle when the database reports as DW or Stretch instead. This maps better to users concept of what the edition should be and avoids returning what is an outdated term.
* Messed up the test - fixing this by returning the expected return object
- Compatibility Level should be a numerical value. In using `enum.ToString()` the result was `Version140` instead of `140`
- Backup date should be sensible if never backed up. Added a simple check that states it was never backed up if the backup date is before 1900.
* 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
* code refactoring
* Add filebrowser service and tests
* change dataset reference
* Address pr comments
* add more tests
* address pr comments
* address pr comments and added more tests
* minor change
* minor fix
* Fix test break and add dataset result check
* inital request
* refactored query execution failure callback to take exception
* added failure callback to execute and return
* added test for query execute and return
* updated params
* removed dead code
* addressed feedback; added multiple active result set support; updated tests
* addessed feedback and added testing and errors and verification
* change <= to ==
* changed name of trashQ to removedQuery
* Create backup task for execution
* Register backup to task service
* Fix backup task service
* Fix async methods
* Add backup unit test
* Add cancellation token to task service and fix other PR comments
* Add SR and fix other pr comments
* Add comments to methods
* Fixed backup cancel test and casing
* Change sleep time in test
* 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
This change adds a couple things
_Multipart Identifier Decoding_
The ability to decode a multipart identifier (with or without escaping) has been added to the SqlScriptFormatter utility class. This code is utilized to split a table name provided to the edit/initialize request into schema and table name.
_Default Schema Workaround_
The code that retrieves the SMO metadata objects originally used the `[]` operator to access the objects. Due to a bug(?) in SMO, this results in problems when loading tables without a default schema (in our case if you're logged in as SA). Using the metadata object constructors gets around this issue, we are explicitly using them.
* Adding decoding of multipart identifiers
Adding code fix for default schema issue
* Adding some more localizable strings for errors when loading metadata
* Adding localization files... again?
* Changes as per pull request comments
* Ensures that metadata is "extended" before creating a new row edit object
* Adds the commit handler to edit data service initialization calls
* Unit tests for the associated changes
* Major refactor of EditDataMetadata providers
* EditMetadataFactory generates "basic" EditTableMetadata objects based entirely on SMO metadata
* SmoEditTableMetadata no longer depends on SMO, making it unecessary to mock it
* Renamed SmoEditTableMetadata to EditTableMetadata
* EditTableMetadata can be extended with DbColumnWrappers
* Moving logic for extending a EditColumnMetadata into that class
* I *think* this will work for async execution of initialize tasks
* Fixing unit tests for new Edit(Table|Column)Metadata classes
* Async stuff that works! And passes unit tests
* Adding unit tests
Adding .idea to gitignore
* Adding message to the EditSessionReadyEvent
* Fixes from dev merge
* Fixing unit tests that Rider didn't catch as failing
May have been a bit heavy-handed with the async/await stuff
* Couple changes as per PR comments