resend previous PR with test fixes (#19912)

* Revert "Revert "use reliable way to detect createtable statements (#19897)" (#19906)"

This reverts commit c211fb981c.

* fix tests

* fix test cases
This commit is contained in:
Alan Ren
2022-07-02 11:25:09 -07:00
committed by GitHub
parent 60026a39f9
commit 416e607f32
11 changed files with 80 additions and 19 deletions

View File

@@ -130,4 +130,15 @@ export class DacFxService implements mssql.IDacFxService {
}
);
}
public async parseTSqlScript(filePath: string, databaseSchemaProvider: string): Promise<mssql.ParseTSqlScriptResult> {
const params: contracts.ParseTSqlScriptParams = { filePath, databaseSchemaProvider };
try {
const result = await this.client.sendRequest(contracts.ParseTSqlScriptRequest.type, params);
return result;
} catch (e) {
this.client.logFailedRequest(contracts.ParseTSqlScriptRequest.type, e);
throw e;
}
}
}