mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 09:59:47 -05:00
Adding bindings for SqlProject service getters (#22046)
* Getters * blank lines * STS bump * Fixing typos * updating contract ID
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user