mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 17:23:45 -05:00
* Rebase from main branch * Made mssql a module * remove rpc specific stuff * Added create sas RPC call * Backup to url works now * Moved createSas RPC to the BlobService * Relocated createSas RPC from sql-dataprotocolclient to the mssql * After rebase * Removed duplicate symbol * Renamed Blob to AzureBlob and relocated CreateSasResponse to mssql extension * Removed AzureBlobProvider, removed AzureBlobService feature * renamed blob to azureblob, converted thenable to promise * Simplify API * fixes * docs update, blob to azureblob update * bumped sts version * Fix config Co-authored-by: chgagnon <chgagnon@microsoft.com>
49 lines
2.1 KiB
TypeScript
49 lines
2.1 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { AppContext } from './appContext';
|
|
import { IExtension, ICmsService, IDacFxService, ISchemaCompareService, MssqlObjectExplorerBrowser, ILanguageExtensionService, ISqlAssessmentService, ISqlMigrationService, IAzureBlobService } from 'mssql';
|
|
import * as constants from './constants';
|
|
import { MssqlObjectExplorerNodeProvider } from './objectExplorerNodeProvider/objectExplorerNodeProvider';
|
|
import * as azdata from 'azdata';
|
|
import { SqlToolsServer } from './sqlToolsServer';
|
|
|
|
export function createMssqlApi(context: AppContext, sqlToolsServer: SqlToolsServer): IExtension {
|
|
return {
|
|
get sqlToolsServicePath() {
|
|
return sqlToolsServer.installDirectory;
|
|
},
|
|
get cmsService() {
|
|
return context.getService<ICmsService>(constants.CmsService);
|
|
},
|
|
get dacFx() {
|
|
return context.getService<IDacFxService>(constants.DacFxService);
|
|
},
|
|
get schemaCompare() {
|
|
return context.getService<ISchemaCompareService>(constants.SchemaCompareService);
|
|
},
|
|
get languageExtension() {
|
|
return context.getService<ILanguageExtensionService>(constants.LanguageExtensionService);
|
|
},
|
|
getMssqlObjectExplorerBrowser(): MssqlObjectExplorerBrowser {
|
|
return {
|
|
getNode: (explorerContext: azdata.ObjectExplorerContext) => {
|
|
let oeProvider = context.getService<MssqlObjectExplorerNodeProvider>(constants.ObjectExplorerService);
|
|
return <any>oeProvider.findSqlClusterNodeByContext(explorerContext);
|
|
}
|
|
};
|
|
},
|
|
get sqlAssessment() {
|
|
return context.getService<ISqlAssessmentService>(constants.SqlAssessmentService);
|
|
},
|
|
get sqlMigration() {
|
|
return context.getService<ISqlMigrationService>(constants.SqlMigrationService);
|
|
},
|
|
get azureBlob() {
|
|
return context.getService<IAzureBlobService>(constants.AzureBlobService);
|
|
}
|
|
};
|
|
}
|