change enum type to conform to new connection (#1053)

This commit is contained in:
Anthony Dresser
2018-04-04 11:40:14 -07:00
committed by Abbie Petchtes
parent 6dca896768
commit 0315020cf0
8 changed files with 52 additions and 51 deletions

14
src/sql/sqlops.d.ts vendored
View File

@@ -330,13 +330,13 @@ declare module 'sqlops' {
}
export enum ServiceOptionType {
string = 0,
multistring = 1,
password = 2,
number = 3,
category = 4,
boolean = 5,
object = 6
string = 'string',
multistring = 'multistring',
password = 'password',
number = 'number',
category = 'category',
boolean = 'boolean',
object = 'object'
}
export enum ConnectionOptionSpecialType {

View File

@@ -6,13 +6,13 @@
// SQL added extension host types
export enum ServiceOptionType {
string = 0,
multistring = 1,
password = 2,
number = 3,
category = 4,
boolean = 5,
object = 6
string = 'string',
multistring = 'multistring',
password = 'password',
number = 'number',
category = 'category',
boolean = 'boolean',
object = 'object'
}
export enum ConnectionOptionSpecialType {

View File

@@ -11,6 +11,7 @@ import { ContextKeyServiceStub } from 'sqltest/stubs/contextKeyServiceStub';
import * as sqlops from 'sqlops';
import * as TypeMoq from 'typemoq';
import * as assert from 'assert';
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
suite('Advanced properties dialog tests', () => {
var advancedController: AdvancedPropertiesController;
@@ -29,7 +30,7 @@ suite('Advanced properties dialog tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: null,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'b1',
@@ -41,7 +42,7 @@ suite('Advanced properties dialog tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: null,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'noType',
@@ -53,7 +54,7 @@ suite('Advanced properties dialog tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: null,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'a2',
@@ -65,7 +66,7 @@ suite('Advanced properties dialog tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: null,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'b2',
@@ -77,7 +78,7 @@ suite('Advanced properties dialog tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: null,
valueType: 0
valueType: ServiceOptionType.string
}
];
});

View File

@@ -10,7 +10,7 @@ import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile
import { IConnectionProfile, IConnectionProfileStore } from 'sql/parts/connection/common/interfaces';
import * as sqlops from 'sqlops';
import * as assert from 'assert';
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
import { ConnectionOptionSpecialType, ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
import { CapabilitiesTestService } from 'sqltest/stubs/capabilitiesTestService';
import { ConnectionProviderProperties } from 'sql/workbench/parts/connection/common/connectionProviderExtension';
@@ -61,7 +61,7 @@ suite('SQL ConnectionProfileInfo tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.serverName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'databaseName',
@@ -73,7 +73,7 @@ suite('SQL ConnectionProfileInfo tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.databaseName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'userName',
@@ -85,7 +85,7 @@ suite('SQL ConnectionProfileInfo tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.userName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'authenticationType',
@@ -97,7 +97,7 @@ suite('SQL ConnectionProfileInfo tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.authType,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'password',
@@ -109,7 +109,7 @@ suite('SQL ConnectionProfileInfo tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.password,
valueType: 0
valueType: ServiceOptionType.string
}
];
msSQLCapabilities = {

View File

@@ -19,7 +19,7 @@ import * as sqlops from 'sqlops';
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
import { Emitter } from 'vs/base/common/event';
import { ConnectionProfileGroup, IConnectionProfileGroup } from 'sql/parts/connection/common/connectionProfileGroup';
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
import { ConnectionOptionSpecialType, ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
import { CapabilitiesTestService } from '../../stubs/capabilitiesTestService';
import { ConnectionProviderProperties } from 'sql/workbench/parts/connection/common/connectionProviderExtension';
@@ -108,7 +108,7 @@ suite('SQL ConnectionStore tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.serverName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'databaseName',
@@ -120,7 +120,7 @@ suite('SQL ConnectionStore tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.databaseName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'userName',
@@ -132,7 +132,7 @@ suite('SQL ConnectionStore tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.userName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'authenticationType',
@@ -144,7 +144,7 @@ suite('SQL ConnectionStore tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.authType,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'password',
@@ -156,7 +156,7 @@ suite('SQL ConnectionStore tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.password,
valueType: 0
valueType: ServiceOptionType.string
}
];
msSQLCapabilities = {

View File

@@ -17,7 +17,7 @@ import * as sqlops from 'sqlops';
import * as TypeMoq from 'typemoq';
import * as assert from 'assert';
import { ServerTreeView } from 'sql/parts/registeredServer/viewlet/serverTreeView';
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
import { ConnectionOptionSpecialType, ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
import Event, { Emitter } from 'vs/base/common/event';
import { CapabilitiesService } from 'sql/services/capabilities/capabilitiesService';
import { CapabilitiesTestService } from 'sqltest/stubs/capabilitiesTestService';
@@ -141,7 +141,7 @@ suite('SQL Object Explorer Service tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.serverName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'databaseName',
@@ -153,7 +153,7 @@ suite('SQL Object Explorer Service tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.databaseName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'userName',
@@ -165,7 +165,7 @@ suite('SQL Object Explorer Service tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.userName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'authenticationType',
@@ -177,7 +177,7 @@ suite('SQL Object Explorer Service tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.authType,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'password',
@@ -189,7 +189,7 @@ suite('SQL Object Explorer Service tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.password,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'encrypt',
@@ -201,7 +201,7 @@ suite('SQL Object Explorer Service tests', () => {
isIdentity: false,
isRequired: false,
specialValueType: undefined,
valueType: 0
valueType: ServiceOptionType.string
}
]
};

View File

@@ -10,7 +10,7 @@ import { ProviderConnectionInfo } from 'sql/parts/connection/common/providerConn
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
import * as sqlops from 'sqlops';
import * as assert from 'assert';
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
import { ConnectionOptionSpecialType, ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
import { ICapabilitiesService } from 'sql/services/capabilities/capabilitiesService';
import { CapabilitiesTestService } from 'sqltest/stubs/capabilitiesTestService';
@@ -48,7 +48,7 @@ suite('SQL ProviderConnectionInfo tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.serverName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'databaseName',
@@ -60,7 +60,7 @@ suite('SQL ProviderConnectionInfo tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.databaseName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'userName',
@@ -72,7 +72,7 @@ suite('SQL ProviderConnectionInfo tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.userName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'authenticationType',
@@ -84,7 +84,7 @@ suite('SQL ProviderConnectionInfo tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.authType,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'password',
@@ -96,7 +96,7 @@ suite('SQL ProviderConnectionInfo tests', () => {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.password,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'encrypt',
@@ -108,7 +108,7 @@ suite('SQL ProviderConnectionInfo tests', () => {
isIdentity: false,
isRequired: false,
specialValueType: undefined,
valueType: 0
valueType: ServiceOptionType.string
}
];
msSQLCapabilities = {

View File

@@ -7,7 +7,7 @@
import * as sqlops from 'sqlops';
import { ConnectionManagementInfo } from 'sql/parts/connection/common/connectionManagementInfo';
import { ICapabilitiesService, clientCapabilities, ProviderFeatures } from 'sql/services/capabilities/capabilitiesService';
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
import { ConnectionOptionSpecialType, ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
import Event, { Emitter } from 'vs/base/common/event';
import { Action } from 'vs/base/common/actions';
@@ -33,7 +33,7 @@ export class CapabilitiesTestService implements ICapabilitiesService {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.serverName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'databaseName',
@@ -45,7 +45,7 @@ export class CapabilitiesTestService implements ICapabilitiesService {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.databaseName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'userName',
@@ -57,7 +57,7 @@ export class CapabilitiesTestService implements ICapabilitiesService {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.userName,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'authenticationType',
@@ -69,7 +69,7 @@ export class CapabilitiesTestService implements ICapabilitiesService {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.authType,
valueType: 0
valueType: ServiceOptionType.string
},
{
name: 'password',
@@ -81,7 +81,7 @@ export class CapabilitiesTestService implements ICapabilitiesService {
isIdentity: true,
isRequired: true,
specialValueType: ConnectionOptionSpecialType.password,
valueType: 0
valueType: ServiceOptionType.string
}
];
let msSQLCapabilities = {