Update product references from 'sqlops' to 'azdata' (#4259)

* Update extensions to use azdata

* Switch core code to use azdata
This commit is contained in:
Karl Burtram
2019-03-01 13:59:37 -08:00
committed by GitHub
parent 220685a522
commit 84890eb1b4
371 changed files with 3208 additions and 3184 deletions

View File

@@ -12,7 +12,7 @@ import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
import { ProfilerInput } from 'sql/parts/profiler/editor/profilerInput';
import { ProfilerColumnEditorDialog } from 'sql/parts/profiler/dialog/profilerColumnEditorDialog';
import * as sqlops from 'sqlops';
import * as azdata from 'azdata';
import { TPromise } from 'vs/base/common/winjs.base';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
@@ -50,7 +50,7 @@ class TwoWayMap<T, K> {
export class ProfilerService implements IProfilerService {
private static readonly PROFILER_SERVICE_UI_STATE_STORAGE_KEY = 'profileservice.uiState';
public _serviceBrand: any;
private _providers = new Map<string, sqlops.ProfilerProvider>();
private _providers = new Map<string, azdata.ProfilerProvider>();
private _idMap = new TwoWayMap<ProfilerSessionID, string>();
private _sessionMap = new Map<ProfilerSessionID, IProfilerSession>();
private _connectionMap = new Map<ProfilerSessionID, IConnectionProfile>();
@@ -70,7 +70,7 @@ export class ProfilerService implements IProfilerService {
this._memento = this._context.getMemento(StorageScope.GLOBAL);
}
public registerProvider(providerId: string, provider: sqlops.ProfilerProvider): void {
public registerProvider(providerId: string, provider: azdata.ProfilerProvider): void {
this._providers.set(providerId, provider);
}
@@ -93,15 +93,15 @@ export class ProfilerService implements IProfilerService {
return TPromise.wrap(uri);
}
public onMoreRows(params: sqlops.ProfilerSessionEvents): void {
public onMoreRows(params: azdata.ProfilerSessionEvents): void {
this._sessionMap.get(this._idMap.reverseGet(params.sessionId)).onMoreRows(params);
}
public onSessionStopped(params: sqlops.ProfilerSessionStoppedParams): void {
public onSessionStopped(params: azdata.ProfilerSessionStoppedParams): void {
this._sessionMap.get(this._idMap.reverseGet(params.ownerUri)).onSessionStopped(params);
}
public onProfilerSessionCreated(params: sqlops.ProfilerSessionCreatedParams): void {
public onProfilerSessionCreated(params: azdata.ProfilerSessionCreatedParams): void {
this._sessionMap.get(this._idMap.reverseGet(params.ownerUri)).onProfilerSessionCreated(params);
this.updateMemento(params.ownerUri, { previousSessionName: params.sessionName });
}
@@ -114,7 +114,7 @@ export class ProfilerService implements IProfilerService {
return this._runAction(id, provider => provider.disconnectSession(this._idMap.get(id)));
}
public createSession(id: string, createStatement: string, template: sqlops.ProfilerSessionTemplate): Thenable<boolean> {
public createSession(id: string, createStatement: string, template: azdata.ProfilerSessionTemplate): Thenable<boolean> {
return this._runAction(id, provider => provider.createSession(this._idMap.get(id), createStatement, template)).then(() => {
this._sessionMap.get(this._idMap.reverseGet(id)).onSessionStateChanged({ isRunning: true, isStopped: false, isPaused: false });
return true;
@@ -157,7 +157,7 @@ export class ProfilerService implements IProfilerService {
});
}
private _runAction<T>(id: ProfilerSessionID, action: (handler: sqlops.ProfilerProvider) => Thenable<T>): Thenable<T> {
private _runAction<T>(id: ProfilerSessionID, action: (handler: azdata.ProfilerProvider) => Thenable<T>): Thenable<T> {
// let providerId = this._connectionService.getProviderIdFromUri(this._idMap.get(id));
let providerId = 'MSSQL';