To use this function add it to the class library file named OrchestratorPluginSQLService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: OrchestratorPluginSQLService.ts
Description: Orchestrator Function to Read Custom Query from an SQL Database
Private Function: SQLDatabaseReadCustomQuery
private SQLDatabaseReadCustomQuery(objSQLDatabase: SQLDatabase, strSQLQuery: string): SQLActiveRecord[] {
this.objLogger.debug(`SQLDatabase Read Custom SQL Query: \r\n${strSQLQuery}`);
let arrSQLActiveRecord: SQLActiveRecord[] = objSQLDatabase.readCustomQuery(strSQLQuery);
this.objLogger.info(`SQLDatabase Read Custom SQL Query Found ${arrSQLActiveRecord.length} SQLActiveRecord(s).`);
return arrSQLActiveRecord;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
