-
Notifications
You must be signed in to change notification settings - Fork 397
Expand file tree
/
Copy pathTiDBUnaryPostfixOperation.java
More file actions
40 lines (30 loc) · 1.05 KB
/
TiDBUnaryPostfixOperation.java
File metadata and controls
40 lines (30 loc) · 1.05 KB
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
package sqlancer.tidb.ast;
import sqlancer.Randomly;
import sqlancer.common.ast.BinaryOperatorNode.Operator;
import sqlancer.common.ast.UnaryOperatorNode;
import sqlancer.tidb.ast.TiDBUnaryPostfixOperation.TiDBUnaryPostfixOperator;
public class TiDBUnaryPostfixOperation extends UnaryOperatorNode<TiDBExpression, TiDBUnaryPostfixOperator>
implements TiDBExpression {
public enum TiDBUnaryPostfixOperator implements Operator {
IS_NULL("IS NULL"), //
IS_NOT_NULL("IS NOT NULL"); //
private String s;
TiDBUnaryPostfixOperator(String s) {
this.s = s;
}
public static TiDBUnaryPostfixOperator getRandom() {
return Randomly.fromOptions(values());
}
@Override
public String getTextRepresentation() {
return s;
}
}
public TiDBUnaryPostfixOperation(TiDBExpression expr, TiDBUnaryPostfixOperator op) {
super(expr, op);
}
@Override
public OperatorKind getOperatorKind() {
return OperatorKind.POSTFIX;
}
}