Commit Graph

39 Commits

Author SHA1 Message Date
Leila Lali
379c6170b3 Intellisense for when the text starts with bracket (#164)
* Intellisense for when the text starts with bracket
2016-12-06 10:09:50 -08:00
Sharon Ravindran
82a7a01304 Peek definition support for tables, views and stored procedures (#160)
* Add support for peek/go to definition
Add unit tests for definition

Microsoft/vscode-mssql#253 and Microsoft/vscode-mssql#268

* Format Strings

* Add integration tests

* Refactor variable names

* Remove test file

* Remove LIVE_CONNECTION definition

* Change method name

* Write files to a separate directory

* Refactor GetDefinition

* Remove unnecessary whitespace and modify variable name

* Check intellisense settings

* Refactor code to be scalable and modify tests

* Refactor to facilitate CodeGen

* Reorder methods

* Modify method to strip bracket syntax

* Add one_second constant

* Add comments

* Modify null check

* Modify GetSchema code to account for spaces

* Alter variable names and modify null checks

* Remove timeout callback and refactor null check

* remove LIVE_CONNECTION_TEST definition
2016-12-02 12:16:21 -08:00
Mitchell Sternke
c95933b7e1 Implemented function signature help, and added tests (#153)
* Implemented function signature help, and added tests

* Incremental commit of changes from code review feedback

* Rename test

* Added check to make sure intellisense is enabled

* Use HoverTimeout instead of BindingTimeout
2016-11-30 14:22:48 -08:00
Karl Burtram
39b79ae05b Merge branch 'master' into dev 2016-11-28 09:58:32 -08:00
Karl Burtram
a54d081363 Avoid null reference exceptions in diagnostics parsing (#149)
* Avoid a couple possible null reference exceptions

* Switch syntax around a little bit.
2016-11-17 15:06:57 -08:00
Mitchell Sternke
2211bd0403 Added notification for when language service is done updating after connect (#146)
* Added notification for when language service is done updating after connect

* Addressing feedback

* Added unit test
2016-11-15 17:39:17 -08:00
Karl Burtram
cd5abad0f2 Merge branch 'release/ctp10' 2016-11-06 20:45:48 -08:00
Karl Burtram
6cdaa6e808 Add more test cases for code coverage (#127)
Next round of code coverage test cases.  Please review the commit for next iteration.

* Add connection retry tests

* More test coverage

* Update diagnostics end-to-end test
2016-10-29 12:10:02 -07:00
Leila Lali
017b00437a changing the setting namespace (#116) 2016-10-25 17:19:33 -07:00
Leila Lali
cac3ae5eeb changing the setting namespace (#116) 2016-10-25 17:09:42 -07:00
Karl Burtram
1d7e6e353f Feature/cleanups1 (#114)
* Intellisense cleanups.

* Additional intellisense cleanups for default list

* Add missing Monitor.Exit in completion resolve

* A couple more cleanups.

* Bug fixes for auto-complete.

* Add comment regarding conditional logic
2016-10-24 18:11:49 +00:00
Karl Burtram
854a6a0eca Switch back to event from locks to fix blocking issues. (#111) 2016-10-21 15:46:33 -07:00
Leila Lali
b3d793dc85 Fixed autocomplete bugs (#110)
Autocomplete for items with special characters doesn't add [ ]
Autocomplete default list shows when it shouldn't..like in comments or literals
2016-10-21 15:03:48 -07:00
Karl Burtram
c5f44ccee1 Switch from events to locks during parsing (#87)
* Switch from event to locks in binding.

* Remove unneeded null check.
2016-10-12 15:09:24 -07:00
Karl Burtram
52b5f222db Merge dev to master for 0.0.7 release (#86)
* Disable failing test while investigating

* Made connection errors more user-friendly (#57)

* Bug/negativeOneRowsAffected strings file fix (#61)

* Adding changes to sr.strings files

* Fixing bug by changing valid filename check to fail on whitespace (#55)

Fixing a bug from the unit tests on OSX/Unix where attempting to create a file with a name that's all whitespace succeeds when it should fail. This was passing in Windows because File.Open throws an ArgumentException when an all whitespace name is provided. In Unix systems, File.Open does not throw, causing the test to fail.

Solution is to check for whitespace in the sanity check.

* Format Cell Values (#62)

* WIP for ability to localize cell values

* Changing how DateTimeOffsets are stored, getting unit tests going

* Reworking BufferFileStreamWriter to use dictionary approach

* Plumbing the DbCellValue type the rest of the way through

* Removing unused components to simplify contract

* Cleanup and making sure byte[] appears in parity with SSMS

* CR comments, small tweaks for optimizing LINQ

* Feature/batch line info (#56)

* inital pipe of line numbers and getting text from workspace services

* tests compile

* Fixed bug regarding tests using connections on mac

* updated tests

* fixed workspace service and fixed tests

* integrated feedback

* Remove deleted file with whitespace name

* Feature/autocomp options (#63)

* Enable IntelliSense settings

* Fix up some bugs in the IntelliSense settings.

* Code cleans for PR

* Fix a couple exceptions that are breaks query execute and intellisense.

* Add useLowerCase flag and settings tests

* Remove task.wait from test to avoid break on build machine. (#67)

This is to fix test breaks so I'll merge now.  Please let me know if there are comments on this commit.

* Do not use ReliableCommand in the query execution service (#66)

* Do not use ReliableCommand in the query execution service.

* Fixing the logic to remove InfoMessage handlers from ReliableSqlConnection

* Adding test to query UDT

* Bump SMO to 140.1.6 to pick up perf fixes (#69)

* Enable Quick Info hover tooltips (#65)

Pushing to include in tomorrow's partner release build.  Please send me any feedback and I'll address in the next Intellisense PR.

* Added grouping between system/user dbs when listing (#70)

* Feature/timestamp messages (#68)

* added support for timestamps

* fixed tests

* Moved message class to own file; added 'z' to end of date strings

* added default time constructor

* removed unnecessary z

* added time string format info in comment

* changed from utc time to using local time

* Feature/save selection (#64)

* Save selection

* Add tests

* Change filename in test

* Code cleanup

* Refactor handler

* Code cleanup

* Modify tests to have query selection

* Change variable declaration

* Bump SMO to 14.0.7 to pick Batchparser updates (#72)

...bumping versions.  No review needed.

* Lingering File Handles (#71)

Fixing a bug where in various situations, the files used for temporary storage of query results would be leftover. In particular, the following changes were made:
* When the dispose query request is submitted, the corresponding query is now disposed in addition from being removed from the list of active queries
* When a query is cancelled, it is disposed after it is cancelled
* If a query already exists for a given ownerURI, the existing query is disposed before creating a new query
* All queries are disposed when the query execution service is disposed (ie, at shutdown of the service)

A unit test to verify the action of the dispose method for a ResultSet was added.

* Ensuring queries are disposed

Adding logic to dispose any queries when:
* URI that already has a query executes another query
* A request to dispose a query is submitted
* A request to cancel a query is submitted

* Small tweaks for cleanup of query execution service

* Add IntelliSense binding queue (#73)

* Initial code for binding queue

* Fix-up some of the timeout wait code

* Add some initial test code

* Add missing test file

* Update the binding queue tests

* Add more test coverage and refactor a bit.  Disable reliabile connection until we can fix it..it's holding an open data reader connection.

* A few more test updates

* Initial integrate queue with language service.

* Hook up the connected binding queue into al binding calls.

* Cleanup comments and remove dead code

* More missing comments

* Fix build break.  Reenable ReliabileConnection.

* Revert all changes to SqlConnectionFactory

* Resolve merge conflicts

* Cleanup some more of the timeouts and sync code

* Address code review feedback

* Address more code review feedback

* Feature/connect cancel (#74)

* Implemented connection cancellation

* Made connect requests return immediately and created a separate connection complete notification

* Fix spelling

* Fix sorting

* Add separate lock for cancellation source map

* Fix an issue with queue deadlocks causing test failures (#77)

* Fixed issue where connecting could take very long and cancellation would not work (#78)

* Fixed issue where connecting could take very long and cancellation would not work

* Addressing feedback

* Remove warning suppression

* Adding unlimited timeout for query execution (#76)

Adding explicitly setting the timeout for command execution to unlimited. We can change this to be user configurable at a later time

* Support 'for XML and for JSON' queries (#75)

* Set isXMl and isJson for 'for xml/json' resultSets

* Change string comparison

* Modify if-else

* VSTS 8499785. Close SqlToolsService after VS Code exits. (#80)

VSTS 8499785. Close SqlToolsService after VS Code exits.

* Remove extra level of tasks in binding queue (#79)

* Remove extra layer of tasks in binding queue

* Change order of assigning result to avoid race condition

* Add timeout log for the metadata lock event

* Fix test cases
2016-10-08 19:18:26 +00:00
Karl Burtram
f32b0290bb Remove extra level of tasks in binding queue (#79)
* Remove extra layer of tasks in binding queue

* Change order of assigning result to avoid race condition

* Add timeout log for the metadata lock event

* Fix test cases
2016-10-08 00:06:35 +00:00
Karl Burtram
62525b9c98 Add IntelliSense binding queue (#73)
* Initial code for binding queue

* Fix-up some of the timeout wait code

* Add some initial test code

* Add missing test file

* Update the binding queue tests

* Add more test coverage and refactor a bit.  Disable reliabile connection until we can fix it..it's holding an open data reader connection.

* A few more test updates

* Initial integrate queue with language service.

* Hook up the connected binding queue into al binding calls.

* Cleanup comments and remove dead code

* More missing comments

* Fix build break.  Reenable ReliabileConnection.

* Revert all changes to SqlConnectionFactory

* Resolve merge conflicts

* Cleanup some more of the timeouts and sync code

* Address code review feedback

* Address more code review feedback
2016-10-04 14:55:59 -07:00
Karl Burtram
3777cceb57 Enable Quick Info hover tooltips (#65)
Pushing to include in tomorrow's partner release build.  Please send me any feedback and I'll address in the next Intellisense PR.
2016-09-26 20:11:26 -07:00
Karl Burtram
806220c4b5 Feature/autocomp options (#63)
* Enable IntelliSense settings

* Fix up some bugs in the IntelliSense settings.

* Code cleans for PR

* Fix a couple exceptions that are breaks query execute and intellisense.

* Add useLowerCase flag and settings tests
2016-09-25 12:53:28 -07:00
Karl Burtram
701aba8d46 Add some tests to increase code coverage metrics 2016-09-19 18:21:48 -07:00
Karl Burtram
0bd7edecf1 Check if script is output window before parsing. 2016-09-19 14:00:10 -07:00
Karl Burtram
03315475cb Misc. cleanup for PR 2016-09-19 12:32:56 -07:00
Karl Burtram
44914aa8b9 Move ParseBind out of locked block 2016-09-18 23:20:43 -07:00
Karl Burtram
e74a392ca9 Improve autocomplete locking 2016-09-18 01:54:32 -07:00
Benjamin Russell
41198e9357 Adding sr.strings file and removing hard-coded strings (#52)
* Strings sweep for connection service

* String sweep for credentials service

* String sweep for hosting

* String sweep for query execution service

* String sweep for Workspace service

* Renaming utility namespace to match standards

Renaming Microsoft.SqlTools.EditorServices.Utility to
Microsoft.SqlTools.ServiceLayer.Utility to match the naming changes done a
while back. Also renaming them on the files that use them

* Namespace change on reliable connection

* Adding the new resx and designer files

* Final bug fixes for srgen

Fixing flakey moq package name

* Removing todo as per @kevcunnane

* Adding using statements as per @llali's comment

* Fixing issues from broken unit tests

Note: This feature contains changes that will break the contract for
saving as CSV and JSON. On success, null is returned as a message instead
of "Success". Changes will be made to the vscode component to handle this
change.
2016-09-16 16:18:25 -07:00
Mitchell Sternke
f2a5654a20 Feature/reliable connection (#44)
* Initial commit of reliable connection port

* Made ReliableSqlConnection inherit from DbConnection instead of IDbConnection

* Cleanup

* Fixed autocomplete service to use reliable connection

* Fix copyright headers

* Renamed ConnectResponse.Server to ServerInfo

* Removed unused using

* Addressing code review feedback
2016-09-13 18:10:26 -07:00
Karl Burtram
1671f762bf Autocomplete bug fixes (#43)
Fix-up the autocomplete support to better handle binding timeouts.
Also provide a default keyword suggestion list.
2016-09-13 15:22:57 -07:00
Karl Burtram
1332fd112e Clean-up the autocomplete SMO integration. 2016-09-01 00:23:39 -07:00
Karl Burtram
99ab6406d2 Integrate SMO .Net core into SQL Tools Service project 2016-08-26 10:15:23 -07:00
Karl Burtram
b8329a7986 Merge branch 'dev' into feature/testSmo 2016-08-24 23:04:24 -07:00
Karl Burtram
89ca0c1fde Inital SMO autocomplete commit 2016-08-24 23:03:43 -07:00
Leila Lali
d96b4e5a4a Changing the format of the messages to be based on language server protocol 2.0 2016-08-24 15:16:43 -07:00
benrr101
9fa183ea6d Fixing String.Format to string.Format 2016-08-16 12:28:52 -07:00
Mitchell Sternke
5c03ba336d Added disconnect and connect when already connected service code 2016-08-05 17:46:16 -07:00
Kevin Cunnane
402e25f77d Per editor Connect support v0.1
- Basic plumbing to support connections for a URI rather than global connections. Typical use case is editor requests to connect, but this isn't the only possible use
- Tests pass but need updating to cover new functionality, and re-enable AutoCompleteService test once there is a ServiceDiscovery component that registers and returns services. This is necessary as .Instance won't allow for dependency injection and proper testing.
2016-08-04 14:01:17 -07:00
Benjamin Russell
d191b0483c Small bugfix after the previous merge
My mistake, didn't pay enough attention when performing the refactoring as
requested in the last code review.
2016-08-03 15:41:11 -07:00
Benjamin Russell
b2f44031b7 Switching from ISqlConnection to DbConnection
This is a fairly minor change that will save tons of time as we develop
this service. The DbConnection and associated Db* abstract classes
ask for synchronous versions of the code and allow the addition of async
code. The SqlClient implementation already implements Db* abstract
classes, so we can piggy back off that for our dependency injection layer.

Tests and existing code has been updated to handle the change, as well
2016-08-02 18:19:51 -07:00
Benjamin Russell
f40aa31c67 Merge branch 'dev' into feature/queryExecutionV1
Also adding a fancy new mocked out reader for mocking db calls.
2016-08-01 14:27:57 -07:00
Benjamin Russell
e83d2704b9 Fixing project names to fix VS bugs
For whatever reason, Visual Studio throws a fit if a referenced project has a name
and the folder name (which is used to reference the project) is different than that name.
To solve this issue, I've renamed all the projects and folders to match their project
names as stated in the project.json.
2016-07-29 16:55:44 -07:00