Add target platform as an option in create project api (#16035)

* add target platform as an option in create project api

* add test

* move constant
This commit is contained in:
Kim Santiago
2021-07-12 15:14:33 -07:00
committed by GitHub
parent 9fc2cff654
commit affe3a838b
8 changed files with 82 additions and 40 deletions

View File

@@ -18,9 +18,10 @@ declare module 'sqldbproj' {
* @param name name of the project
* @param location the parent directory
* @param projectTypeId the ID of the project/template
* @param targetPlatform the target platform for the project. Default is SQL Server 2019
* @returns Uri of the newly created project file
*/
createProject(name: string, location: vscode.Uri, projectTypeId: string): Promise<vscode.Uri>;
createProject(name: string, location: vscode.Uri, projectTypeId: string, targetPlatform: SqlTargetPlatform): Promise<vscode.Uri>;
/**
* Opens and loads a .sqlproj file
@@ -130,4 +131,19 @@ declare module 'sqldbproj' {
fsUri: vscode.Uri;
relativePath: string;
}
/**
* Target platforms for a sql project
*/
export const enum SqlTargetPlatform {
sqlServer2005 = 'SQL Server 2005',
sqlServer2008 = 'SQL Server 2008',
sqlServer2012 = 'SQL Server 2012',
sqlServer2014 = 'SQL Server 2014',
sqlServer2016 = 'SQL Server 2016',
sqlServer2017 = 'SQL Server 2017',
sqlServer2019 = 'SQL Server 2019',
sqlAzure = 'Microsoft Azure SQL Database',
sqlDW = 'Microsoft Azure SQL Data Warehouse'
}
}