Adding sqlproj property bindings (#22106)

This commit is contained in:
Benjin Dubishar
2023-03-02 13:34:00 -08:00
committed by GitHub
parent 075b3cb35e
commit df9b0f7771
4 changed files with 116 additions and 0 deletions

View File

@@ -238,6 +238,25 @@ export class SqlProjectsService implements mssql.ISqlProjectsService {
return await this.runWithErrorHandling(contracts.UpdateProjectForCrossPlatformRequest.type, params);
}
/**
* Get the cross-platform compatibility status for a project
* @param projectUri Absolute path of the project, including .sqlproj
*/
public async getProjectProperties(projectUri: string): Promise<mssql.GetProjectPropertiesResult> {
const params: contracts.SqlProjectParams = { projectUri: projectUri };
return await this.runWithErrorHandling(contracts.GetProjectPropertiesRequest.type, params);
}
/**
* Set the DatabaseSource property of a .sqlproj file
* @param projectUri Absolute path of the project, including .sqlproj
* @param databaseSource Source of the database schema, used in telemetry
*/
public async setDatabaseSource(projectUri: string, databaseSource: string): Promise<azdata.ResultStatus> {
const params: contracts.SetDatabaseSourceParams = { projectUri: projectUri, databaseSource: databaseSource };
return await this.runWithErrorHandling(contracts.SetDatabaseSourceRequest.type, params);
}
/**
* Add a SQLCMD variable to a project
* @param projectUri Absolute path of the project, including .sqlproj