Skip to content

Commit

Permalink
Merge pull request #29 from YoussefDahi/develop
Browse files Browse the repository at this point in the history
Edit :
  • Loading branch information
usfalami authored Oct 9, 2023
2 parents c1c702e + a13dd1e commit 6b384b9
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 67 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/usf/trace/api/server/ApiController.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public List<ApiSession> getIncomingRequestByCriteria(
@RequestParam(required = false, name = "port") String[] port,
@RequestParam(required = false, name = "start") Instant start,
@RequestParam(required = false, name = "end") Instant end ){ // without tree
FilterCriteria fc = new FilterCriteria(id,null,name,env,port,null,start,end);
FilterCriteria fc = new FilterCriteria(id,name,env,port,null,start,end);
System.out.println(fc.toString());
return dao.getIncomingRequestByCriteria(lazy,fc);
}
Expand All @@ -92,7 +92,7 @@ public List<MainSession> getMainRequestByCriteria(
@RequestParam(required = false, name = "start") Instant start,
@RequestParam(required = false, name = "end") Instant end ) {

FilterCriteria fc = new FilterCriteria(null,id,null,env,null,launchMode,start,end);
FilterCriteria fc = new FilterCriteria(id,null,env,null,launchMode,start,end);
return dao.getMainRequestByCriteria(lazy,fc);
}

