Commit Graph

270 Commits

Author SHA1 Message Date
Karl Burtram
ebe155bb94 Rename RTF files to get picked up on Mac builds 2016-11-08 15:15:13 -08:00
Karl Burtram
c6ba1c2a9f Package SMO and T-SQL LangService EULAs in sqltoolsservice archive. 2016-11-08 14:54:05 -08:00
Karl Burtram
c9de4500e1 Add clear to get nuget.config to avoid bad global entries 2016-11-06 21:16:55 -08:00
Karl Burtram
8e83afd628 Fix merge build break 2016-11-06 21:05:24 -08:00
Karl Burtram
cd5abad0f2 Merge branch 'release/ctp10' 2016-11-06 20:45:48 -08:00
Karl Burtram
2ebf34d9ce Add a few more autocomplete delimeter characters (#138)
Trival change to add a couple new delimeters..auto-merging.
2016-11-06 04:12:48 +00:00
Karl Burtram
09e8f41640 Bump SMO to 140.1.11 (#137)
Version bump only
2016-11-05 16:57:19 -07:00
Karl Burtram
1989259a47 Add missing SrGen nuget package to repo (#135)
Merging since this is to fix a build break.
2016-11-05 16:39:40 -07:00
Karl Burtram
3c98d03cc8 Update nuget.config to pull private nuget packages from within the repro. (#132) 2016-11-01 12:28:37 -07:00
Sharon Ravindran
6937e46c1b Handle connection exceptions and add error callback (#126) 2016-11-01 12:28:14 -07:00
Sharon Ravindran
a27c182a0f Refactor error messages (#122) 2016-10-29 20:08:04 -07:00
Anthony Dresser
6df458dcfc change time when the batch time is set (#118) 2016-10-29 20:07:39 -07:00
Leila Lali
017b00437a changing the setting namespace (#116) 2016-10-25 17:19:33 -07:00
Karl Burtram
ea77bfa885 Suggestion list cleanups (#115)
* Add additional autocomplete words

* Add another word to default completion list

* Add colorization keywords and fix minor bugs.
2016-10-25 12:08:41 -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
Sharon Ravindran
2a688cb87f Make save result async (#107)
* Make save results asynchronous

* Prevent write share of file

* Lock objects in stages

* Create Save result objects

* refactor and write rows in batches

* CHange batchSize from test value

* Remove await in handler

* Removing the file reader as a member of the resultset

* Change Dispose to wait for save

* Change concurrentBag

* PascalCase variables

* Modify function signature and tests

* Safe file methods

* refactor ResultSets to Ilist and remove ToList

* Change dictionary key and prevent add to saveTasks during dispose

* Simplify row concatenation

* Fix prevent add

* Fix prevent add

* Add methods to expose saveTasks and isBeingDisposed
2016-10-21 20:07:21 -07:00
Mitchell Sternke
b389d275a2 Added test driver program for service host (#113)
* Added test driver program for service host

* Fix typo
2016-10-21 17:49:37 -07:00
Leila Lali
5a7b412c38 changed the icons for the completion list based on the sql type (#112)
* changed the icons for the completion list based on the sql type
2016-10-21 15:50:12 -07: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
Mitchell Sternke
f35b9fda27 Added option --enable-logging to enable diagnostic logging (#106)
* Added option --enable-logging to enable diagnostic logging

* Addressing feedback

* Addressing feedback, round 2
2016-10-20 17:56:33 -07:00
Benjamin Russell
989ad065dd Bug/srgen in lab builds (#109)
This isn't much of a change from the change that was backed out. The only change was a version bump of the SRGen nuget package.

* Reenabling running SRGen when running lab builds, improving failure logic, updating SRGen package

* Vbump for srgen package testing

* Final vbump of srgen package
2016-10-20 16:54:41 -07:00
Karl Burtram
fd7a2a5748 Bump SMO to 140.1.9 (#108)
version bump only
2016-10-20 14:57:40 -07:00
Benjamin Russell
34e9da6dbf Revert "Reenabling running SRGen when running lab builds, improving failure logic, updating SRGen package (#91)"
This reverts commit c14c7d187f.
2016-10-20 11:33:26 -07:00
sgreenmsft
aa5432d0be Sgreen/update messages (#97)
Update messages to fix typo and remove (s).
2016-10-19 14:55:09 -07:00
Benjamin Russell
2721de1de7 Fixing a broken unit test (#98) 2016-10-19 14:52:05 -07:00
Benjamin Russell
c14c7d187f Reenabling running SRGen when running lab builds, improving failure logic, updating SRGen package (#91) 2016-10-19 14:27:56 -07:00
Leila Lali
09c6c52292 disabling the language capabilities which we're not supporting this release (#100)
* disabling the language capabilities which we're not supporting this release
2016-10-19 14:27:03 -07:00
Karl Burtram
4ee6de63f5 Rollback build break from previous check-in (#105) 2016-10-19 13:04:02 -07:00
Benjamin Russell
11ca99f419 Handling NOCOUNT being set (#96)
After much thinking, this change brings the message behavior into line with SSMS, including if the NOCOUNT is set. This is a somewhat non-obvious solution, but the StatementCompleted event handler will only be fired if there is a record count to return. We'll add the message for number of records if the StatementCompleted event is fired, otherwise we won't add any messages while processing the resultsets of the batch. If any messages are returned from the server, we'll capture those. Then, if at the end of the batch, we haven't collected any messages from StatementCompleted events or server messages, then we'll add the "completed successfully" message.
This matches behavior of SSMS that will only emit a "completed successfully" message if there were no other messages for the batch.

* Solution to issue, some unit tests needed to be tweaked

* Comments for the event handler
2016-10-19 11:10:13 -07:00
Mitchell Sternke
b62f67607f Redefined ordering for list databases to be by name (#103) 2016-10-19 10:57:20 -07:00
Karl Burtram
b001f428bf Fix a binding causing autosuggestions to fail (#104) 2016-10-19 10:35:53 -07:00
Mitchell Sternke
a3335708c6 Feature/reliable connection tests (#102)
* Ported ReliableConnectionTests from DacFx and added a few more tests

* Fix style

* Created integration tests configuration and fixed minor test issue
2016-10-18 12:19:16 -07:00
Leila Lali
3443e9bcf7 fix the build issue in windows 2016-10-17 10:10:06 -07:00
Karl Burtram
c05dcbbc75 Use private SqlClient to fix UDT issue (#99)
This is only a version bump so I'm going to merge now to try and make Monday's build.
2016-10-15 22:35:34 -07:00
Benjamin Russell
2eeed98a63 Returning start/end and elapsed time with batch summaries (#92)
Returning start/end and elapsed timestamps for batches with the batch summary.
2016-10-13 12:14:22 -07:00
Karl Burtram
2f876714ed Disable test causing failures in lab builds (#93) 2016-10-12 19:58:04 -07:00
Benjamin Russell
fa7e13d9c5 Cancel Query Part 2 (#89)
Moving some logic around such that when a query is cancelled, it isn't thrown away, allowing reading of the partial results, a la SSMS.
Adding a configure await to fix a tenacious bug causing query cancellations to hang for 20s or more.
Capturing sql errors for user cancellation, to return all user cancelation scenarios using the same messages. (ie, cancelling during ExecuteReaderAsync will yield a error from the server whereas cancelling during ReadAsync throws a TaskCancelledException
No changes to protocol, just implementation changes.

* Test of try/finally

* Fixed issue where resultsets are unreadable after query cancellation

* Fix for await/async issue
2016-10-12 17:41:48 -07:00
Sharon Ravindran
71fabd5c75 Fix/merge xml rows (#85)
* Concatenate rows for 'for Xml' and 'for Json'

* Modify select

* remove get set for isSingleColumnXmlJsonResultSet

* Remove toList
2016-10-12 17:24:12 -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
Mitchell Sternke
9f39ac6014 Feature/sql exception bug check (#90)
* Added test for OSX/Linux to check for the SqlException error code bug in .NET core

* fix style

* closed summary
2016-10-12 14:00:33 -07:00
Benjamin Russell
253298b158 Removing SRGen from the publish task, making build.sh executable (#82) 2016-10-11 10:54:11 -07:00
Benjamin Russell
60edcc3057 Make query execution truly asynchronous (#83)
The two main changes in this pull request:
Launching query execution as an asynchronous task that performs a callback upon completion or failure of a query. (Which also sets us up for callbacks progressive results)
Moving away from using the Result of a query execution to return an error. Instead we'll use an error event to return an error
Additionally, some nice refactoring and cleaning up of the unit tests to take advantage of the cool RequestContext mock tooling by @kevcunnane

* Initial commit of refactor to run execution truely asynchronously

* Moving the storage of the task into Query class

Callbacks for completion of a query and failure of a query are setup as
events in the Query class. This actually sets us up for a very nice
framework for adding batch and resultset completion callbacks.

However, this also exposes a problem with cancelling queries and returning
errors -- we don't properly handle errors during execution of a query
(aside from DB errors).

* Wrapping things up in order to submit for code review

* Adding fixes as per comments
2016-10-11 10:51:52 -07:00
Mitchell Sternke
a2f2dd7b5e Disabled MARS by default (#88)
* Disabled MARS by default

* Addressing feedback

* Added check for unhandled ObjectDisposedException
2016-10-10 17:15:26 -07:00
Mitchell Sternke
8511f5db43 Fixed issue where mac connections would not time out as expected (#81)
* Fixed issue where mac connections would not time out as expected

* Made check specific to OSX

* Added check for linux
2016-10-10 17:14:24 -07:00
Leila Lali
a3089978e1 Setting the rpath for System.Security.Cryptography.Native.dylib at bu… (#84)
* Setting the rpath for System.Security.Cryptography.Native.dylib at build time for mac
2016-10-10 08:47:35 -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
sgreenmsft
03d7fd94c8 VSTS 8499785. Close SqlToolsService after VS Code exits. (#80)
VSTS 8499785. Close SqlToolsService after VS Code exits.
2016-10-07 16:30:54 -07:00
Sharon Ravindran
fea9bb43c5 Support 'for XML and for JSON' queries (#75)
* Set isXMl and isJson for 'for xml/json' resultSets

* Change string comparison

* Modify if-else
2016-10-06 11:35:29 -07:00