feature(info-query): 优化SQL logger的埋点,增加说明

This commit is contained in:
2023-07-14 10:27:06 +08:00
parent ab50b3254b
commit 01500d2b5d
8 changed files with 293 additions and 231 deletions

View File

@@ -11,12 +11,18 @@ import java.time.Instant;
public class SQLLine {
private String sql;
private Long createTime;
private String comment;
public SQLLine() {
}
public SQLLine(String sql) {
this(sql, "Unknown");
}
public SQLLine(String sql, String comment) {
this.sql = sql;
this.comment = comment;
this.createTime = Instant.now().toEpochMilli();
}
@@ -28,6 +34,14 @@ public class SQLLine {
this.sql = sql;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public Long getCreateTime() {
return createTime;
}
@@ -41,6 +55,7 @@ public class SQLLine {
return "SQLLine{" +
"sql='" + sql + '\'' +
", createTime=" + createTime +
", comment='" + comment + '\'' +
'}';
}
}