forked from sqlancer/sqlancer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCockroachDBCast.java
More file actions
31 lines (23 loc) · 819 Bytes
/
CockroachDBCast.java
File metadata and controls
31 lines (23 loc) · 819 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
package sqlancer.cockroachdb.ast;
import sqlancer.cockroachdb.CockroachDBSchema.CockroachDBCompositeDataType;
import sqlancer.common.visitor.UnaryOperation;
public class CockroachDBCast implements UnaryOperation<CockroachDBExpression>, CockroachDBExpression {
private final CockroachDBExpression expr;
private final CockroachDBCompositeDataType type;
public CockroachDBCast(CockroachDBExpression expr, CockroachDBCompositeDataType type) {
this.expr = expr;
this.type = type;
}
@Override
public CockroachDBExpression getExpression() {
return expr;
}
@Override
public String getOperatorRepresentation() {
return "::" + type.toString();
}
@Override
public OperatorKind getOperatorKind() {
return OperatorKind.POSTFIX;
}
}