Commit Graph

288 Commits

Author SHA1 Message Date
Cheena Malhotra
463fc60330 Move back 'Shared' content to 'Hosting' assembly (#1967) 2023-03-24 15:07:02 -07:00
Chris LaFreniere
cccdbf0bef Address CA1829 (Avoiding Count LINQ method calls when equivalent + more efficient properties exist) (#1961)
* Address CA1829 (Avoid Count LINQ Method Calls)

* Remove other change

* CA1829 removal

* CA1829 (remove whitespace)
2023-03-23 21:06:49 -07:00
Cheena Malhotra
3ef3a0f022 Secure enclave touch ups (#1964) 2023-03-23 20:59:38 -07:00
Cheena Malhotra
187b6ecc14 Introduce AAD interactive auth mode (#1860) 2023-03-02 09:39:54 -08:00
Cheena Malhotra
c83f380b8e Improve secure enclaves error handling (#1880) 2023-02-28 13:31:40 -08:00
Aasim Khan
c26a2aea14 Adding schema based object folders in OE (#1849)
* Making node types automated

* Adding schema based OE

* added folder types in NodeTypes

* Fixing stuff

* Moving schema to parent and cleaning up some code

* Replacing strings with nameof

* Sorting nodetypes generated by tt

* Adding option to put folders after nodes

* Fixing folder and children order

* Fixing tests

* Formatting file

* Formatting tt files

* Fixing tt

* fixing types

* Update src/Microsoft.SqlTools.ServiceLayer/SqlContext/ObjectExplorerSettings.cs

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Fixing stuff

* Updating schema definitions and adding more logs

* Fixing copyright

* Adding Integration and Unit Tests

* Fixing test

---------

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
2023-02-14 13:40:51 -08:00
Benjin Dubishar
d0d67373d1 Adding support for database literal references for Dacpac and SqlProj references (#1858)
* fixing up some nullable spots

* Adding database literal support

* Adding tests and support for same database refs

* Fixing test

* merge laggard

* Split database reference tests up

* PR feedback

* Normalizing strings for cross-plat test passing

* Updating Projects nuget package

* Fixing up test
2023-02-10 11:36:31 -08:00
Alan Ren
15250a9178 make list databases return in their original order (#1859)
* return databases in their original order

* remove using statement

* fix unit tests

* fix error
2023-02-09 14:27:25 -08:00
Cheena Malhotra
8d119876d9 Update to .NET 7 SDK (#1792) 2023-02-07 17:53:36 -08:00
Karl Burtram
f288bee294 Make nullable warnings a per file opt-in (#1842)
* Make nullable warnings a per file opt-in

* Remove unneeded compiler directives

* Remove compiler directive for User Data
2023-02-03 18:10:07 -08:00
Karl Burtram
3c25549986 Initial WIP code for user management (#1838)
* Initial user management code

* WIP

* Fix whitespace

* WIP user objects

* WIP user objects

* Cleanup ported code

* WIP

* WIP

* Update the User contracts

* Additional cleanups

* Remove warning silencing which isn't intended for this PR

* Fix some warnings as error in CI
2023-01-31 21:12:53 -08:00
Hai Cao
bcf015f939 Fix datetimeoffset formatting (#1823) 2023-01-25 11:19:30 -08:00
Aasim Khan
b8581920b6 Adding extension service host for extension services (#1808) 2023-01-24 16:09:42 -08:00
Cheena Malhotra
ac460adfc3 Enable IsLedger only for SQL 2022 (#1804) 2023-01-09 17:47:27 -08:00
Cheena Malhotra
a8f9219f09 Introduce support for "Command Timeout" connection property (#1765) 2023-01-03 21:42:32 -08:00
Cheena Malhotra
eca0cc484c Add support for firewall rule name in request (#1791) 2022-12-16 09:04:14 -08:00
Hai Cao
1559b7c387 Make ParallelMessageProcessingTest stable by loose the assertion (#1786) 2022-12-13 15:01:01 -08:00
Hai Cao
f86ebae9b8 Re-enable parallel message processing (#1741)
* add flag to handler

* cleanup

* concurrency control

* add flag for handler setters

* update service flags

* fix event handlers

* more handlers

* make sure behavior is unchanged if flag is off

* cleanup

* add test case for parallel processing

* comments

* stop dispatcher in test

* add log for request lifespan

* cleanup and add comments

* correctly release semaphore

* remove deleted file from merge

* use await for semaphore release

* move handler invocation to await and adjust test

* cleanup exception handling and wrapper

* space

* loose assertion condition to make test stable
2022-12-11 00:05:33 -08:00
Alex Ma
7eee5180a2 Add change password function and handling (#1771)
* added ChangePassword to connectionService

* added changepasswordparams

* added more code

* added more changes to connectionservice

* added more changes

* added small test

* added changepasswordrequest

* added different ServerConnection constructor

* consolidated changepassword

* added exception catch

* added passwordChangeFail params

* added changePassword to it's own function

* simplified changePassword

* made fixes to test

* added new test

* added one additional connection test

* added response callback

* removed unnecessary SendError

* added localized empty password error

* added updated error messages

* added small fix to check

* added changes based on feedback

* added minor change

* fix tests

* renamed messages to errorDetails

* simplified error message

* small change to connectionservice message

* error message change

* added environment newline

* added error retry messages to STS

* added regex

* added newline handling
2022-12-07 14:24:26 -08:00
Cheena Malhotra
5cc3e6f657 Support updating access token when found expired for OE (#1772) 2022-11-28 17:42:05 -08:00
Karl Burtram
3a5935df99 Revert "Update to latest .Net SDK 7.0 (#1760)" (#1763)
This reverts commit 71cda5bbdc.
2022-11-15 11:29:41 -08:00
Karl Burtram
71cda5bbdc Update to latest .Net SDK 7.0 (#1760)
* Bump to SDK 7.0 and related updates

* More net 7 updates

* Install SDK 2.0 for ESRP

* Fix typo

* Address comment and update integration test script

* Disable new warnings from SDK update
2022-11-14 20:24:25 -08:00
Cheena Malhotra
36965f6355 Fix Comparable implementation for ConnectionDetails (#1739) 2022-10-31 18:32:40 -07:00
Cheena Malhotra
2f2f65c89f Fix tests to capture encrypt 'null' by default (#1738) 2022-10-28 12:39:34 -07:00
Cheena Malhotra
faaec187a7 Support Boolean type for Encrypt option value (#1737) 2022-10-27 14:32:22 -07:00
Cheena Malhotra
c0f8482e26 Update Microsoft.Data.SqlClient to v5.0.1 (#1708) 2022-10-24 20:10:04 -07:00
Benjamin Russell
af2c0c77e7 Export to Markdown Support (#1705)
* Adding file writer for Markdown tables. No testing yet.

* Unit tests for the markdown writer

* Wiring up the factory and and request types

* Wiring up changes for Markdown serialization in serialization service

* Couple last minute tweaks

* Changes as per PR comments

* Revert temp testing code. 🙈

* Fluent assertions in SerializationServiceTests.cs

Co-authored-by: Ben Russell <russellben@microsoft.com>
2022-09-27 11:55:43 -07:00
Cheena Malhotra
006ac60923 Upgrade solution to .NET 6.0.9 (Build with .NET SDK v6.0.401) (#1692) 2022-09-16 11:27:52 -07:00
Jordan Hays
8bdf1d8451 Dropped Ledger Columns folders for ledger primary tables (#1688)
* dropped ledger columns strings, nodetypes, definition

* work in progress

* WIP- dropped columns folder showing for all tables

* Dropped Ledger Column folder only for primary ledger tables

* cleaning up

* undoing changes to kusto layer

* formatting

* undoing formatting

* undoing formatting

* removing IsLedger property and instead filtering on NodeTypeId

* updating column path test
2022-09-14 17:43:39 -07:00
Alex Ma
54c1d0418a Added error message to validate connect params. (#1660)
* Added error message to validate connect params.

* removed connectionParam == null as ConnnectionCompleteParams cannot be nulled.

* Added ValidateConnectParams to other connection services

* removed message from error

* reverted change to connectionServiceCore

* added updated message

* restore null and added errormessage to GetConnectionCompleteParams

* fix for sr.xlf

* fix for tab

* another fix to tabs

* added message to connection complete error

* small fix
2022-08-30 14:24:44 -07:00
Jordan Hays
87ea866df0 Dropped Ledger Views folder (#1626)
* adding dropped ledger views to the OE hierarchy with ledger view naming and icons

* updating tests
2022-08-10 14:01:28 -07:00
Jordan Hays
485786f49e Dropped Ledger Tables Folder (#1625)
* support and testing for Dropped Ledger Table folder

* appending DroppedLedgerTables nodetype

* fixing unit tests

* undoing string.Empty
2022-08-09 14:17:51 -07:00
Charles Gagnon
fd00114a0e Catch Request/Event handler errors at dispatcher level (#1610)
* Catch Request/Event handler errors at dispatcher level

* Fix tests

* Use Exception overload of SendError

* Fix tests
2022-07-29 17:31:36 -07:00
Jordan Hays
3294a52ad9 Or Filtering on Object Explorer Nodes (#1608)
support for a more robust filtering system in the Object Explorer xml, allowing for or-ing filter properties together for use in URN querying for objects

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
2022-07-29 15:35:37 -07:00
Vladimir Chernov
2ae0d99900 SqlAssessment update to 1.1.9 (#1593)
* Sql Assessment version update to 1.1.9

* Unit test fix

* integration test fix
2022-07-19 15:19:39 -07:00
Charles Gagnon
15689b3c7c Add 2019 and 2022 to SqlServerType enum (#1583)
* Add 2019 and 2022 to SqlServerType enum

* Add note

* Add tests

* Fix template generation
2022-07-18 16:35:17 -07:00
Charles Gagnon
82118f6431 Add code coverage reporting (#1585)
* Add code coverage

* fix and add publishTestResults

* Use PublishTestResults

* Add coverlet.msbuild

* Generate report

* Update coverage report location

* Add one more
2022-07-18 15:31:47 -07:00
Cory Rivera
671310880b Clean up notebook export code (#1565)
* Add null checks when converting notebooks to SQL, and SQL to notebooks.

* Remove unnecessary newlines and spaces from multi-line comments.

* Use the current environment's newline characters when converting cell text to a SQL query.

* Add additional unit tests for notebook conversion.
2022-07-01 15:28:05 -07:00
Alex Ma
deae354f31 Fix for rowId not decrementing if reverting an create row (#1560)
* Decrement NextRowId if reverting addition of a row that is not committed yet.

* added test and message

* added fixed and extensive tests

* added assert messages
2022-06-27 14:47:46 -07:00
Charles Gagnon
dd11be3d38 Consolidate to net6.0 (#1547)
* Add SqlClient event listener

* comments

* ensure not disposed early

* initial

* net6.0

* undo
2022-06-21 08:53:23 -07:00
Alan Ren
17b6073c87 include additional data for error object (#1539)
* include additional data for error

* fix tests
2022-06-10 20:40:22 -07:00
Alex Ma
5e3d24bbfa Remove code coverage from STS (#1537)
* WIP removal of code coverage

* more coverage removed

* more fixes

* fix tests
2022-06-10 13:53:43 -07:00
Charles Gagnon
70be8f5ef5 Don't add parentheses to ANSI Scalar functions (#1487)
* Don't add parentheses to ANSI Scalar functions

* fix test
2022-05-09 18:57:14 -07:00
Hai Cao
24910c5b5c [Table Designer] api change for insert and move col (#1477)
* make api change for insert and move col
* bump DacFx
2022-05-06 15:00:34 -07:00
Nemanja Milovančević
881c335cdf Backup/Restore Managed Instance (#1428)
* Enabled backup to and restore from URL

* Created RPC, but when process tries to load Microsoft.Azure.Storage.Blob.dll, it crashes

* Added create shared access token

* Code refactor

* Minor changes

* Changed RPC path

* Moved createSas RPC to the newly created BlobService, fixed PR comments

* Added sas expiration date parameter to the RPC

* Added copyright headers

* Removed ConnectionInstance property from BlobService

* Removed unhelpful comment

* Removed unused using statements

* Changed copy/paste comments

* Disposable objects fix

* Small formatting fix

* Changed backup to/restore from url supported device types

* Added backup to url integration test

* Created restore integration test. Test are now getting azure blob params from env variables instead of file.

* Culture invariant epiration date param, fixed comment, and typo

* Updated headers

* PR comments fix

* Changed supported device type logic

* string localization fix

* String formatting fix

* build failure fix

* Typo

* Updated supported restore device types
2022-04-20 14:01:13 -07:00
Benjamin Russell
2ace786d95 Export headers in an empty result set (#1434)
* Minimal changes to make headers appear on empty result sets

* Columns for everyone!

* Updating tests - some don't pass yet

* Adding some more tests to verify the changes for column/row selection

* null default columns

* Updates to comments as per PR comments
2022-03-31 09:10:32 -07:00
Lewis Sanchez
8215d88dcf Adds new graph comparison request handler to the Execution Plan Service. (#1438)
* Adds new graph comparison request handler to the Execution Plan Service.

* Code review changes

* Renames execution plan compare params, result, and request classes.
2022-03-22 14:52:42 -07:00
Lewis Sanchez
f7b37091ca Renames ShowPlan directories along with corresponding namespaces (#1435)
* Renames ShowPlan directories along with corresponding namespaces

* Renames ShowPlanGraphUtils to ExecutionPlanGraphUtils

* Revert "Renames ShowPlanGraphUtils to ExecutionPlanGraphUtils"

This reverts commit 5dc2696ae906598447eed7360a3f342218432b83.

* Reverts show plan tests name change.

* Renames show plan test XML files.

* Renames ported directory to ShowPlan and updates namespace accordingly
2022-03-21 16:25:44 -07:00
Charles Gagnon
40c5d48c5e Fail build on unneeded usings (#1417) 2022-03-04 16:38:01 -08:00
Charles Gagnon
c248400a6c Add linting for copyright and unused usings (#1416)
* Add linting for copyright and unused usings

* Add one more + comment

* Enforce in build and fix errors

* Fix build
2022-03-04 15:17:29 -08:00