feature(info-query): 优化SQL logger的埋点,增加说明
This commit is contained in:
@@ -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 + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user