SQLQueryResult.java
976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package io.mycat.sqlengine;
public class SQLQueryResult<T> {
private final T result;
private final boolean success;
private final String dataNode; // dataNode or database name
private String tableName;
private String errMsg;
public SQLQueryResult(T result, boolean success) {
super();
this.result = result;
this.success = success;
this.dataNode = null;
}
public SQLQueryResult(T result, boolean success, String dataNode,String errMsg) {
super();
this.result = result;
this.success = success;
this.dataNode= dataNode;
this.errMsg=errMsg;
}
public String getErrMsg() {
return errMsg;
}
public void setErrMsg(String errMsg) {
this.errMsg = errMsg;
}
public T getResult() {
return result;
}
public boolean isSuccess() {
return success;
}
public String getDataNode() {
return dataNode;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
}