Commit Graph

581 Commits

Author SHA1 Message Date
Leila Lali
276f70ab3b modified the default value for OE session (#394) 2017-06-23 15:37:04 -07:00
Kevin Cunnane
81d031d5eb LanguageService must send result or intellisense hangs (#395)
* LanguageService must send result or intellisense hangs
- Unless the language services methods return results for requests, the VSCode language service protocol will never send a response up to its higher-level code. This means with intellisense off, it appears to hang instead of saying "No results found". This is clearly sub-optimal and if any other extension wants to provide SQL suggestions, it would break them from sending results
- Minor refactor to fully remove Instance-field references in the code
2017-06-23 13:36:43 -07:00
Leila Lali
c28a97e6fa Fix/integrationtests (#391)
* fixed the problem with parsing sql2017 version
2017-06-22 09:20:58 -07:00
Anthony Dresser
af2ed84953 Adds a execute and return result message (#383)
* 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
2017-06-16 15:43:41 -07:00
Karl Burtram
7ce7ec22de Fix DMP message name to use correct casing (#386) 2017-06-16 15:38:47 -07:00
Kate Shin
a646d627c6 Register backup to task service for execution (#381)
* 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
2017-06-16 14:01:09 -07:00
Kevin Cunnane
0c7533b5b9 Fixed typo in sr.strings (#385)
- added newline to separate 2 properties and ran SrGen to regenerate the loc files
2017-06-16 12:28:37 -07:00
Leila Lali
71b349f67b Supporting SQL DW in Object explorer (#380)
* supporting sql dw in oe
2017-06-15 12:53:32 -07:00
Leila Lali
d9e68831ab fixed the tests for task service (#384)
* fixed the tests for task service
2017-06-15 12:49:20 -07:00
Anthony Dresser
9b91a93578 refactored query execution failure callback to take exception (#382) 2017-06-14 15:59:21 -07:00
Leila Lali
85dc0b9ae2 setting user status in oe if user is disabled (#378)
* setting user status in oe if disabled
2017-06-14 15:54:50 -07:00
Kevin Cunnane
05771592d9 Fix support for SQL DW in Edit Data scenarios (#379)
- SQL DW does not support SESSIONPROPERTY. Verified that the correct return values are "true" for both values on all DW instances
2017-06-13 12:39:10 -07:00
Leila Lali
58f438176b fixed couple of issues in task service (#377) 2017-06-12 15:52:49 -07:00
Kevin Cunnane
869cd1439f Add LanguageFlavorNotification handling and refactor LanguageService (#375)
* Add LanguageFlavorNotification handling and refactor LanguageService
- Added new notification handler for language flavor changed
- Refactored the LanguageService so that it no longer relies on so many intertwined static calls, which meant it was impossible to test without modifying the static instance. This will help with test reliability in the future, and prep for replacing the instance with a service provider.

* Skip if not an MSSQL doc and add test

* Handle definition requests

* Fix diagnostics handling
2017-06-12 13:28:24 -07:00
Leila Lali
b0263f8867 Added task service (#374)
* Added task service
2017-06-12 11:02:57 -07:00
Anthony Dresser
04ed01c88d Added missing properties for databases and server (#373)
* added get database info to admin service

* refactored code to be inline with standard

* added comments to utils functions

* added comments to public classes

* added machine name to serverinfo from connection; added last backupdate and last log backup date to database info

* removed camelcase from request type

* removed the wrapper for the generic dictionary

* removed unnecessary imports

* merged master

* changed datetime compare to equality operator

* added database compatability level to info

* renamed field

* fixed CompatibilityLevel string typo, added bakcup dates to capabilities list
2017-06-09 16:48:51 -07:00
Anthony Dresser
84edef6374 Get Database Info (#370)
* added get database info to admin service

* refactored code to be inline with standard

* added comments to utils functions

* added comments to public classes

* removed camelcase from request type

* removed the wrapper for the generic dictionary

* removed unnecessary imports
2017-06-08 16:57:52 -07:00
Leila Lali
b60a865706 handling offline and inassisable db in oe (#369)
* handling offline and inassisable db in oe
2017-06-07 12:21:24 -07:00
Kate Shin
3bf562acf0 Create backup service tests (#368)
* Add backup test

* Add backup service tests
2017-06-02 18:11:35 -07:00
Leila Lali
950b44137b using the new smo method to initialize the smo collections (#367)
* using the new smo method to initialize the smo collections
2017-06-02 16:07:21 -07:00
Matt Irvine
5c7909d741 Adding SpecialValueAppName in connection options (#366)
Application Name is now treated as a special value, so that applications consuming SQL Tools Service can set the application name correctly.
2017-06-01 11:54:49 -07:00
Karl Burtram
79350e10f9 Couple workarounds for OE refresh issues on RHEL (#365) 2017-05-29 16:36:55 -07:00
Karl Burtram
5f4ab5eba8 Fix nullref in object timeout 2017-05-29 00:00:32 -07:00
Karl Burtram
8e7fac26e5 Fix nullref in backup from not providing SFC XML innerDoc (#364) 2017-05-27 13:17:40 -07:00
Leila Lali
0d00534f6a setting timeout for oe tasks (#363) 2017-05-26 21:54:45 -07:00
Kevin Cunnane
29c9b5fa51 Edit data schema and SQLAuth support (#362)
- Fix non-dbo schema support, adding in specific parameter for schema. If this isn't specified, the code will still fall back to splitting up the objectName if it's a multi-part identifier. This ensures that input from action bar or CLI scenarios can still work since we'll accept multi-part names there
- Fix failure to edit data on Azure. This was failing as the SMO query to get the table info failed when cloning SqlConnection. In .Net Core it currently loses the passwor unless PersistSecurity = true.
- Fix bug in error reporting where ID and Method were switched. This caused bad breaks and was caught during integration testing
2017-05-26 14:19:18 -07:00
Kevin Cunnane
a4c630d5d3 Avoid throwing exception in LangageService for OE connections (#361)
* Ensure connection open for OE queries and fix connection disposal
- Dispose connection in Metadata service, to ensure we cleanly dispose and don't rely on garbage colleciton
- Fixed issue where if the connection was closed, expanding databases in the Server would fail. This is because SMO doesn't always reopen the connection, certainly not for Server level queries. The solution is to always check if open and reopen.
- Added unit tests for this, which required mocking the relevant IsOpen / OpenConnection methods. Refactored SMO wrapper calls into a dedicated class file to handle this

* Avoid throwing exception in LangageService for OE connections
- Handle non-File URIs by skipping language service binding in those cases. Added test for this

- VSCode passes untitled:, git: and other paths, often without a '/'. Updated logic to handle this.

* Handle windows file paths
2017-05-26 13:11:26 -07:00
Kevin Cunnane
bbd0972dde Ensure connection open for OE queries and fix connection disposal (#359)
* Ensure connection open for OE queries and fix connection disposal
- Dispose connection in Metadata service, to ensure we cleanly dispose and don't rely on garbage colleciton
- Fixed issue where if the connection was closed, expanding databases in the Server would fail. This is because SMO doesn't always reopen the connection, certainly not for Server level queries. The solution is to always check if open and reopen.
- Added unit tests for this, which required mocking the relevant IsOpen / OpenConnection methods. Refactored SMO wrapper calls into a dedicated class file to handle this
2017-05-25 18:26:52 -07:00
Benjamin Russell
c545b74372 Fixing issue where error objects were not serialized with camelcase property names (#360) 2017-05-25 17:59:47 -07:00
Kate Shin
2a1da0ff09 Backup service - add database metatdata request (#358)
* Add backup database metadata json rpc

* Backup database metadata changes after sync

* Changed request class name to BackupConfigInfo and made other changes
according to comments

* Addressed PR comments
2017-05-25 14:52:33 -07:00
Leila Lali
4861d7a174 Fixed the issue with parsing sql server 2017 version (#357)
* Fixed the issue with parsing sql server 2017
2017-05-24 12:07:41 -07:00
Leila Lali
63372d327e Object explorer notifications (#354)
* changing oe protocols to send notifications
2017-05-23 09:30:11 -07:00
Leila Lali
6920e6bfd3 OE system folders and removing some nodes (#353)
* OE system objects for system database
2017-05-19 12:02:34 -07:00
Leila Lali
7ec5549a13 fixed the bug with not closing data reader for oe (#352)
* fixed the bug with not closing data reader for oe

*  fixed the bug with triggers not sending back status
2017-05-17 09:35:55 -07:00
Karl Burtram
3334b76ab3 Disable tests failing in code coverage runs (#351) 2017-05-15 19:12:02 -07:00
Karl Burtram
dc3cd9ea59 Create DB work in-progress (#350)
* Stage changes to other machine

* Stage changes

* Update SMO to fix SMO missing Login bug on macOS
2017-05-15 18:48:04 -07:00
Karl Burtram
b26b7674b3 Add EXCEPT to default keyword completion list (#349) 2017-05-12 22:54:55 -07:00
Kate Shin
efe48d8bd1 Backup in-progress work (#347)
* Initial checkin of backup service implementation

* Backup initial changes for the quick scenario

* misc changes

* Misc changes for backup in-progress work
2017-05-12 21:55:16 -07:00
Leila Lali
327f0a5edd temporary fix to make oe tables expanding faster (#343) 2017-05-12 09:31:23 -07:00
Karl Burtram
ed978fe5b7 Fix create db resource strings (#348)
* Hook up SMO call into create db handler

* Clean-up resource strings

* Few additional code clean-ups
2017-05-12 07:53:45 -07:00
Karl Burtram
848cfadf9a Delete more unneeded sql manager UI code (#345) 2017-05-11 17:54:52 -07:00
Karl Burtram
c131d29a5e Remove unused code and fix test break (#344) 2017-05-11 17:14:57 -07:00
Karl Burtram
c9e2963ca0 Additional create db options (#342)
* Refactor unsafe block

* Stage changes

* Add additional database prototype metadata

* Fix nullref bug

* Read database info properties
2017-05-11 09:44:57 -07:00
Brian O'Neill
8a54435a9c Fix scripting data in the scripting service (#337)
A regression was introduced in the scripting service refactoring where data is no longer scripted. This commit fixes the issue, and updates the tests to catch this in the future.

The issue is in the getter for SqlScriptPublishModel.AdvancedOptions, there is some strange logic which will cause the SqlScriptPublishModel.AdvancedOptions to get reset and lose all values based the ordering of when SqlScriptPublishModel.ScriptAllObjects is set.  In the scripting service refactoring, we started to hit this reset of the AdvanceOptions, which would lose the option to script data, along with other options.

To workaround this, we initialize with SqlScriptPublishModel.ScriptAllObjects to true, and then set all SqlScriptPublishModel.AdvancedOptions values.  Then, we set SqlScriptPublishModel.ScriptAllObjects, and avoid calling the SqlScriptPublishModel.AdvancedOptions getter.

Also including some misc scripting service changes:
1) Adding a sequence number field to the scripting operation events
2) Adding a error message to scripting progress events
3) Expect a null scripting option parameter
4) Correctly set the exception message and details for json-rpc events
5) More logging
2017-05-10 12:06:59 -07:00
Leila Lali
39f5279631 added sub types for parameters (#340) 2017-05-10 09:39:49 -07:00
Brian O'Neill
7625c8d83d Add command line option to specify the logging directory (#336)
Two changes in this PR:
* Add a --log-dir command line parameter and fix command line parsing
* Fix command line parsing where arguments with parameter were parsed incorrectly
2017-05-10 08:55:46 -07:00
Karl Burtram
2e9843cec1 Merge create db work in progress (#341)
* 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
2017-05-09 17:56:32 -07:00
Leila Lali
137335ffd5 fixed the oe integration test failing in appveyor (#339)
* fixed the oe integration test failing in appveyor
2017-05-09 13:06:12 -07:00
Leila Lali
0d570fa29b Fixed node labels, status, sub types (#338) 2017-05-09 09:33:25 -07:00
Leila Lali
5b5c5861d8 fix the problem with history tables as table children (#335) 2017-05-03 11:28:18 -07:00