Class SqlExecutionHelperService
java.lang.Object
org.qubership.atp.mia.service.execution.SqlExecutionHelperService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteCommand(String query, String system) Executes SQL command.executeCommand(String query, String system, Map<String, String> additionalParams, boolean toLimitRecords) Executes SQL command.executeValidations(List<Validation> validations, Command command) Executes validations.Get NextBillDate.handleSingleQuery(String query, Server server, boolean toLimitRecords) Handle single query.booleanReset DB cashe for provided system.voidsaveSqlTableToFile(List<SqlResponse> sqlResponses) Save sql result to file.
-
Field Details
-
dbExecutionRecordsLimit
@Value("${db.execution.records.limit:50}") protected int dbExecutionRecordsLimit
-
-
Constructor Details
-
SqlExecutionHelperService
public SqlExecutionHelperService()
-
-
Method Details
-
executeCommand
@AtpJaegerLog public List<CommandResponse> executeCommand(String query, String system, Map<String, String> additionalParams, boolean toLimitRecords) Executes SQL command.- Parameters:
query- query or path to .sql file with queriessystem- system name- Returns:
CommandResponse
-
executeCommand
Executes SQL command.- Parameters:
query- query or path to .sql file with queriessystem- system name- Returns:
CommandResponse
-
executeValidations
@AtpJaegerLog public List<SqlResponse> executeValidations(List<Validation> validations, Command command) Executes validations. -
handleSingleQuery
@AtpJaegerLog public List<SqlResponse> handleSingleQuery(String query, Server server, boolean toLimitRecords) Handle single query.- Parameters:
query- queryserver- server- Returns:
- Sql Response
-
getNextBillDate
Get NextBillDate. -
resetDbCache
@AtpJaegerLog public boolean resetDbCache()Reset DB cashe for provided system.- Returns:
- true if execution is OK, false otherwise
-
saveSqlTableToFile
Save sql result to file.
-