Commit Graph

101 Commits

Author SHA1 Message Date
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
Sharon Ravindran
55047a0196 Save results to JSON file (#49)
* Save results to JSON file

* Code cleanup

* Code review changes

*  Changed comment
2016-09-14 16:43:10 -07:00
Mitchell Sternke
fbf457a336 Fixed build issue with dependency in project.json (#51) 2016-09-14 13:04:49 -07:00
Karl Burtram
2fbe39b637 Make the log file name unique per session (#50)
* Make the log file name unique per session

* Try to use PID for unique ID
2016-09-14 12:30:16 -07:00
Benjamin Russell
938ebb69e0 Adding SRGen to build scripts (#45)
* Adding SRGen to build scripts

Adding support for sr.strings files. sr.strings files can be converted
into .resx and designer cs files by running the SRGen Cake target
Adding a new target to Cake script to run SRGen. SRGen is pulled down as a
nuget package for Cake and executes from the .tools folder.
Adding Cake temp environment to the gitignore
Adding the cake scripts to the sqltoolsservice solution file

* Fixes from pull request comments

* Fix as per @llali

* Actual changes as per @llali

* removing platform type from netcore dependency
2016-09-14 10:29:34 -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
Benjamin Russell
92eb1376c1 Fixing column datatype issues (#48)
This was an issue where non-string types were being read back as strings (ie, int was read back as a string) resulting in the objects coming back being completely unintelligible values. It was a very simple issue where the column datatype wasn't being set correctly in our wrapper type.
2016-09-13 15:48:30 -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
Sharon Ravindran
0bd084d9f1 Feature/save results as csv (#33)
* Code changes to save results as csv

*  changes to save resultset as csv

* removed csvHelper

* Retrieve right resultSet after batch execution]

* code clean up

* encode column names and use string.Join

* code review changes - property fix and rowBuilder removal

* changes to fix execution tests

* Code clean up

* Code clean up

* Test save as CSV

* Fix tests for Mac/Linux

* Add doc comment

* Add doc comments

* Delete file if exception occurs
2016-09-12 17:11:46 -07:00
Kevin Cunnane
14b6348b20 Connect should return actual DB Name (#42)
- On Connecting to a server with no DB specified, we will actually get a connection to Master or some default DB.
- This DB should be used when notifying others of a new connection, and when returning information to the caller so that the correct name can be displayed in the UI.
- Added basic unit tests to cover this scenario
2016-09-12 11:32:02 -07:00
Benjamin Russell
9e492f19f9 Fixing broken OSX unit test caused by inability to hide files on unix (#41) 2016-09-09 15:02:45 -07:00
Benjamin Russell
8aa3d524fc Feature: Writing Execute Results to Temp File (#35)
* WIP for buffering in temporary file

* Adding support for writing to disk for buffering

* WIP - Adding file reader, factory for reader/writer

* Making long list use generics and implement IEnumerable

* Reading/Writing from file is working

* Removing unused 'skipValue' logic

* More tweaks to file buffer

Adding logic for cleaning up the temp files
Adding fix for empty/null column names

* Adding comments and cleanup

* Unit tests for FileStreamWrapper

* WIP adding more unit tests, and finishing up wiring up the output writers

* Finishing up initial unit tests

* Fixing bugs with long fields

* Squashed commit of the following:

commit df0ffc12a46cb286d801d08689964eac08ad71dd
Author: Benjamin Russell <beruss@microsoft.com>
Date:   Wed Sep 7 14:45:39 2016 -0700

    Removing last bit of async for file writing.

    We're seeing a 8x improvement of file write speeds!

commit 08a4b9f32e825512ca24d5dc03ef5acbf7cc6d94
Author: Benjamin Russell <beruss@microsoft.com>
Date:   Wed Sep 7 11:23:06 2016 -0700

    Removing async wrappers

* Rolling back test code for Program.cs

* Changes as per code review

* Fixing broken unit tests

* More fixes for codereview
2016-09-08 17:55:11 -07:00
Leila Lali
9fc32fa74e Build scripts to create publish folders and archive packages 2016-09-07 12:16:00 -07:00
Kevin Cunnane
8ca88992be Credentials store API (#38)
* CredentialService initial impl with Win32 support

- Basic CredentialService APIs for Save, Read, Delete
- E2E unit tests for Credential Service
- Win32 implementation with unit tests

* Save Password support on Mac v1

- Basic keychain support on Mac using Interop with the KeyChain APIs
- All but 1 unit test passing. This will pass once API is changed, but checking this in with the existing API so that if we decide to alter behavior, we have a reference point.

* Remove Username from Credentials API

- Removed Username option from Credentials as this caused conflicting behavior on Mac vs Windows

* Cleanup Using Statements and add Copyright

* Linux CredentialStore Prototype

* Linux credential store support

- Full support for Linux credential store with tests

* Plumbed CredentialService into Program init

* Addressing Pull Request comments
2016-09-06 18:12:39 -07:00
Mitchell Sternke
76e7ea041c Merge pull request #37 from Microsoft/bug/integratedSecurityDefault
Removed cases where we set integrated security by default
2016-09-06 17:14:23 -07:00
Mitchell Sternke
f5e40d7944 Addressing feedback 2016-09-06 17:10:55 -07:00
Mitchell Sternke
4b35d77214 Removed cases where we set integrated security by default to fix linux issue 2016-09-02 17:53:02 -07:00
Mitchell Sternke
f6f59f3453 Merge branch 'dev' into feature/connectionChanged 2016-09-02 16:58:59 -07:00
Mitchell Sternke
93bf2af8bb Fire connection changed event when USE statements are executed 2016-09-02 16:43:32 -07:00
Karl Burtram
baebaeb0c4 Merge pull request #34 from Microsoft/feature/testSmo
Enable SMO-based autocomplete
2016-09-02 12:02:31 -07:00
Karl Burtram
1b7e27fe76 Get SqlConnection from casting DbConnection 2016-09-02 11:41:41 -07:00
Karl Burtram
e5367416b8 Merge branch 'dev' into feature/testSmo 2016-09-01 09:59:20 -07:00
Karl Burtram
547c050a1c Remove dead code 2016-09-01 00:26:38 -07:00
Karl Burtram
1332fd112e Clean-up the autocomplete SMO integration. 2016-09-01 00:23:39 -07:00
Mitchell Sternke
a30ff33187 Addressing code review feedback 2016-08-31 16:04:04 -07:00
Karl Burtram
f88619c09e Update unit tests to fix failures from autocomplete refactoring 2016-08-31 12:25:07 -07:00
Mitchell Sternke
3fe6e330fe Added support for most sql connection string properties 2016-08-30 17:31:34 -07:00
Karl Burtram
99ab6406d2 Integrate SMO .Net core into SQL Tools Service project 2016-08-26 10:15:23 -07:00
Mitchell Sternke
015bb26d9a Merge branch 'dev' into feature/listDatabases 2016-08-25 16:52:35 -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
Mitchell Sternke
b4df9de238 Convert member to property 2016-08-24 16:06:40 -07:00
Mitchell Sternke
7d3d593a80 Added request to list databases on the server for the current connection 2016-08-24 16:03:08 -07:00
Leila Lali
02518e022e Merge pull request #30 from Microsoft/feature/languageclient20
Upgrading to language server protocol 2.0
2016-08-24 16:02:27 -07:00
Benjamin Russell
df1772ff45 Merge pull request #25 from Microsoft/feature/queryBatchProcessing
Feature: Batch Separator Support for Query Execution
2016-08-24 15:28:32 -07:00
Benjamin Russell
0371e17028 Changes to fix code review comments and bug with handling empty batches 2016-08-24 15:25:13 -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
Mitchell Sternke
aac9f40ad2 Merge pull request #27 from Microsoft/feature/connectionInnerExceptions
Added inner exceptions on connection failure and fixed a param validation bug
2016-08-23 10:25:58 -07:00
Mitchell Sternke
14399ede65 Added inner exceptions on connection failure and fixed a param validation bug 2016-08-22 16:26:02 -07:00
Leila Lali
ebfc5c57a5 Fixing some issues, added documents 2016-08-22 15:32:41 -07:00
Leila Lali
3f1d3cb9db Added a new request handler to return back the service version 2016-08-22 15:08:44 -07:00
benrr101
48c7bbaa9f Changing SqlParser version to a version with internals visible 2016-08-22 13:41:41 -07:00
benrr101
51defc1032 Adding correct line numbers for errors 2016-08-22 13:04:12 -07:00
benrr101
91ed9aea59 Cleanup for comments/copyright 2016-08-22 12:04:43 -07:00
Mitchell Sternke
4631f2083e Merge pull request #23 from Microsoft/bug/intellisenseCacheTestFix
Fixed bug in intellisense cache test
2016-08-22 10:25:25 -07:00