Fix ArangoDB
This commit is contained in:
parent
27501b82e1
commit
2ed088e415
1 changed files with 56 additions and 53 deletions
|
|
@ -163,7 +163,7 @@ public class RequestService {
|
|||
}
|
||||
}
|
||||
|
||||
private Map<String, Object> buildSqlQuery(SqlRequest request, List<String> ids) {
|
||||
private Map<String, Object> buildSqlQuery(SqlRequest request, List<String> ids) {
|
||||
logger.debug("Starting building SQL query for request: {}", request.getRequestURL());
|
||||
long startExecTime = System.currentTimeMillis();
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
|
@ -219,7 +219,7 @@ private Map<String, Object> buildSqlQuery(SqlRequest request, List<String> ids)
|
|||
logger.debug("SQL query built in {} ms", endExecTime - startExecTime);
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private boolean executeSqlQuery(Connection connection, String query) throws SQLException {
|
||||
|
|
@ -338,14 +338,17 @@ private Map<String, Object> buildSqlQuery(SqlRequest request, List<String> ids)
|
|||
|
||||
Map<String, Object> bindVars = new HashMap<>();
|
||||
// TODO: verify correctness of received entities and compare keys
|
||||
Object writeEntity = entities.get(aqlCollectionWrite);
|
||||
bindVars.put("ids", entities);
|
||||
Object ids = entities.get(aqlCollectionWrite);
|
||||
bindVars.put("ids", ids);
|
||||
|
||||
AqlQueryOptions aqlQueryOptions = new AqlQueryOptions().streamTransactionId(transactionId);
|
||||
|
||||
try {
|
||||
arangoDb.query(requestURL, null, bindVars, aqlQueryOptions);
|
||||
|
||||
logger.info("Successfully removed {}: {}", aqlCollectionWrite, writeEntity);
|
||||
logger.info("Successfully removed {} for ids: {}", aqlCollectionWrite, ids);
|
||||
} catch (Exception e) {
|
||||
logger.error("Failed to execute AQL request: {}", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue