Commit Graph

136 Commits

Author SHA1 Message Date
Alan Ren
45f1d0db22 make the NodeTypeId nullable (#1972) 2023-03-27 19:18:07 -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
Alan Ren
dbe06a50d5 Expose parent node path of tree node (#1949)
* expose parent node path

* add comments
2023-03-17 11:11:40 -07:00
Alan Ren
f6fbceb5a0 set URN metadata (#1947) 2023-03-15 20:56:05 -07:00
Cheena Malhotra
187b6ecc14 Introduce AAD interactive auth mode (#1860) 2023-03-02 09:39:54 -08:00
Aasim Khan
e8d24f8e47 Moving out legacy schemas into their own folder (#1866) 2023-02-17 14:31:25 -08:00
Cheena Malhotra
74dd15c868 Address error IDE0270 after MsBuild update (#1865) 2023-02-16 16:15:30 -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
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
Charles Gagnon
ccaf5c4594 Fix null ref when expanding nodes from other providers (#1816)
* Fix null ref when expanding nodes from other providers

(cherry picked from commit 572a7b37b2a3651db5a101a8780c874c51b55b96)

* cleanup
2023-01-19 16:14:17 -08:00
Cheena Malhotra
ac460adfc3 Enable IsLedger only for SQL 2022 (#1804) 2023-01-09 17:47:27 -08:00
Cheena Malhotra
bd37bf84ce Add 'LedgerViewType' as supported property for SQL 2022 and Azure DBs (#1801) 2023-01-09 15:27:58 -08:00
Charles Gagnon
99cd3d2f65 Improve databases node error logging message (#1800)
* Improve databases node logging

* remove unused
2023-01-05 14:23:44 -08:00
Cheena Malhotra
5ad48a59f1 Exclude isLedger property check for Azure DBs for improving OE nodes expansion perf (#1798) 2023-01-05 12:00:14 -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
Cheena Malhotra
5cc3e6f657 Support updating access token when found expired for OE (#1772) 2022-11-28 17:42:05 -08:00
Cheena Malhotra
4866515bde Send Error Code with session failed notification (#1773) 2022-11-28 17:35:26 -08:00
Charles Gagnon
bd58d786b4 Bump SMO to 170.9.0 (#1766)
* Add logging

* SMO 170.9.0
2022-11-21 18:41:02 -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
006ac60923 Upgrade solution to .NET 6.0.9 (Build with .NET SDK v6.0.401) (#1692) 2022-09-16 11:27:52 -07:00
Alan Ren
6e007e6e68 preload database when database node is expanded (#1690) 2022-09-15 09:56:23 -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
Jordan Hays
c2b0e33c9c Update ledger object SubTypes so they can be utilized for context menu handling (#1677) 2022-09-08 12:24:36 -07:00
Jordan Hays
0bac89eaf2 Specifying Dropped Ledger Views folder as only valid for SQL 2022 and Azure (#1639) 2022-08-16 14:50:41 -07:00
Alan Ren
57b4c25395 set graph table types (#1633) 2022-08-12 15:57:01 -07:00
Jordan Hays
007e852f1a Add modifiable sort priority to OE nodes (#1627)
* modifiable sort priority, dropped ledger folders sorted to the bottom

* reorganizing dropped table and view objects in OE integration test

* update to Int32
2022-08-11 10:46:14 -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
Jordan Hays
d78ff94b31 Ledger Objects Representation in Object Explorer (#1615)
* support for ledger objects in OE

* generated sr files

* update versionKey to sql 2022 in test env config

* more 2019 to 2022 updates

* add sql2022 instead of replacing

* missed filter on table

* add logging

* more logging

* adding Script160Compat options for sql2022

Co-authored-by: Alan Ren <alanren@microsoft.com>
2022-08-05 10:53:17 -07:00
Alan Ren
38c2cd4482 introduce object type property to node (#1614) 2022-08-01 20:14:58 -07:00
Jordan Hays
be37dba620 removing string.Format redundancy to WriteLine calls (#1612) 2022-07-30 00:27:33 -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
Charles Gagnon
693bb0480a TreeNodeGenerator -> SmoTreeNodes (#1579)
* TreeNodeGenerator -> SmoTreeNodes

* space
2022-07-19 12:46:21 -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
Benjamin Russell
97a106c575 Removing a lot of redundant async/await wrappers (#1486)
* Removing a lot of redundant async/await wrappers

* Removing kusto changes
2022-06-05 08:26:21 -07:00
Charles Gagnon
048988e5d3 Add OE verbose logging (#1484)
* Add OE verbose logging

* verbose
2022-05-06 22:47:42 -07:00
Karl Burtram
853335df72 Revert "graph type logic for node sub type (#1440)" (#1468)
This reverts commit 553b9af36e.
2022-04-21 11:46:55 -07:00
Aditya Bist
553b9af36e graph type logic for node sub type (#1440) 2022-03-22 21:43:43 -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
Justin M
0c95a511d0 Fixed Azure Pipeline build warnings (#1254)
* Fixed Azure Pipeline build warnings

* Removed variable declaration in SmoScriptableOperationWithFullDbAccess catch block.
2021-10-04 13:30:43 -07:00
Karl Burtram
5d5debbad6 Enable scripting for subobjects such as triggers (#1237)
* WIP 1

* Cleanups

* Change how schema is appended in to urn

* Add comment and fix incorrect condition

* Add parent type name to support Views, etc.
2021-08-26 13:06:15 -07:00
Karl Burtram
63aa6758e8 Fix OE with dbpool connection (#1197)
* Fix OE with dbpool connection

* Remove extra whitespace

* Remove hard-coded number
2021-05-05 14:24:45 -07:00
BranislavGrbicMDCS
4ce9416219 removing server roles for sql od (#1107) 2020-10-30 08:15:29 -07:00
BranislavGrbicMDCS
3e98a2f17b [brgrbic] SqlOD changes for cloud Server Type and minor bug fixes (#1092)
* The ServerType of SQL OD in SMO is being changed to cloud. This is a minimal set of changes needed in sqltoolservice in order to keep everything working within ADS.

* SMO version update
2020-10-23 18:48:33 +02:00
Justin M
14f5a3e0f1 3278 Kusto Unit Test Refactor (#1053)
* 3278 Moved functions related to Metadata from DataSourceFactory to MetadataFactory.cs

* 3278 Refactored DataSourceFactory to not be static. Added IDataSourceFactory interface.

* 3278 Refactored IKustoIntellisenseHelper.cs to not be static. Added IKustoIntellisenseHelper.cs interface.

* 3278 Removed unused functions from Scripter and deleted ScripterCore.cs because it was unused. Refactored Scripter.cs methods to not be static and created IScripter.cs

* 3278 Refactored datsasourceConnectionFactory in ConnectionService to use MEF through the InitializeService function

* 3278 Refactored IAutoCompleteHelper to not be static and added IAutoCompleteHelper interface.

* 3278 Removed unused classes DatabaseFullAccessException and FeatureWithFullDbAccess. Refactored ObjectExplorerService to use ImportingConstructor attribute. Removed commented out in KustoResultsReader. Removed unused functions from DatabaseLocksManager. Removed unused IDataSourceConnectionFactory from ConnectionService

* 3278 Moved SqlConnectionOpener class to new file. Added new interfaces IConnectedBindingQueue.cs and ISqlConnectionOpener.cs Added sqlConnectionOpener to dependency in ConnectedBindingQueue.

* 3278 Removed needsMetadata param from ConnectedBindingQueue. Added param to AddConnectionContext where it's used

* 3278 Refactored ConnectedBindingQueue to use MEF. Refactored usages to run against interface.

* 3278 Corrected ServiceHost namespace. Removed unused dependency to sqlToolsContext in LanguageService. Updated dependency in MetadataService and LanguageService to IProtocolEndpoint instead of ServiceHost

* 3278 Added back NextResult function and summary to KustoResultsReader. Renamed instance to _instance in ConnectionService and DatabaseLocksManager to stay consistent. Changed OpenDataSourceConnection to private in ConnectionService

* 3278 Converted helper methods back to static and removed backing interfaces

* 3278 Reverted AdminService > InitializeService to use ServiceHost as param
2020-08-24 13:18:00 -07:00
Soheil Alizadeh
31659e1126 Prevent ArgumentNullException in refresh request (#963) 2020-06-14 23:24:31 -07:00