* 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
* Added unit tests for AdminService. Added interface for IConnectionService.
* Kusto connection map to ConnectionManager (#1258)
* Created ConnectionManager and moved connectionMap. Changed references from ConnectionService to ConnectionManager.
* Changed creation of ConnectionManager to MEF instead of Instance creation
* Added AzureMonitor to Microsoft.Kusto.ServiceLayer.
* Added Intellisense for AzureMonitor. Moved Intellisense logic from KustoIntellisenseClient to IntellisenseClientBase.
* Added ServiceName as a command parameter for starting Kusto.
* Added check to return null if connectionInfo is not in the connectionService.
* Added support for Dashboard in MetadataService and AdminService.
* Removed workspace id from databaseName for Monitor. Added logic for MetadataService and AdminService to return different information for AzureMonitor.
* Moved providerName and providerDescription to DataSourceFactory.
* Changed DatabaseName to include Name and Id. Changed ProviderName to LOGANALYTICS in DataSourceFactory
* Fixed unit tests
* Changed logic to use ServiceName instead of server to determine DataSourceType
* Code review feedback and reverted changes to ObjectExplorerService.
* Removed unused reference from HostLoader
* Changed Parallel.Invoke to await Task.Run
* Moved Kusto datasource and supporting classes to separate directory.
* Removed unused datasourceFactory from ConnectionService. Added GetDatabases and GetDatabaseInfo to IDataSource and child classes
* Renamed Instance variables in ObjectExplorerService. Removed unused attribute on TSqlFormatterService. Removed invalid comment in ConnectionService.
* Fixed warnings in build.
* Moved SizeInMB to DatabaseMetadata. Refactored ConvertToDatabaseInfo
* Fixed unit test
* Refactored Kusto.ServiceLayer to pass ConnectionDetails to DataSourceFactory instead of connection string. Created KustoConnectionDetails to map needed details to KustoClient.
* Removed unused ScriptingScriptOperation from KustoServiceLayer.
* Created DstsAuthenticationManager and moved logic for getting DstsToken. Updated error message for failing to create KustoConnection.
* Removed DstsAuthenticationManager.cs. Refactored DataSourceFactory to retrieve UserToken from ConnectionDetails.
* Renamed AzureAccountToken in ConnectionDetails to AccountToken. Changed mapping to KustoConnectionDetails based on the AccountToken.
* Removed Kusto.Data reference from ConnectionService and ScriptingListObjectsOperation. Moved creation of KustoConnectionStringBuilder to DataSourceFactory
* Added accountToken validation to DataSourceFactory Create.
* Renamed KustoConnectionDetails to DataSourceConnectionDetails. Renamed AzureToken to AuthToken.
* 4094 Upgraded Kusto.Data and Kusto.Language to 9.0.3. Refactored KustoServiceLayer to use KustoConnectionStringBuilder instead of Sql.
* 4094 Refactored KustoClient>Initialize to take connectionString as optional. Removed unused properties from ConnectionService>ParseConnectionString
* 4094 Updated Kusto.Data and Kusto.Language nuget packages to 9.0.4. Removed IsDedicatedAdminConnection function in ConnectionService.
* 4094 Fixed unit tests
* 3490 Injected OwnerUri into KustClient to store for token refreshing. Removed UpdateAzureToken from IDataSource, DataSourceBase, and KustoDataSource. Removed logic for retrying queries related to Unauthorized datasource in Batch and Query. Changed ScriptingService, ScriptingScriptOperation, and ScriptAsScriptingOperation to take DataSource in the constructor instead of datasourcefactory. Changed ScriptingService to inject ConnectionService through InitializeService function.
* 3490 Removed Catch block for DataSourceUnauthorizedException in ExecuteControlCommandAsync
* 3490 Removed OwnerUri from KustoClient and used azureAccountToken to refresh token in ConnectionService.
* 3490 Reverted unneeded changes.
* 3490 Split ExecuteQuery in KustoClient to execute first query then remaining queries after
* 3490 Passed OwnerUri down into KustoClient to refresh token.
* 3490 Removed DataSourceUnauthorizedException. Refactored ExecuteQuery to catch aggregate exception. Added RefreshAzureToken logic to ExecuteControlCommand
* 3490 Added logic to update ReliableDataSourceConnection azure token within ConnectionInfo.
* 3490 Add retry logic to ExecuteQuery and ExecuteControlCommand in KustoClient
* 3326 Removed sqlConnection.Open from CreateSqlConnection in ConnectionService.
* 3326 Removed unused variables and functions from ConnectedBindingContext, ConnectedBindingQueue, IBindingContext, and IConnectedBindingQueue
* 3326 Removed unused constant SqlAzureEdition and unused functions CreateSqlConnection and CreateServerConnection from ConnectionService. Removed ServerConnection, MetadataDisplayInfoProvider, Binder, and SmoMetaDataProvider from ConnectedBindingContext. Deleted SqlConnectionOpener and ISqlConnectionOpener.
* 3644 Created KustoClient to handle interaction with Kusto servers. Refactored KustoDataSource and moved execution logic into KustoClient.
* 3644 Added RequestSecurityTokenParams, RequestSecurityTokenResponse, and SecurityTokenRequest to Kusto. Moved intellisense functions from KustoDataSource to KustoIntellisenseHelper. Added SchemaState to readonly property on KustoDataSource. Added catch block to Batch.cs to catch KustoRequestExceptions.
* 3644 Removed unused reference from ConnectionDetails and ConnectedBindingContext. Added UpdateAzureToken function to IKustoClient, KustoClient, IDataSource, KustoDataSource, and KustoDataSource. Added dataSource.Dispose to ReliableDataSourceConnection > Close. Added RefreshAzureToken to ConnectionService to refresh azure token.
* 3644 Removed unused properties from RequestSecurityTokenParams and RequestSecurityTokenResponse
* 3644 Added default to DbColumnWrapper to UnknownTypeName when null. Moved database query logic from KustoIntellisenseHelper to KustoClient. Moved KustoIntellisenseHelper data objects out of class. Changed SchemaState to load through separate tasks.
* 3644 Changed ReRunQuery logic in Kusto Batch to flip back to false if the query fails a second time so it can be rejected
* 3644 Updated GetAutoCompleteSuggestions and GetHoverHelp with changes from main
* 3644 Added AccountId to RequestSecurityTokenParams and set value in ConnectionService. Added throw to Batch.cs to ensure exceptions that are non-Unauthorized bubble up to ADS.
* 3644 Changed KustoUnauthorizedException to take original exception as inner exception. Changed catch block to only throw KustoUnauthorizedException when FailureCode is 401
* 3644 Renamed KustoUnauthorizedException to DataSourceUnauthorizedException. Moved logic to throw exception down into KustoClient. Changed retryLogic in Batch.cs to a decrementing count
* 3644 Changed logic in Batch.cs for throwing InvalidOperationException
* 3278 Added unit tests in MetadataFactoryTests and Microsoft.Kusto.ServiceLayer.UnitTests project
* 3278 Removed todo and changed unit test to validate megabytes
* 3278 Added file and unit tests in AutoCompleteHelperTests.cs
* 3278 Removed unused functions from Kusto > ScriptAsScriptingOperation
* 3278 Added unit tests for DataSourceFactory
* 3278 Refactored AdminService to pass in ConnectionService rather than through instance variable. Added unit test for AdminServiceTests
* 3278 Refactored DataSourceFactory to not have static functions for future unit tests
* 3278 Re-added properties that were flagged as unused but are being used by ADS in ReliableDataSourceConnection.cs
* 3278 Re-added properties that were flagged as unused but are being used by ADS in ReliableDataSourceConnection.cs
* adding pipeline to execute tests (#1062)
* 3278 Converted GetDefaultAutoComplete and GetDefaultSemanticMarkers to static functions in DataSourceFactory. Removed unused constructor in ScriptFile. Added positive unit tests for both functions
* undoing release version bump
* adding additional configs
* adressing feedback
* Correcting path in csproj
Co-authored-by: Jorge Berumen <52225468+joberume@users.noreply.github.com>
Co-authored-by: joberume <jberumen3@miners.utep.edu>
* 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
* Copy smoModel some rename
* Copy entire service layer
* Building copy
* Fixing some references
* Launch profile
* Resolve namespace issues
* Compiling tests. Correct manifest.
* Fixing localization resources
* ReliableKustoClient
* Some trimming of extra code and Kusto code
* Kusto client creation in bindingContent
* Removing Smo and new Kusto classes
* More trimming
* Kusto schema hookup
* Solidying DataSource abstraction
* Solidifying further
* Latest refatoring
* More refactoring
* Building and launching Kusto service layer
* Working model which enumerates databases
* Refactoring to pass IDataSource to all tree nodes
* Removing some dependencies on the context
* Working with tables and schema
* Comment checkin
* Refactoring to give out select script
* Query created and sent back to ADS
* Fix query generation
* Fix listing of databases
* Tunneling the query through.
* Successful query execution
* Return only results table
* Deleting Cms
* Delete DacFx
* Delete SchemaCompare and TaskServices
* Change build definition to not stop at launch
* Fix error after merge
* Save Kusto results in different formats (#935)
* save results as csv etc
* some fixes
Co-authored-by: Monica Gupta <mogupt@microsoft.com>
* 2407 Added OrderBy clause in KustoDataSource > GetDatabaseMetaData and GetColumnMetadata (#959)
* 2405 Defaulted Options when setting ServerInfo in ConnectionService > GetConnectionCompleteParams (#965)
* 2747 Fixed IsUnknownType error for Kusto (#989)
* 2747 Removed unused directives in Kusto > DbColumnWrapper. Refactored IsUnknownType to handle null DataTypeName
* 2747 Reverted IsUnknownType change in DbColumnWrapper. Changed DataTypeName to get calue from ColumnType. Refactored SafeGetValue to type check before hard casting to reduce case exceptions.
* Added EmbeddedResourceUseDependentUponConvention to Microsoft.Kusto.ServiceLayer.csproj. Also renamed DACfx to match Microsoft.SqlTools.ServiceLayer. Added to compile Exclude="**/obj/**/*.cs"
* Srahman cleanup sql code (#992)
* Removed Management and Security Service Code.
* Remove FileBrowser service
* Comment why we are using SqlServer library
* Remove SQL specific type definitions
* clean up formatter service (#996)
Co-authored-by: Monica Gupta <mogupt@microsoft.com>
* Code clean up and Kusto intellisense (#994)
* Code clean up and Kusto intellisense
* Addressed few comments
* Addressed few comments
* addressed comments
Co-authored-by: Monica Gupta <mogupt@microsoft.com>
* Return multiple tables for Kusto
* Changes required for Kusto manage dashboard (#1039)
* Changes required for manage dashboard
* Addressed comments
Co-authored-by: Monica Gupta <mogupt@microsoft.com>
* 2728 Kusto function support (#1038)
* loc update (#914)
* loc update
* loc updates
* 2728 moved ColumnInfo and KustoResultsReader to separate files. Added Folder and Function to TreeNode.cs
* 2728 Added FunctionInfo. Added Folder to ColumnInfo. Removed partial class from KustoResultsReader. Set Function.IsAlwaysLeaf=true in TreeNode.cs. In KustoDataSource changed tableMetadata type to TableMetaData. Added folder and function dictionaries. Refactored GetSchema function. Renamed GenerateColumnMetadataKey to GenerateMetadataKey
* 2728 Added FunctionInfo. Added Folder to ColumnInfo. Removed partial class from KustoResultsReader. Set Function.IsAlwaysLeaf=true in TreeNode.cs. In KustoDataSource changed tableMetadata type to TableMetaData. Added folder and function dictionaries. Refactored GetSchema function. Renamed GenerateColumnMetadataKey to GenerateMetadataKey
* 2728 Created new SqlConnection within using block. Refactored KustoDataSource > columnmetadata to sort on get instead of insert.
* 2728 Added GetFunctionInfo function to KustoDataSource.
* 2728 Reverted change to Microsoft.Kusto.ServiceLayer.csproj from merge
* 2728 Reverted change to SqlTools.ServiceLayer\Localization\transXliff
* 2728 Reverted change to sr.de.xlf and sr.zh-hans.xlf
* 2728 Refactored KustoDataSource Function folders to support subfolders
* 2728 Refactored KustoDataSource to use urn for folders, functions, and tables instead of name.
* Merge remote-tracking branch 'origin/main' into feature-ADE
# Conflicts:
# Packages.props
* 2728 Moved metadata files into Metadata subdirectory. Added GenerateAlterFunction to IDataSource and DataSourceBase.
* 2728 Added summary information to SafeAdd in SystemExtensions. Renamed local variable in SetTableMetadata
* 2728 Moved SafeAdd from SystemExtensions to KustoQueryUtils. Added check when getting database schema to return existing records before querying again. Added AddRange function to KustoQueryUtils. Created SetFolderMetadataForFunctions method.
* 2728 Added DatabaseKeyPrefix to only return tables to a database for the dashboard. Added logic to store all database tables within the tableMetadata dictionary for the dashboard.
* 2728 Created TableInfo and moved info objects into Models directory. Refactored KustoDataSource to lazy load columns for tables. Refactored logic to load tables using cslschema instead of schema.
* 2728 Renamed LoadColumnSchema to GetTableSchema to be consistent.
Co-authored-by: khoiph1 <khoiph@microsoft.com>
* Addressed comments
Co-authored-by: Shafiq Rahman <srahman@microsoft.com>
Co-authored-by: Monica Gupta <mogupt@microsoft.com>
Co-authored-by: Justin M <63619224+JustinMDotNet@users.noreply.github.com>
Co-authored-by: rkselfhost <rkselfhost@outlook.com>
Co-authored-by: khoiph1 <khoiph@microsoft.com>