Adding bindings for SqlProject service getters (#22046)

* Getters

* blank lines

* STS bump

* Fixing typos

* updating contract ID
This commit is contained in:
Benjin Dubishar
2023-02-27 15:01:04 -08:00
committed by GitHub
parent d48984fe13
commit febfe3718f
5 changed files with 238 additions and 10 deletions

View File

@@ -215,9 +215,9 @@ export class SqlProjectsService implements mssql.ISqlProjectsService {
* Get the cross-platform compatibility status for a project
* @param projectUri Absolute path of the project, including .sqlproj
*/
public async getCrossPlatformCompatibility(projectUri: string): Promise<mssql.GetCrossPlatformCompatiblityResult> {
public async getCrossPlatformCompatibility(projectUri: string): Promise<mssql.GetCrossPlatformCompatibilityResult> {
const params: contracts.SqlProjectParams = { projectUri: projectUri };
return await this.runWithErrorHandling(contracts.GetCrossPlatformCompatiblityRequest.type, params);
return await this.runWithErrorHandling(contracts.GetCrossPlatformCompatibilityRequest.type, params);
}
/**
@@ -313,6 +313,60 @@ export class SqlProjectsService implements mssql.ISqlProjectsService {
return await this.runWithErrorHandling(contracts.MoveSqlObjectScriptRequest.type, params);
}
/**
* getDatabaseReferences
* @param projectUri Absolute path of the project, including .sqlproj
*/
public async getDatabaseReferences(projectUri: string): Promise<mssql.GetDatabaseReferencesResult> {
const params: contracts.SqlProjectParams = { projectUri: projectUri };
return await this.runWithErrorHandling(contracts.GetDatabaseReferencesRequest.type, params);
}
/**
* getFolders
* @param projectUri Absolute path of the project, including .sqlproj
*/
public async getFolders(projectUri: string): Promise<mssql.GetFoldersResult> {
const params: contracts.SqlProjectParams = { projectUri: projectUri };
return await this.runWithErrorHandling(contracts.GetFoldersRequest.type, params);
}
/**
* getPostDeploymentScripts
* @param projectUri Absolute path of the project, including .sqlproj
*/
public async getPostDeploymentScripts(projectUri: string): Promise<mssql.GetScriptsResult> {
const params: contracts.SqlProjectParams = { projectUri: projectUri };
return await this.runWithErrorHandling(contracts.GetPostDeploymentScriptsRequest.type, params);
}
/**
* getPreDeploymentScripts
* @param projectUri Absolute path of the project, including .sqlproj
*/
public async getPreDeploymentScripts(projectUri: string): Promise<mssql.GetScriptsResult> {
const params: contracts.SqlProjectParams = { projectUri: projectUri };
return await this.runWithErrorHandling(contracts.GetPreDeploymentScriptsRequest.type, params);
}
/**
* getSqlCmdVariables
* @param projectUri Absolute path of the project, including .sqlproj
*/
public async getSqlCmdVariables(projectUri: string): Promise<mssql.GetSqlCmdVariablesResult> {
const params: contracts.SqlProjectParams = { projectUri: projectUri };
return await this.runWithErrorHandling(contracts.GetSqlCmdVariablesRequest.type, params);
}
/**
* getSqlObjectScripts
* @param projectUri Absolute path of the project, including .sqlproj
*/
public async getSqlObjectScripts(projectUri: string): Promise<mssql.GetScriptsResult> {
const params: contracts.SqlProjectParams = { projectUri: projectUri };
return await this.runWithErrorHandling(contracts.GetSqlObjectScriptsRequest.type, params);
}
private async runWithErrorHandling<P, R, E, RO>(type: RequestType<P, R, E, RO>, params: P): Promise<R> {
try {
const result = await this.client.sendRequest(type, params);