Expand Down
12 changes: 4 additions & 8 deletions src/main/java/org/usf/trace/api/server/FilterCriteria.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
@AllArgsConstructor
public class FilterCriteria {

private final String[] idIncoming; //

private final String[] idMain;
private final String[] idSession; //
private final String[] name;
private final String[] env;
private final String[] port;
Expand All @@ -33,8 +31,7 @@ public class FilterCriteria {
private final Instant end;


public String toSql(Filters idIncomingColname,
Filters idMainColname,
public String toSql(Filters idSession,
Filters nameColname,
Filters envColname,
Filters portColname,
Expand All @@ -45,8 +42,7 @@ public String toSql(Filters idIncomingColname,
Collection<Integer> argTypes) {

var sql = " WHERE 1 = 1";
sql += toSql(idIncomingColname,args,argTypes,getIdIncoming());
sql += toSql(idMainColname,args,argTypes,getIdMain());
sql += toSql(idSession,args,argTypes,getIdSession());
sql += toSql(nameColname,args,argTypes,getName());
sql += toSql(envColname,args,argTypes,getEnv());
sql += toSql(portColname,args,argTypes,getPort());
Expand Down Expand Up @@ -101,7 +97,7 @@ String endToSql(Filters end , Collection<Object> args, Collection<Integer> argTy
@Override
public String toString() {
return "FilterCriteria{" +
"id=" + Arrays.toString(idIncoming) +
"id=" + Arrays.toString(idSession) +
", host=" + Arrays.toString(name) +
", env=" + Arrays.toString(env) +
", port=" + Arrays.toString(port) +
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/org/usf/trace/api/server/Filters.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@


public enum Filters {
ID_IN_REQ(VARCHAR),
ID_MAIN_REQ(VARCHAR),
ID_SES(VARCHAR),
VA_APP_NME(VARCHAR),
VA_ENV(VARCHAR),
CD_PRT(INTEGER),
Expand Down
68 changes: 34 additions & 34 deletions src/main/java/org/usf/trace/api/server/RequestDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void saveSessions(List<Session> sessions) {
}

private void addMainRequest(List<MainSession> reqList) {
template.batchUpdate("INSERT INTO E_MAIN_REQ(ID_MAIN_REQ,VA_NAME,VA_USR,DH_DBT,DH_FIN,LNCH,LOC,VA_THRED,VA_APP_NME,VA_VRS,VA_ADRS,VA_ENV,VA_OS,VA_RE,VA_ERR_CLS,VA_ERR_MSG)"
template.batchUpdate("INSERT INTO E_MAIN_SES(ID_SES,VA_NAME,VA_USR,DH_DBT,DH_FIN,LNCH,LOC,VA_THRED,VA_APP_NME,VA_VRS,VA_ADRS,VA_ENV,VA_OS,VA_RE,VA_ERR_CLS,VA_ERR_MSG)"
+ " VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", reqList, reqList.size(), (ps, o) -> {
var app = nullableApplication(o.getApplication());
var exp = nullableException(o.getException());
Expand All @@ -76,7 +76,7 @@ private void addMainRequest(List<MainSession> reqList) {
}

private void addIncomingRequest(List<ApiSession> reqList) {
template.batchUpdate("INSERT INTO E_IN_REQ(ID_IN_REQ,VA_MTH,VA_PRTCL,VA_HST,CD_PRT,VA_PTH,VA_QRY,VA_CNT_TYP,VA_AUTH,CD_STT,VA_I_SZE,VA_O_SZE,DH_DBT,DH_FIN,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,VA_API_NME,VA_USR,VA_APP_NME,VA_VRS,VA_ADRS,VA_ENV,VA_OS,VA_RE)"
template.batchUpdate("INSERT INTO E_API_SES(ID_SES,VA_MTH,VA_PRTCL,VA_HST,CD_PRT,VA_PTH,VA_QRY,VA_CNT_TYP,VA_AUTH,CD_STT,VA_I_SZE,VA_O_SZE,DH_DBT,DH_FIN,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,VA_API_NME,VA_USR,VA_APP_NME,VA_VRS,VA_ADRS,VA_ENV,VA_OS,VA_RE)"
+ " VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", reqList, reqList.size(), (ps, o) -> {
var app = nullableApplication(o.getApplication());
var exp = nullableException(o.getException());
Expand Down Expand Up @@ -109,7 +109,7 @@ private void addIncomingRequest(List<ApiSession> reqList) {
}

private void addOutcomingRequest(List<OutcomingRequestWrapper> reqList) {
template.batchUpdate("INSERT INTO E_OUT_REQ(ID_OUT_REQ,VA_MTH,VA_PRTCL,VA_HST,CD_PRT,VA_PTH,VA_QRY,VA_CNT_TYP,VA_AUTH,CD_STT,VA_I_SZE,VA_O_SZE,DH_DBT,DH_FIN,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,CD_IN_REQ)"
template.batchUpdate("INSERT INTO E_API_REQ(CD_API,VA_MTH,VA_PRTCL,VA_HST,CD_PRT,VA_PTH,VA_QRY,VA_CNT_TYP,VA_AUTH,CD_STT,VA_I_SZE,VA_O_SZE,DH_DBT,DH_FIN,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,CD_SES)"
+ " VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", reqList, reqList.size(), (ps, o) -> {
var exp = nullableException(o.getException());
ps.setString(1, o.getId());
Expand All @@ -134,7 +134,7 @@ private void addOutcomingRequest(List<OutcomingRequestWrapper> reqList) {
}

public void addOutcomingStages(List<OutcomingStagesWrapper> stagesList){
template.batchUpdate("INSERT INTO E_OUT_STG(VA_NAME,LOC,DH_DBT,DH_FIN,VA_USR,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,CD_IN_REQ)"
template.batchUpdate("INSERT INTO E_STG(VA_NAME,LOC,DH_DBT,DH_FIN,VA_USR,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,CD_SES)"
+ " VALUES(?,?,?,?,?,?,?,?,?)", stagesList,stagesList.size(),(ps,o)-> {
var exp = nullableException(o.getException());
ps.setString(1,o.getName());
Expand All @@ -150,9 +150,9 @@ public void addOutcomingStages(List<OutcomingStagesWrapper> stagesList){
}

private void addOutcomingQueries(List<OutcomingQueryWrapper> qryList) {
var maxId = template.queryForObject("SELECT COALESCE(MAX(ID_OUT_QRY), 0) FROM E_OUT_QRY", Long.class);
var maxId = template.queryForObject("SELECT COALESCE(MAX(ID_OUT_QRY), 0) FROM E_DB_REQ", Long.class);
var inc = new AtomicLong(maxId);
template.batchUpdate("INSERT INTO E_OUT_QRY(ID_OUT_QRY,VA_HST,VA_SCHMA,DH_DBT,DH_FIN,VA_USR,VA_THRED,VA_DRV,VA_DB_NME,VA_DB_VRS,VA_CMPLT,CD_IN_REQ)"
template.batchUpdate("INSERT INTO E_DB_REQ(ID_OUT_QRY,VA_HST,VA_SCHMA,DH_DBT,DH_FIN,VA_USR,VA_THRED,VA_DRV,VA_DB_NME,VA_DB_VRS,VA_CMPLT,CD_SES)"
+ " VALUES(?,?,?,?,?,?,?,?,?,?,?,?)", qryList, qryList.size(), (ps, o) -> {
ps.setLong(1, inc.incrementAndGet());
ps.setString(2, o.getHost());
Expand Down Expand Up @@ -186,12 +186,12 @@ private void addDatabaseActions(List<OutcomingQueryWrapper> queries) {

@Deprecated // reuse RequestDao::outcomingRequests using criteria
public ApiRequest getOutcomingRequestById(String id) {
return template.query("SELECT ID_OUT_REQ,VA_PRTCL,VA_HST,CD_PRT,VA_PTH,VA_QRY,VA_MTH,CD_STT,VA_I_SZE,VA_O_SZE,DH_DBT,DH_FIN,VA_THRED,CD_IN_REQ FROM E_OUT_REQ"
+ " WHERE ID_OUT_REQ = ? ", new Object[]{id}, newArray(1, VARCHAR), rs -> {
return template.query("SELECT CD_API,VA_PRTCL,VA_HST,CD_PRT,VA_PTH,VA_QRY,VA_MTH,CD_STT,VA_I_SZE,VA_O_SZE,DH_DBT,DH_FIN,VA_THRED,CD_SES FROM E_API_REQ"
+ " WHERE CD_API = ? ", new Object[]{id}, newArray(1, VARCHAR), rs -> {

if (rs.next()) {
ApiRequest out = new ApiRequest();
out.setId(rs.getString("ID_OUT_REQ"));
out.setId(rs.getString("CD_API"));
out.setProtocol(rs.getString("VA_PRTCL"));
out.setHost(rs.getString("VA_HST"));
out.setPort(rs.getInt("CD_PRT"));
Expand All @@ -211,16 +211,16 @@ public ApiRequest getOutcomingRequestById(String id) {
}

public List<MainSession> getMainRequestByCriteria(boolean lazy, FilterCriteria fc) {
var query = "SELECT ID_MAIN_REQ,VA_NAME,VA_USR,DH_DBT,DH_FIN,LNCH,LOC,VA_THRED,VA_APP_NME,VA_VRS,VA_ADRS,VA_ENV,VA_OS,VA_RE,VA_ERR_CLS,VA_ERR_MSG FROM E_MAIN_REQ";
var query = "SELECT ID_SES,VA_NAME,VA_USR,DH_DBT,DH_FIN,LNCH,LOC,VA_THRED,VA_APP_NME,VA_VRS,VA_ADRS,VA_ENV,VA_OS,VA_RE,VA_ERR_CLS,VA_ERR_MSG FROM E_MAIN_SES";

Collection<Integer> argTypes = new ArrayList<>();
Collection<Object> args = new ArrayList<>();
query += fc.toSql(ID_IN_REQ, ID_MAIN_REQ, VA_APP_NME, VA_ENV, CD_PRT, LNCH, DH_DBT, DH_FIN, args, argTypes);
query += fc.toSql(ID_SES, VA_APP_NME, VA_ENV, CD_PRT, LNCH, DH_DBT, DH_FIN, args, argTypes);


List<MainSession> res = template.query(query, args.toArray(), argTypes.stream().mapToInt(i -> i).toArray(), (rs, i) -> {
MainSession main = new MainSession();
main.setId(rs.getString("ID_MAIN_REQ")); // add value of nullable
main.setId(rs.getString("ID_SES")); // add value of nullable
main.setName(rs.getString("VA_NAME"));
main.setUser(rs.getString("VA_USR"));
main.setStart(fromNullableTimestamp(rs.getTimestamp("DH_DBT")));
Expand Down Expand Up @@ -252,16 +252,16 @@ public List<MainSession> getMainRequestByCriteria(boolean lazy, FilterCriteria f
}

public List<MainSession> getMainRequestById(boolean lazy, String... idArr) {
var query = "SELECT ID_MAIN_REQ,VA_NAME,VA_USR,DH_DBT,DH_FIN,LNCH,LOC,VA_THRED,VA_APP_NME,VA_VRS,VA_ADRS,VA_ENV,VA_OS,VA_RE,VA_ERR_CLS,VA_ERR_MSG FROM E_MAIN_REQ";
var query = "SELECT ID_SES,VA_NAME,VA_USR,DH_DBT,DH_FIN,LNCH,LOC,VA_THRED,VA_APP_NME,VA_VRS,VA_ADRS,VA_ENV,VA_OS,VA_RE,VA_ERR_CLS,VA_ERR_MSG FROM E_MAIN_SES";
int[] argTypes = null;
if (!isEmpty(idArr)) {
query += " WHERE ID_MAIN_REQ IN(" + nArg(idArr.length) + ")";
query += " WHERE ID_SES IN(" + nArg(idArr.length) + ")";
argTypes = newArray(idArr.length, VARCHAR);
}
query += " order by DH_DBT desc";
List<MainSession> res = template.query(query, idArr, argTypes, (rs, i) -> {
MainSession main = new MainSession();
main.setId(rs.getString("ID_MAIN_REQ"));
main.setId(rs.getString("ID_SES"));
main.setName(rs.getString("VA_NAME"));
main.setUser(rs.getString("VA_USR"));
main.setStart(fromNullableTimestamp(rs.getTimestamp("DH_DBT")));
Expand Down Expand Up @@ -293,15 +293,15 @@ public List<MainSession> getMainRequestById(boolean lazy, String... idArr) {
}

public List<ApiSession> getIncomingRequestByCriteria(boolean lazy, FilterCriteria fs) {
var query = "SELECT ID_IN_REQ,VA_MTH,VA_PRTCL,VA_HST,CD_PRT,VA_PTH,VA_QRY,VA_CNT_TYP,VA_AUTH,CD_STT,VA_I_SZE,VA_O_SZE,DH_DBT,DH_FIN,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,VA_API_NME,VA_USR,VA_APP_NME,VA_VRS,VA_ADRS,VA_ENV,VA_OS,VA_RE FROM E_IN_REQ ";
var query = "SELECT ID_SES,VA_MTH,VA_PRTCL,VA_HST,CD_PRT,VA_PTH,VA_QRY,VA_CNT_TYP,VA_AUTH,CD_STT,VA_I_SZE,VA_O_SZE,DH_DBT,DH_FIN,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,VA_API_NME,VA_USR,VA_APP_NME,VA_VRS,VA_ADRS,VA_ENV,VA_OS,VA_RE FROM E_API_SES ";

Collection<Integer> argTypes = new ArrayList<>();
Collection<Object> args = new ArrayList<>();
query += fs.toSql(ID_IN_REQ, ID_MAIN_REQ, VA_APP_NME, VA_ENV, CD_PRT, LNCH, DH_DBT, DH_FIN, args, argTypes);
query += fs.toSql(ID_SES, VA_APP_NME, VA_ENV, CD_PRT, LNCH, DH_DBT, DH_FIN, args, argTypes);
query += " order by DH_DBT desc";
List<ApiSession> res = template.query(query, args.toArray(), argTypes.stream().mapToInt(i -> i).toArray(), (rs, i) -> {
ApiSession in = new ApiSession();
in.setId(rs.getString("ID_IN_REQ"));
in.setId(rs.getString("ID_SES"));
in.setMethod(rs.getString("VA_MTH"));
in.setProtocol(rs.getString("VA_PRTCL"));
in.setHost(rs.getString("VA_HST"));
Expand Down Expand Up @@ -345,9 +345,9 @@ public ApiSession getTreebyId(String id) {
var query = " with recursive recusive(prnt,chld) as (" +
" select ''::varchar as prnt, ? as chld " +
" union all " +
" select recusive.chld, e_out_req.id_out_req " +
" from e_out_req , recusive " +
" where recusive.chld= e_out_req.cd_in_req " +
" select recusive.chld, E_API_REQ.CD_API " +
" from E_API_REQ , recusive " +
" where recusive.chld= E_API_REQ.CD_SES " +
") select distinct(chld) from recusive";

List<String> prntIds = template.query(query, (ResultSet rs, int rowNum) -> (rs.getString("chld")), id);
Expand All @@ -373,16 +373,16 @@ public List<ApiSession> getIncomingRequestById(boolean lazy, String... idArr){
}

public List<ApiSession> getIncomingRequestById(boolean lazy, Supplier<? extends ApiRequest> fn, String... idArr) {
var query = "SELECT ID_IN_REQ,VA_MTH,VA_PRTCL,VA_HST,CD_PRT,VA_PTH,VA_QRY,VA_CNT_TYP,VA_AUTH,CD_STT,VA_I_SZE,VA_O_SZE,DH_DBT,DH_FIN,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,VA_API_NME,VA_USR,VA_APP_NME,VA_VRS,VA_ADRS,VA_ENV,VA_OS,VA_RE FROM E_IN_REQ";
var query = "SELECT ID_SES,VA_MTH,VA_PRTCL,VA_HST,CD_PRT,VA_PTH,VA_QRY,VA_CNT_TYP,VA_AUTH,CD_STT,VA_I_SZE,VA_O_SZE,DH_DBT,DH_FIN,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,VA_API_NME,VA_USR,VA_APP_NME,VA_VRS,VA_ADRS,VA_ENV,VA_OS,VA_RE FROM E_API_SES";
int[] argTypes = null;
if (!isEmpty(idArr)) {
query += " WHERE ID_IN_REQ IN(" + nArg(idArr.length) + ")";
query += " WHERE ID_SES IN(" + nArg(idArr.length) + ")";
argTypes = newArray(idArr.length, VARCHAR);
}

List<ApiSession> res = template.query(query, idArr, argTypes, (rs, i) -> {
ApiSession in = new ApiSession();
in.setId(rs.getString("ID_IN_REQ"));
in.setId(rs.getString("ID_SES"));
in.setMethod(rs.getString("VA_MTH"));
in.setProtocol(rs.getString("VA_PRTCL"));
in.setHost(rs.getString("VA_HST"));
Expand Down Expand Up @@ -423,11 +423,11 @@ public List<ApiSession> getIncomingRequestById(boolean lazy, Supplier<? extends
}

public List<OutcomingRequestWrapper> outcomingRequests(Set<String> incomingId, Supplier<? extends ApiRequest> fn) { //use criteria
var query = "SELECT ID_OUT_REQ,VA_PRTCL,VA_HST,CD_PRT,VA_PTH,VA_QRY,VA_MTH,CD_STT,VA_I_SZE,VA_O_SZE,DH_DBT,DH_FIN,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,CD_IN_REQ FROM E_OUT_REQ"
+ " WHERE CD_IN_REQ IN(" + nArg(incomingId.size()) + ") ORDER BY DH_DBT ASC";
var query = "SELECT CD_API,VA_PRTCL,VA_HST,CD_PRT,VA_PTH,VA_QRY,VA_MTH,CD_STT,VA_I_SZE,VA_O_SZE,DH_DBT,DH_FIN,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,CD_SES FROM E_API_REQ"
+ " WHERE CD_SES IN(" + nArg(incomingId.size()) + ") ORDER BY DH_DBT ASC";
return template.query(query, incomingId.toArray(), newArray(incomingId.size(), VARCHAR), (rs, i) -> {
OutcomingRequestWrapper out = new OutcomingRequestWrapper(rs.getString("CD_IN_REQ"), fn);
out.setId(rs.getString("ID_OUT_REQ"));
OutcomingRequestWrapper out = new OutcomingRequestWrapper(rs.getString("CD_SES"), fn);
out.setId(rs.getString("CD_API"));
out.setProtocol(rs.getString("VA_PRTCL"));
out.setHost(rs.getString("VA_HST"));
out.setPort(rs.getInt("CD_PRT"));
Expand All @@ -450,10 +450,10 @@ public List<OutcomingRequestWrapper> outcomingRequests(Set<String> incomingId, S
}

public List<OutcomingStagesWrapper> outcomingStages(Set<String> sessionId, Supplier<? extends RunnableStage> fn){
var query = "SELECT VA_NAME,LOC,DH_DBT,DH_FIN,VA_USR,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,CD_IN_REQ FROM E_OUT_STG"
+" WHERE CD_IN_REQ IN ("+ nArg(sessionId.size()) + ") ORDER BY DH_DBT";
var query = "SELECT VA_NAME,LOC,DH_DBT,DH_FIN,VA_USR,VA_THRED,VA_ERR_CLS,VA_ERR_MSG,CD_SES FROM E_STG"
+" WHERE CD_SES IN ("+ nArg(sessionId.size()) + ") ORDER BY DH_DBT";
return template.query(query,sessionId.toArray(),newArray(sessionId.size(),VARCHAR),(rs,i)-> {
OutcomingStagesWrapper stg = new OutcomingStagesWrapper(rs.getString("CD_IN_REQ"),fn);
OutcomingStagesWrapper stg = new OutcomingStagesWrapper(rs.getString("CD_SES"),fn);
stg.setName(rs.getString("VA_NAME"));
stg.setLocation(rs.getString("LOC"));
stg.setStart(fromNullableTimestamp(rs.getTimestamp("DH_DBT")));
Expand All @@ -468,10 +468,10 @@ public List<OutcomingStagesWrapper> outcomingStages(Set<String> sessionId, Suppl
}

public List<OutcomingQueryWrapper> outcomingQueries(Set<String> incomingId) { // non empty
var query = "SELECT ID_OUT_QRY,VA_HST,CD_PRT,VA_SCHMA,DH_DBT,DH_FIN,VA_USR,VA_THRED,VA_DRV,VA_DB_NME,VA_DB_VRS,VA_CMPLT,CD_IN_REQ FROM E_OUT_QRY"
+ " WHERE CD_IN_REQ IN(" + nArg(incomingId.size()) + ")";
var query = "SELECT ID_OUT_QRY,VA_HST,CD_PRT,VA_SCHMA,DH_DBT,DH_FIN,VA_USR,VA_THRED,VA_DRV,VA_DB_NME,VA_DB_VRS,VA_CMPLT,CD_SES FROM E_DB_REQ"
+ " WHERE CD_SES IN(" + nArg(incomingId.size()) + ")";
var queries = template.query(query, incomingId.toArray(), newArray(incomingId.size(), VARCHAR), (rs, i) -> {
var out = new OutcomingQueryWrapper(rs.getLong("ID_OUT_QRY"), rs.getString("CD_IN_REQ"));
var out = new OutcomingQueryWrapper(rs.getLong("ID_OUT_QRY"), rs.getString("CD_SES"));
out.setHost(rs.getString("VA_HST"));
out.setPort(rs.getInt("CD_PRT"));
out.setSchema(rs.getString("VA_SCHMA"));
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/org/usf/trace/api/server/config/DataConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public final class DataConstants {

public static String sessionColumns(TraceApiColumn column) {
switch (column) {
case ID: return "ID_MAIN_REQ";
case ID: return "ID_SES";
case NAME: return "VA_NAME";
case START: return "DH_DBT";
case END: return "DH_FIN";
Expand All @@ -42,7 +42,7 @@ public static String sessionColumns(TraceApiColumn column) {

public static String incReqColumns(TraceApiColumn column) {
switch (column) {
case ID: return "ID_IN_REQ";
case ID: return "ID_SES";
case METHOD: return "VA_MTH";
case PROTOCOL: return "VA_PRTCL";
case HOST: return "VA_HST";
Expand Down Expand Up @@ -71,7 +71,7 @@ public static String incReqColumns(TraceApiColumn column) {

public static String outReqColumns(TraceApiColumn column) {
switch (column) {
case ID: return "ID_OUT_REQ";
case ID: return "CD_API";
case METHOD: return "VA_MTH";
case PROTOCOL: return "VA_PRTCL";
case HOST: return "VA_HST";
Expand All @@ -86,7 +86,7 @@ public static String outReqColumns(TraceApiColumn column) {
case START: return "DH_DBT";
case END: return "DH_FIN";
case THREAD: return "VA_THRED";
case PARENT: return "CD_IN_REQ";
case PARENT: return "CD_SES";
default: return null;
}
}
Expand All @@ -104,7 +104,7 @@ public static String outQryColumns(TraceApiColumn column) {
case DB_NAME: return "VA_DB_NME";
case DB_VERSION: return "VA_DB_VRS";
case COMPLETE: return "VA_CMPLT";
case PARENT: return "CD_IN_REQ";
case PARENT: return "CD_SES";
default: return null;
}
}
Expand All @@ -119,6 +119,7 @@ public static String outStgColumns(TraceApiColumn column) {
case THREAD: return "VA_THRED";
case ERR_TYPE: return "VA_ERR_CLS";
case ERR_MSG: return "VA_ERR_MSG";
case PARENT: return "CD_SES";
default: return null;
}
}
Expand Down
Loading

0 comments on commit 6b384b9

Please sign in to comment.